Erreurs courantes de l'API Exa

VérifiéPrudence

Diagnostiquer et corriger les erreurs de l'API Exa par code HTTP et tag d'erreur, avec des conseils de remédiation.

Spar Skills Guide Bot
DeveloppementIntermédiaire
29/08/2026
Claude Code
#exa#debugging#api-errors#troubleshooting#saas

Recommandé pour

Synthèse automatique

Référence de diagnostic des erreurs HTTP et tags d'erreur de l'API Exa, avec procédures de correction et de remontée d'incident.

Points forts

  • Tableaux par code HTTP (400, 401, 402, 403, 429) associant chaque tag d'erreur à une cause et une solution
  • Inclut des commandes curl et TypeScript concrètes pour vérifier la clé API et implémenter un backoff exponentiel
  • Insiste sur la redaction des données sensibles et la fourniture du requestId au support Exa

Limites

  • L'exemple de code pour le 429 est tronqué dans le fichier, ce qui limite sa réutilisation directe
  • Ne couvre que les codes d'erreur listés ; les autres statuts ou erreurs réseau ne sont pas traités
  • Suppose un accès aux outils Bash(curl) et Bash(node) pour les vérifications proposées
Quand l'utiliser

À utiliser lorsqu'une requête Exa échoue et qu'il faut identifier la cause à partir du code HTTP ou du tag d'erreur renvoyé.

Quand l'éviter

À éviter pour concevoir une intégration Exa initiale ou pour des questions de tarification et de fonctionnalités hors périmètre d'erreur.

Analyse de sécurité

Prudence
Score qualité78/100

The skill is a debugging reference for the Exa API. Its executable content is limited to curl requests against the official api.exa.ai endpoint, an echo that only reveals whether the key is set, and a bounded node/TS backoff snippet. There is no exfiltration to third-party hosts, no destructive command, no obfuscated payload, and no instruction to disable safety. It does use network egress with a live credential, so it warrants a caution rather than safe rating; minor hygiene gaps (fixed /tmp file, key on curl command line, truncated tail) are worth flagging but not disqualifying.

Points d'attention
  • •Uses Bash(curl:*) to send network requests to https://api.exa.ai with the EXA_API_KEY header — legitimate diagnostics but places the key in a subprocess command line where it can be seen via process listing on shared hosts
  • •Diagnostic script writes an API response to a fixed path /tmp/exa-test.json without cleanup or restrictive permissions
  • •Script prints API key length (`${#EXA_API_KEY}`) and key-set status; no secret value is printed, but metadata is emitted to stdout/logs
  • •Document text appears truncated mid-command (`|| cat /tmp`), so the executed script may be incomplete/unreliable
Comment cette analyse est faite

Exemples

Debug a 429
My Exa search is failing with a 429 rate limit error — help me confirm it and add exponential backoff.
Fix 400 INVALID_URLS
Exa returns INVALID_URLS on getContents; check my URLs and tell me what to fix.
Verify API key
Exa not working, I get a 401 — walk me through verifying my EXA_API_KEY with curl.

name: exa-common-errors description: 'Diagnose and fix Exa API errors by HTTP code and error tag.

Use when encountering Exa errors, debugging failed requests,

or troubleshooting integration issues.

Trigger with phrases like "exa error", "fix exa",

"exa not working", "debug exa", "exa 429", "exa 401".

' allowed-tools: Read, Grep, Bash(curl:), Bash(node:) version: 1.11.0 license: MIT author: Jeremy Longshore jeremy@intentsolutions.io tags:

  • saas
  • exa
  • debugging
  • errors compatibility: Designed for Claude Code

Exa Common Errors

Prerequisites

  • A bounded non-sensitive reproduction, environment/version, expected behavior, and redaction rule for diagnostics.

Output

  • A classified Exa failure with redacted evidence and a verified bounded remediation or escalation.

Error Handling

| Condition | Safe response | |---|---| | Authentication fails | Verify the scoped secret reference/environment; revoke/rotate if exposure is suspected. | | Result is unexpected | Inspect supported sources, date, options, and citations with a sanitized query before changing policy. | | Throttling occurs | Apply documented backoff and reduce concurrency; do not bulk retry. | | Request includes sensitive data | Stop, sanitize/use an approved path, and follow exposure policy. |

Examples

For a failing request, record correlation ID, environment, status class, latency, and sanitized request category, then validate credentials and options against a non-sensitive fixture. Escalate with redacted evidence rather than full query/result content.

Overview

Quick reference for Exa API errors by HTTP status code and error tag. All error responses include a requestId field — include it when contacting Exa support at hello@exa.ai.

Error Reference

400 — Bad Request

| Error Tag | Cause | Solution | |-----------|-------|----------| | INVALID_REQUEST_BODY | Malformed JSON or missing required fields | Validate JSON structure and required query field | | INVALID_REQUEST | Conflicting parameters | Remove contradictory options (e.g., date filters with company category) | | INVALID_URLS | Malformed URLs in getContents | Ensure URLs have https:// protocol | | INVALID_NUM_RESULTS | numResults > 100 with highlights | Reduce to <= 100 or remove highlights | | INVALID_JSON_SCHEMA | Bad schema in summary.schema | Validate JSON schema syntax | | NUM_RESULTS_EXCEEDED | Exceeds plan limit | Check your plan's max results | | NO_CONTENT_FOUND | No content at provided URLs | Verify URLs are accessible |

401 — Unauthorized

# Verify your API key is set and valid
echo "Key set: ${EXA_API_KEY:+yes}"

