$npx -y skills add MoizIbnYousaf/marketing-cli --skill exa-searchCall Exa Search (POST /search) for semantic web retrieval with ranked results, filters, freshness, highlights/text, structured output, or streaming. Use when the agent needs open-ended web search, competitor discovery, news, people, or research papers and does not already have UR
| 1 | ## On Activation |
| 2 | |
| 3 | 1. Read `brand/positioning.md`, `brand/competitors.md`, and `brand/landscape.md` if present. Use them to sharpen queries and exclusions. All optional - works at zero brand context. |
| 4 | 2. Confirm Exa auth: Exa MCP connected, or `EXA_API_KEY` set (`mktg doctor --json --fields integrations`). If neither, stop and surface: get a key at https://dashboard.exa.ai/api-keys then `export EXA_API_KEY=...`. |
| 5 | 3. Prefer MCP tools when present; otherwise use the cURL examples below. |
| 6 | 4. After discovery, chain `firecrawl` or `exa-contents` only when a known URL needs deeper extraction. |
| 7 | |
| 8 | # Exa Search |
| 9 | |
| 10 | > Requires API key: Get one at https://dashboard.exa.ai/api-keys |
| 11 | > |
| 12 | > Header: `x-api-key: $EXA_API_KEY` |
| 13 | |
| 14 | Use `POST https://api.exa.ai/search` for semantic web retrieval, ranked results, and optional result-level extraction in one raw HTTP call. Start with `type: "auto"` for general retrieval. Add `contents` only when the caller needs page text, highlights, summaries, freshness-controlled crawling, subpages, or extracted links. |
| 15 | |
| 16 | ## Quick Start (cURL) |
| 17 | |
| 18 | ### Basic search |
| 19 | |
| 20 | ```bash |
| 21 | curl -sS -X POST "https://api.exa.ai/search" \ |
| 22 | -H "Content-Type: application/json" \ |
| 23 | -H "x-api-key: $EXA_API_KEY" \ |
| 24 | -d '{ |
| 25 | "query": "latest developments in LLMs", |
| 26 | "type": "auto", |
| 27 | "numResults": 10 |
| 28 | }' |
| 29 | ``` |
| 30 | |
| 31 | ### Search with highlights |
| 32 | |
| 33 | ```bash |
| 34 | curl -sS -X POST "https://api.exa.ai/search" \ |
| 35 | -H "Content-Type: application/json" \ |
| 36 | -H "x-api-key: $EXA_API_KEY" \ |
| 37 | -d '{ |
| 38 | "query": "latest developments in LLMs", |
| 39 | "type": "auto", |
| 40 | "numResults": 5, |
| 41 | "contents": { |
| 42 | "highlights": true |
| 43 | } |
| 44 | }' |
| 45 | ``` |
| 46 | |
| 47 | ### With filters and freshness |
| 48 | |
| 49 | ```bash |
| 50 | curl -sS -X POST "https://api.exa.ai/search" \ |
| 51 | -H "Content-Type: application/json" \ |
| 52 | -H "x-api-key: $EXA_API_KEY" \ |
| 53 | -d '{ |
| 54 | "query": "AI regulation policy updates", |
| 55 | "type": "auto", |
| 56 | "category": "news", |
| 57 | "numResults": 10, |
| 58 | "includeDomains": ["reuters.com", "bbc.com"], |
| 59 | "startPublishedDate": "2025-01-01", |
| 60 | "contents": { |
| 61 | "text": { |
| 62 | "maxCharacters": 2000 |
| 63 | }, |
| 64 | "maxAgeHours": 24, |
| 65 | "livecrawlTimeout": 12000 |
| 66 | } |
| 67 | }' |
| 68 | ``` |
| 69 | |
| 70 | ### Deep search |
| 71 | |
| 72 | ```bash |
| 73 | curl -sS -X POST "https://api.exa.ai/search" \ |
| 74 | -H "Content-Type: application/json" \ |
| 75 | -H "x-api-key: $EXA_API_KEY" \ |
| 76 | -d '{ |
| 77 | "query": "map the major technical and commercial tradeoffs in sodium-ion batteries for grid storage", |
| 78 | "type": "deep", |
| 79 | "numResults": 8 |
| 80 | }' |
| 81 | ``` |
| 82 | |
| 83 | ## Endpoint |
| 84 | |
| 85 | ```text |
| 86 | POST https://api.exa.ai/search |
| 87 | ``` |
| 88 | |
| 89 | Authentication: `x-api-key: <API_KEY>` header. Exa also accepts `Authorization: Bearer <API_KEY>`, but prefer `x-api-key` in cURL examples for consistency. |
| 90 | |
| 91 | Use this endpoint when the agent needs search results. If the agent already has URLs and only needs extraction, use `POST /contents` instead. |
| 92 | |
| 93 | ## Parameters |
| 94 | |
| 95 | ### Core request parameters |
| 96 | |
| 97 | | Parameter | Type | Required | Default | Description | |
| 98 | | --- | --- | --- | --- | --- | |
| 99 | | `query` | string | Yes | - | Natural-language search query. Long, semantically rich descriptions work well. | |
| 100 | | `type` | string | No | `auto` | Search method: `auto`, `fast`, `instant`, `deep-lite`, `deep`, or `deep-reasoning`. | |
| 101 | | `numResults` | integer | No | `10` | Number of results to return. Use small values for agent loops; maximum is 100. | |
| 102 | | `category` | string | No | - | Specialized result type: `company`, `people`, `research paper`, `news`, `personal site`, or `financial report`. | |
| 103 | | `includeDomains` | string[] | No | - | Only return results from these domains, paths, or wildcard patterns. Max 1200. | |
| 104 | | `excludeDomains` | string[] | No | - | Exclude these domains, paths, or wildcard patterns. Max 1200. | |
| 105 | | `startPublishedDate` | string | No | - | ISO 8601 lower bound for result publication date. | |
| 106 | | `endPublishedDate` | string | No | - | ISO 8601 upper bound for result publication date. | |
| 107 | | `userLocation` | string | No | - | Two-letter ISO country code such as `US` or `GB`. | |
| 108 | | `moderation` | boolean | No | `false` | Filter unsafe content from results. | |
| 109 | | `additionalQueries` | string[] | No | - | Extra query variants for deep-search variants. Use alongside the main `query`. | |
| 110 | | `systemPrompt` | string | No | - | Instructions for synthesized output and deep-search planning, s |