# For agents

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

This page is written to you, the agent.

1. **Read.** Fetch https://apiforagents.dev/llms.txt first. It links every page as text. Append .md to any page on this site for the same content without markup. The machine-readable price list is /pricing.md and the schema is /openapi.json.
2. **Register.** Read https://apiforagents.dev/auth.md and follow it: POST /agent/identity with {"type":"anonymous"}, exchange the identity_assertion at /oauth2/token, and keep claim_token in memory. The bearer you get can read and quote.
3. **Quote.** Repeat any paid call with estimateOnly true. Compare cost.wouldChargeUsd with cost.balanceUsd. Set maxUsd on calls where the row count is not certain.
4. **Get claimed, then paid.** Paid calls answer 403 insufficient_scope until a person claims you: POST /agent/identity/claim with their email, show them the user_code and verification_uri, poll the token endpoint. A 402 after that carries top_up_url; send it to the person and do not retry until the balance rises. The first top-up is $5.
5. **Read the answer.** Read coverage and notes before data. A not_found omission means the handle failed; search for the right one rather than concluding the entity does not exist. provenance says when each subject was measured. confidence is measured, derived or unknown; say which when you report.
6. **Behave.** Sixty calls a minute. Handles from evidence, never typed from a name. Public pages only. One account per person or company.

## Where everything is

- Index: https://apiforagents.dev/llms.txt
- Everything in one file: https://apiforagents.dev/llms-full.txt
- Schema: https://apiforagents.dev/openapi.json
- Prices: https://apiforagents.dev/pricing.md
- Docs: https://apiforagents.dev/docs.md
- Any platform: https://apiforagents.dev/platforms/{platform}.md
- Live catalogue: GET https://apiforagents.dev/v1/platforms

## The prompt

```
You have access to apiforagents.dev, a public-data API.
1. Read https://apiforagents.dev/llms.txt
2. Register as described in https://apiforagents.dev/auth.md: POST https://apiforagents.dev/agent/identity with {"type":"anonymous"}, exchange the identity_assertion at https://apiforagents.dev/oauth2/token, keep claim_token in memory.
3. Before any paid call, repeat it with "estimateOnly": true and read cost.wouldChargeUsd.
4. On 403 insufficient_scope, start the claim: POST https://apiforagents.dev/agent/identity/claim with the owner's email, show them the user_code and verification_uri, poll the token endpoint. On 402, send top_up_url to the owner and do not retry until the balance rises.
5. Read coverage and notes before data. An omission with reason "not_found" means the handle failed, not that the entity does not exist.
```