# Test with curl
curl -s -o /dev/null -w "%{http_code}" \
  -X POST https://api.exa.ai/search \
  -H "x-api-key: $EXA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"test","numResults":1}'

Fix: Regenerate API key at dashboard.exa.ai.

402 — Payment Required

| Error Tag | Cause | Solution | |-----------|-------|----------| | NO_MORE_CREDITS | Account balance exhausted | Top up at dashboard.exa.ai | | API_KEY_BUDGET_EXCEEDED | Spending limit reached | Increase budget in API key settings |

403 — Forbidden

| Error Tag | Cause | Solution | |-----------|-------|----------| | ACCESS_DENIED | Feature not available on plan | Upgrade plan or contact Exa | | FEATURE_DISABLED | Endpoint not enabled | Check plan capabilities | | ROBOTS_FILTER_FAILED | URL blocked by robots.txt | Use a different URL | | PROHIBITED_CONTENT | Content blocked by moderation | Review query for policy violations |

429 — Rate Limited

// Default rate limit: 10 QPS (queries per second)
// Error response format: { "error": "rate limit exceeded" }

// Fix: implement exponential backoff
async function searchWithBackoff(exa: Exa, query: string, opts: any) {
  for (let attempt = 0; attempt < 5; attempt++) {
    try {
      return await exa.search(query, opts);
    } catch (err: any) {
      if (err.status !== 429) throw err;
      const delay = 1000 * Math.pow(2, attempt) + Math.random() * 500;
      console.log(`Rate limited. Waiting ${delay.toFixed(0)}ms...`);
      await new Promise(r => setTimeout(r, delay));
    }
  }
  throw new Error("Rate limit retries exhausted");
}

422 — Unprocessable Entity

| Error Tag | Cause | Solution | |-----------|-------|----------| | FETCH_DOCUMENT_ERROR | URL could not be crawled | Verify URL is accessible and not paywalled |

5xx — Server Errors

| Code | Tag | Action | |------|-----|--------| | 500 | DEFAULT_ERROR / INTERNAL_ERROR | Retry after 1-2 seconds | | 501 | UNABLE_TO_GENERATE_RESPONSE | Rephrase query (answer endpoint) | | 502 | Bad Gateway | Retry with delay | | 503 | Service Unavailable | Check status page, retry later |

Content Fetch Errors (per-URL status in getContents)

| Tag | Cause | Resolution | |-----|-------|-----------| | CRAWL_NOT_FOUND | Content unavailable at URL | Verify URL correctness | | CRAWL_TIMEOUT | Fetch timed out | Retry or increase livecrawlTimeout | | CRAWL_LIVECRAWL_TIMEOUT | Live crawl exceeded timeout | Set livecrawlTimeout: 15000 or use livecrawl: "fallback" | | SOURCE_NOT_AVAILABLE | Paywalled or blocked | Try cached content with livecrawl: "never" | | UNSUPPORTED_URL | Non-HTTP URL scheme | Use standard HTTPS URLs |

Quick Diagnostic Script

set -euo pipefail

echo "=== Exa Diagnostics ==="
echo "API Key: ${EXA_API_KEY:+SET (${#EXA_API_KEY} chars)}"

# Test basic connectivity
echo -n "API connectivity: "
HTTP_CODE=$(curl -s -o /tmp/exa-test.json -w "%{http_code}" \
  -X POST https://api.exa.ai/search \
  -H "x-api-key: $EXA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"connectivity test","numResults":1}')
echo "$HTTP_CODE"

if [ "$HTTP_CODE" != "200" ]; then
  echo "Error response:"
  cat /tmp/exa-test.json | python3 -m json.tool 2>/dev/null || cat /tmp/exa-test.json
fi

Instructions

  1. Check the HTTP status code from the error response
  2. Match the error tag to the tables above
  3. Apply the documented solution
  4. Include requestId from error responses when contacting support

Resources

Next Steps

For comprehensive debugging, see exa-debug-bundle. For rate limit patterns, see exa-rate-limits.

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/exa-api-common-errors-mte1lhx3/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

mkdir -p '.skill-downloads/exa-api-common-errors-mte1lhx3' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/exa-api-common-errors-mte1lhx3/download' --output '.skill-downloads/exa-api-common-errors-mte1lhx3/SKILL.md.part' && mv '.skill-downloads/exa-api-common-errors-mte1lhx3/SKILL.md.part' '.skill-downloads/exa-api-common-errors-mte1lhx3/SKILL.md'

2. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Environnement déclaré par l’auteur : Designed for Claude Code

Outils déclarés par l’auteur (à vérifier dans votre agent) : Read, Grep, Bash(curl:*), Bash(node:*)

Extrait original : Prerequisites
  • A bounded non-sensitive reproduction, environment/version, expected behavior, and redaction rule for diagnostics.

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.

Claude Code
test -f '.skill-downloads/exa-api-common-errors-mte1lhx3/SKILL.md' && test -s '.skill-downloads/exa-api-common-errors-mte1lhx3/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/exa-common-errors' && cp -R '.skill-downloads/exa-api-common-errors-mte1lhx3' '.claude/skills/exa-common-errors'

OpenSkills

OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.

Installation officielle d’OpenSkills
openskills install './.skill-downloads/exa-api-common-errors-mte1lhx3'

openskills read 'exa-api-common-errors-mte1lhx3'

La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.

Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.

openskills sync

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/exa-api-common-errors-mte1lhx3/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires