# Explore API for agents

> API for Agents · https://apiforagents.dev/platforms/explore · HTML twin: https://apiforagents.dev/platforms/explore

Data sources beyond the named platforms, for the long tail.

Endpoint: `POST https://apiforagents.dev/v1/explore`. One op per call. Quote first with `"estimateOnly": true`.

## Prices

Priced per request; the capabilities endpoint prints the rate and every call can be quoted first.

## Operations

### sources (free)

Search what explore can reach. Free. `query` names the SITE or the DATA in plain words ("quick commerce categories", "who retweeted a post"), never an entity; returns the best-matching sources with what each returns and its price per row. Omit `query` to browse the whole index.

| Field | Required | Type | Meaning |
|---|---|---|---|
| query | no | string (≤300 chars) |  |

Request shape:

```json
{
  "op": "sources"
}
```

Try it in the playground: https://apiforagents.dev/dashboard/run?platform=explore&op=sources (sign in first).

### schema (free)

One source's live input fields, a sample input and a money estimate. Free. Call it before `run` so the input is built against the source's real, current contract and the cost is known before spending.

| Field | Required | Type | Meaning |
|---|---|---|---|
| source | yes | string (≤120 chars) | A source name from sources. |

Request shape:

```json
{
  "op": "schema",
  "source": "example"
}
```

Try it in the playground: https://apiforagents.dev/dashboard/run?platform=explore&op=schema (sign in first).

### run

Fetch rows from one source. `input` is forwarded to the source as `schema` described it; `limit` bounds the rows and the bill. Rows come back raw and unmapped. Billed per row the source actually returns; a run that finds nothing is free.

| Field | Required | Type | Meaning |
|---|---|---|---|
| source | yes | string (≤120 chars) | The source's name exactly as sources listed it. |
| input | no | dict | The source's own input, shaped by schema. |
| limit | no | integer (1-100) | Rows wanted. Every row costs real money, so name the count the question needs; the hard ceiling is 100. |

Example request:

```bash
curl -X POST https://apiforagents.dev/v1/explore \
  -H "Authorization: Bearer $AFA_KEY" \
  -H "Content-Type: application/json" \
  -d '{"op":"run","source":"<source name from sources>","input":{},"limit":10}'
```

Try it in the playground: https://apiforagents.dev/dashboard/run?platform=explore&op=run (sign in first).

## Notes for the agent

Reach data sources OUTSIDE the measured platform tools. The long tail the catalogue can fetch that no dedicated tool covers yet. Use it only after the platform tools have been ruled out: for anything about an Instagram, LinkedIn, YouTube, X, Reddit, TikTok, Facebook, Amazon, jobs, places or commerce entity, the dedicated tool answers better, cheaper and with provenance. What comes back here is the SOURCE'S OWN rows: raw, unverified, not mapped into a schema and not kept as measured data. Evidence to interpret and cite, never a measurement. ops: sources (free. Search what is reachable with `query` in plain words, naming the SITE or the DATA: "retweeters of a post", "quick commerce category listing"; returns the best few with a per-row price), schema (free. One source's live input fields, a sample input and a money estimate; call it before every run), run (fetch: `source` from sources, `input` shaped by schema, `limit` rows. At most 100, default 10; billed per row the source returns, a run that returns nothing costs nothing). Ops are independent; sources and schema are free.
