# Credits and billing

> A credit is one page of ads or one ad with its detail. A call uses 1 credit, LinkedIn 2, and only when it returns ads. Empty pages, errors and the sandbox are free.

Base URL: `https://api.publicadsapi.com` · Auth: `authorization: Bearer <key>` · Web version: https://publicadsapi.com/docs/credits

## What a call uses

| Call | Credits |
| --- | --- |
| GET /v1/meta/ads with ads | 1 |
| GET /v1/google/ads with ads | 1 |
| GET /v1/tiktok/ads with ads | 1 |
| GET /v1/linkedin/ads with ads | 2 |
| GET /v1/ads/{id}, ad found | Meta 1, Google 1, TikTok 1, LinkedIn 2 |
| A search with no ads | 0 |
| Any error, a block or a timeout | 0 |
| Any call with a sandbox key | 0 |
| POST /v1/agent/signup, POST /v1/agent/live-key | 0 |

LinkedIn uses 2 because LinkedIn blocks about half of all lookups, and each blocked one is retried on a new connection.

## Credits in every response

| Where | What it is |
| --- | --- |
| credits_used, X-Credits-Used | Credits this call used. |
| credits_remaining, X-Credits-Remaining | Live keys: what's left of this month's included credits. `null` (and no header) for sandbox keys and Enterprise. |
| X-RateLimit-Limit | Live keys: this month's included credits. |
| X-RateLimit-Remaining | Live keys: included credits not yet used. |
| X-RateLimit-Reset | Live keys: when they renew, in Unix seconds. |

## Plans

| Plan | Price | Credits a month | Extra credits | Requests a second per key |
| --- | --- | --- | --- | --- |
| Free | $0 | 100 | $0.0025 each with a card on file | 5 |
| Starter | $19 a month | 8,000 | $0.0025 each | 20 |
| Growth | $49 a month | 25,000 | $0.0020 each | 50 |
| Enterprise | By agreement | By agreement | By agreement | Set for your traffic |

Prices are in US dollars. Credits run by calendar month in UTC and renew on the 1st; unused ones do not carry over. Paid plans and extra credits are billed monthly by card through Stripe, and you can cancel any time. See [Pricing](https://publicadsapi.com/pricing).

## When credits run out

- **Free, no card:** live calls answer `402 QUOTA_EXCEEDED` with `upgrade_url` (Starter) and `add_card_url` (extra credits on Free) until the 1st. Sandbox calls keep working.
- **Free with a card, Starter and Growth:** calls carry on, and each credit past the month's included ones is billed at the plan's extra credit rate.
- **A LinkedIn call** needs 2 credits, so with 1 left on Free it is refused: the message says so.
- **An unclaimed agent account** has 50 live credits a month, then `402 QUOTA_EXCEEDED` with `claim_url`: see [Agents](https://publicadsapi.com/docs/agents.md).

We email the account at 80% and at 100% of its included credits, and the dashboard shows each day's use by platform.

See also: [Errors](https://publicadsapi.com/docs/errors.md) · [Rate limits](https://publicadsapi.com/docs/rate-limits.md)
