$npx -y skills add MoizIbnYousaf/marketing-cli --skill exa-contentsCall Exa Contents (POST /contents) for LLM-ready extraction from known URLs: text, highlights, summaries, links, image links, subpages, freshness-controlled crawl. Use when the agent already has URLs. Prefer Exa MCP web_fetch_exa when available; otherwise raw HTTP with EXA_API_KE
| 1 | ## On Activation |
| 2 | |
| 3 | 1. Read `brand/competitors.md` / `brand/landscape.md` if present for URL shortlists. Optional. |
| 4 | 2. Confirm Exa auth (MCP or `EXA_API_KEY`) via `mktg doctor` if unsure. |
| 5 | 3. Prefer MCP `web_fetch_exa` when available; otherwise use the cURL examples below. |
| 6 | 4. If the page is auth-walled (X/Twitter login stub), route to `mktg-x` instead. |
| 7 | |
| 8 | # Exa Contents |
| 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/contents` when the agent already knows the URLs and needs clean, LLM-ready extraction without running a new search. Start with one content mode: `highlights` for compact agent context, `text` for broad page context, or `summary` for Exa-side compression. |
| 15 | |
| 16 | ## Quick Start (cURL) |
| 17 | |
| 18 | ### Basic text extraction |
| 19 | |
| 20 | ```bash |
| 21 | curl -sS -X POST "https://api.exa.ai/contents" \ |
| 22 | -H "Content-Type: application/json" \ |
| 23 | -H "x-api-key: $EXA_API_KEY" \ |
| 24 | -d '{ |
| 25 | "urls": ["https://example.com"], |
| 26 | "text": true |
| 27 | }' |
| 28 | ``` |
| 29 | |
| 30 | ### Highlights with freshness control |
| 31 | |
| 32 | ```bash |
| 33 | curl -sS -X POST "https://api.exa.ai/contents" \ |
| 34 | -H "Content-Type: application/json" \ |
| 35 | -H "x-api-key: $EXA_API_KEY" \ |
| 36 | -d '{ |
| 37 | "urls": ["https://arxiv.org/abs/2307.06435"], |
| 38 | "highlights": { |
| 39 | "query": "methodology and results" |
| 40 | }, |
| 41 | "maxAgeHours": 24, |
| 42 | "livecrawlTimeout": 12000 |
| 43 | }' |
| 44 | ``` |
| 45 | |
| 46 | ## Endpoint |
| 47 | |
| 48 | ```text |
| 49 | POST https://api.exa.ai/contents |
| 50 | ``` |
| 51 | |
| 52 | Authentication: `x-api-key: <API_KEY>` header. Exa also accepts `Authorization: Bearer <API_KEY>`, but prefer `x-api-key` in cURL examples for consistency. |
| 53 | |
| 54 | Use this endpoint for known-URL extraction. If the agent needs discovery or ranking first, use `POST /search`. |
| 55 | |
| 56 | ## Parameters |
| 57 | |
| 58 | ### Core request parameters |
| 59 | |
| 60 | | Parameter | Type | Required | Default | Description | |
| 61 | | --- | --- | --- | --- | --- | |
| 62 | | `urls` | string[] | Yes | - | URLs to extract content from. Use this for known URLs. | |
| 63 | | `text` | boolean or object | No | - | Return full page text as markdown. Object form supports `maxCharacters`, `includeHtmlTags`, `verbosity`, `includeSections`, and `excludeSections`. | |
| 64 | | `highlights` | boolean or object | No | - | Return key excerpts. Prefer `true` for agent workflows unless a custom focus is needed. | |
| 65 | | `summary` | boolean or object | No | - | Return per-page LLM summaries. Use when the caller wants Exa-side compression or structured extraction. | |
| 66 | | `maxAgeHours` | integer | No | - | Freshness control. `0` always live crawls; `-1` uses cache only; omit for default cache-first behavior with crawl fallback. | |
| 67 | | `livecrawlTimeout` | integer | No | `10000` | Timeout for live crawling in milliseconds. Use `10000` to `15000` for most freshness-sensitive calls. | |
| 68 | | `subpages` | integer | No | `0` | Number of linked subpages to crawl from each URL. | |
| 69 | | `subpageTarget` | string or string[] | No | - | Terms used to prioritize which subpages matter, such as `["api", "reference", "pricing"]`. | |
| 70 | | `extras.links` | integer | No | `0` | Number of links to extract from each page. | |
| 71 | | `extras.imageLinks` | integer | No | `0` | Number of image URLs to extract from each page. | |
| 72 | | `compliance` | string | No | - | Enterprise-only compliance mode, such as `hipaa`, when enabled for the account. | |
| 73 | |
| 74 | ### Text object options |
| 75 | |
| 76 | | Parameter | Type | Default | Description | |
| 77 | | --- | --- | --- | --- | |
| 78 | | `maxCharacters` | integer | - | Character limit for returned text. Use this instead of `tokensNum`. | |
| 79 | | `includeHtmlTags` | boolean | `false` | Preserve HTML tags in output. | |
| 80 | | `verbosity` | string | `compact` | `compact`, `standard`, or `full`. Pair fresh section-aware extraction with `maxAgeHours: 0`. | |
| 81 | | `includeSections` | string[] | - | Only include selected sections: `header`, `navigation`, `banner`, `body`, `sidebar`, `footer`, `metadata`. | |
| 82 | | `excludeSections` | string[] | - | Exclude selected sections from the same section list. | |
| 83 | |
| 84 | ### Highlights object options |
| 85 | |
| 86 | Prefer `highlights: true` for the highest-quality default. Only use object form when the agent needs a custom focus or budget. |
| 87 | |
| 88 | | Parameter | Type | Default | Description | |
| 89 | | --- | --- | --- | --- | |
| 90 | | `query` | string | - | Custom query guiding which excerpts are returned. | |
| 91 | | `maxCharacters` | integer | - | Cap highlight characters per URL. Omit unless the caller has a strict budget. | |
| 92 | |
| 93 | ### Summary object options |
| 94 | |
| 95 | | Parameter |