# Scrapely for AI agents

> X/Twitter people data any AI agent can buy per call. Search 44M+ profiles and enrich any handle to a full profile. Pay in USDC with x402 (no account), or from a prepaid balance your human funds by card. Failed calls are never charged.

## Prices

- people.search: $0.01 per result returned (max $1.00 per call)
- people.enrich: $0.03 per profile
- people.schema: free

Card top-up: $5.00 minimum. USDC top-up: $1.00 minimum. Default spend cap: $50.00 per key per day (UTC).
Live prices and schemas: https://scrapely.co/.well-known/agent-manifest.json

## 1. Pick how to pay

- **You have a wallet with USDC on base:** use x402. No account, no key. Call the endpoint, get a 402, pay it, call again with the `X-PAYMENT` header.
- **You don't, but a human can pay by card:** register, ask for a checkout link, hand it to your human, then call with your key.

## 2a. Pay per call with x402

1. `POST https://scrapely.co/api/agents/v1/people/enrich` with `{"handle": "jack"}` and no payment.
2. You get HTTP 402 with `accepts[0]`: the exact USDC amount (`maxAmountRequired`, 6 decimals), `payTo`, `asset`, `network`.
3. Sign the payment with your x402 client and repeat the same request with the `X-PAYMENT` header.
4. 200 = delivered and settled; the `X-PAYMENT-RESPONSE` header holds the tx hash. If nothing is delivered (profile not found, zero search results) the payment is never settled, so you pay nothing.

For search, x402 charges for the `limit` you ask for (max 100 rows). The prepaid balance charges only for rows actually returned.

## 2b. Prepaid balance

1. `POST https://scrapely.co/api/agents/register` with `{"label": "my-agent", "framework": "claude"}` (all optional). Save `api_key`: it is shown once.
2. `POST https://scrapely.co/api/agents/topup/card` with `Authorization: Bearer <api_key>` and `{"amount_cents": 500}`. Give `checkout_url` to your human.
3. Poll `GET https://scrapely.co/api/agents/me` until `balance_cents` goes up (seconds after payment).
   Or fund it yourself in USDC: `POST https://scrapely.co/api/agents/topup/x402` with `{"amount_cents": 500}`, pay the 402.
4. Call any endpoint with `Authorization: Bearer <api_key>`. Every reply has `charged_cents` and `balance_cents`.

## 3. Endpoints

### Search people — $0.01 per result returned (max $1.00 per call)
`POST https://scrapely.co/api/agents/v1/people/search`
```json
{"bio_contains": ["founder"], "location_contains": ["San Francisco"], "min_followers": 500, "limit": 20}
```
Add `"count_only": true` to get just the number of matches, free. Filters: bio_contains, bio_contains_all, bio_excludes, name_contains, location_contains, location_excludes, handle_contains, min/max_followers, min/max_following, has_website, min/max_updated_at, sort_by, sort_order, limit (1-100), offset.

### Enrich a profile — $0.03 per profile
`POST https://scrapely.co/api/agents/v1/people/enrich` with `{"handle": "jack"}`. Name, bio with real links, followers, following, location, verified.

### Schema — free
`GET https://scrapely.co/api/agents/v1/people/schema`

## 4. Replies

Success: `{"request_id", "rail": "balance"|"x402"|"free", "charged_cents", "balance_cents", "data": {...}}`.

| Status | Meaning | What to do |
|---|---|---|
| 400 | Invalid input | Fix the field named in `message`. Nothing charged. |
| 401 | Missing or unknown key | Register, or check the Bearer header. |
| 402 | Payment required / balance too low | Pay `accepts[0]` with x402, or top up. |
| 403 | Key suspended | Email agents@scrapely.co. |
| 404 | Profile not found | Nothing charged. |
| 429 | Daily cap or rate limit | Wait until 00:00 UTC, or email agents@scrapely.co to raise the cap. |
| 502 | x402 settlement failed | Result withheld, nothing charged. Retry. |
| 503 | Temporarily unavailable or storefront closed | Retry later. Nothing charged. |

## 5. More

- OpenAPI: https://scrapely.co/api/agents/openapi
- Skill file: https://scrapely.co/agents/SKILL.md
- Already a Scrapely subscriber? Use your plan's API key and the MCP server (https://mcp.scrapely.co/mcp) instead: DMs, campaigns and more.
- Human contact: agents@scrapely.co
