# Exa Get Contents

> Extract clean, LLM-ready content, summaries, or highlights from known URLs using the Exa API. Use when the user has specific URLs and wants to extract content efficiently without searching the web.

- **Type:** Skill
- **Install:** `agentstack add skill-rowanaldean-exa-skills-exa-get-contents`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [RowanAldean](https://agentstack.voostack.com/s/rowanaldean)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** Unlicense
- **Upstream author:** [RowanAldean](https://github.com/RowanAldean)
- **Source:** https://github.com/RowanAldean/exa-skills/tree/main/skills/exa-get-contents

## Install

```sh
agentstack add skill-rowanaldean-exa-skills-exa-get-contents
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Exa Get Contents (Token-Efficient)

Use this skill to extract clean, LLM-ready content from known URLs using the Exa API via `curl`, while **strictly minimizing token usage** to keep context sizes manageable. 

**Note**: This is for when you *already have* the URLs. If you need to search the web to find URLs first, use the `exa-search` skill instead.

## Extraction Approaches

Choose the extraction mode that best balances your need for information against token cost. **Do NOT wrap extraction options in a `contents` object** (unlike the `/search` endpoint).

### 1. Highlights Extraction (Recommended)
Extracts key excerpts relevant to a query. This uses 10x fewer tokens than full text.

```bash
curl -X POST 'https://api.exa.ai/contents' \
  -H "x-api-key: $EXA_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "urls": ["https://example.com/article", "https://example.com/another-post"],
  "highlights": {
    "query": "key findings and methodology",
    "maxCharacters": 4000
  }
}'
```

### 2. Structured Summary
Uses an LLM to generate an abstract or structured JSON. Excellent for analyzing dense company pages or long documents without reading the entire text.

```bash
curl -X POST 'https://api.exa.ai/contents' \
  -H "x-api-key: $EXA_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "urls": ["https://example.com"],
  "summary": {
    "query": "Extract company overview and recent news",
    "schema": {
      "type": "object",
      "properties": {
        "name": { "type": "string" },
        "industry": { "type": "string" },
        "recent_news": { "type": "array", "items": { "type": "string" } }
      },
      "required": ["name", "industry"]
    }
  }
}'
```

### 3. Subpage Crawling (Documentation/Deep Dives)
Automatically discover and extract content from linked subpages (e.g., API docs). Use `subpageTarget` to focus the crawl.

```bash
curl -X POST 'https://api.exa.ai/contents' \
  -H "x-api-key: $EXA_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "urls": ["https://docs.example.com"],
  "subpages": 5,
  "subpageTarget": ["api", "reference", "guide"],
  "highlights": { "maxCharacters": 4000 }
}'
```

## Gotchas & Error Handling

- **Top-Level Keys**: `text`, `highlights`, and `summary` MUST be placed at the top level of the JSON payload. Do NOT nest them inside a `contents` object (that is only for the `/search` endpoint).
- **Silent Failures**: The API returns HTTP 200 even if individual URLs fail to scrape. You MUST check the `statuses` array in the JSON response to verify success.
  - E.g., check that `statuses[].status` is `"success"` and not `"error"`. Look for tags like `CRAWL_NOT_FOUND` or `CRAWL_LIVECRAWL_TIMEOUT` if an error occurs.
- **Freshness**: To bypass cache and force a live crawl, add `"maxAgeHours": 0` and a timeout `"livecrawlTimeout": 15000` to the top level of the JSON. Do not use the deprecated `livecrawl` parameter.
- **Deprecated Parameters**: Never use `useAutoprompt`, `stream`, `tokensNum`, `numSentences`, or `highlightsPerUrl`. 
- **Token warnings**: Avoid `text: true` without limits. If you must use text, always cap it: `"text": {"maxCharacters": 8000}`.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [RowanAldean](https://github.com/RowanAldean)
- **Source:** [RowanAldean/exa-skills](https://github.com/RowanAldean/exa-skills)
- **License:** Unlicense

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-rowanaldean-exa-skills-exa-get-contents
- Seller: https://agentstack.voostack.com/s/rowanaldean
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
