# What do "per item" and "max charge" mean on a data API price?

> Per-call versus per-item pricing on a data API: how a per-item call is billed for what it returns, why there is a maximum charge per call, and how to budget with both.

Canonical page: https://okdata.online/answers/per-item-price-max-charge/

**Short answer: **A per-item price is charged for each result a call returns; the max charge caps one call at a full page. On okdata the per-item endpoint is Official Account search: $0.058 per account returned, at least one, and never more than $0.58 a call. Every other endpoint is per call, so its price is also its maximum.

Data APIs price in one of two units. Per call means one request costs the same whatever it returns. Per item means you pay for each result in the response, so a request that finds three things costs less than one that finds ten. X's own API is an example of the second kind: its pay-per-usage page charges per post or user returned. A per-item price needs a ceiling, or you could not know a call's cost before making it. That ceiling is the max charge.

## How okdata applies it

| | Per-call endpoints (almost all) | Per-item: [Official Account search](/apis/wechat_mp/accounts/search/) |
|---|---|---|
| Price | Per call, e.g. $0.02 for a Douyin search page | $0.058 per account returned |
| Fewest items charged | Not applicable | 1, even when nothing matches |
| Max charge per call | Equal to the price | $0.58, a full page of 10 accounts |
| Next pages | Each page one call | Each page billed per account again |

Every endpoint page shows the unit next to the price. Official Account search is the only per-item endpoint in the catalog today.

## Worked examples

| Search | Accounts returned | Charge |
|---|---|---|
| `query=36氪`, a full first page | 10 | $0.58 |
| A precise account name with three matches | 3 | 3 × $0.058 |
| A name with no match | 0 | $0.058 (one item minimum) |
| 20 brand names, budgeted at the worst case | up to 200 | at most $11.60 |

## Max charge and your balance

The max charge is what a call can cost, so it is what your balance must cover. When it cannot, a per-call endpoint answers `insufficient_balance`, which is not charged. Official Account search is gentler: if your balance is below a full page, the first page shrinks to as many accounts as the balance pays for, and that shortened page has no next page. Top up to get full pages again.

## Example

Check what a call actually cost, from the response itself:

```bash
curl -s -G "https://api.okdata.online/v1/wechat_mp/accounts/search" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'query=36氪' \
  --data-urlencode 'fields=id,name' \
  | jq '{charged: .meta.billing.amount, accounts: (.data.items | length), balance: .meta.billing.balance_after}'
```

To budget a batch, multiply the number of calls by the max charge; that is the most the batch can cost. The real bill is usually lower, because exact names rarely return a full page.

## Limits

- A call that reached the data source is charged even when it comes back empty, not found or failed: one item on a per-item endpoint, the price on a per-call one. Calls stopped before that, such as bad parameters, are free.
- The one-item minimum means a list of 100 names that all miss still costs 100 × $0.058. Clean the list first.
- Retrying with the same `Idempotency-Key` within 24 hours returns the stored result without a new charge.

For converting other vendors' units into one comparable number, see [comparing data API prices quoted per call, per result or per credit](/answers/compare-data-api-pricing-units/). For finding the accounts themselves, see [finding a WeChat Official Account's ID](/answers/find-wechat-official-account-id/).

## Endpoints used

- [Official Account search](https://okdata.online/apis/wechat_mp/accounts/search/) `wechat_mp.accounts.search`: $0.058 per account · at most $0.58 per call

## More about WeChat Official Accounts

- [WeChat Official Accounts API](https://okdata.online/apis/wechat_mp/)
- [WeChat Official Account API in Python for RAG (2026)](https://okdata.online/guides/wechat-official-account-api-python/)
- [How to get a WeChat Official Account's articles and full text](https://okdata.online/guides/wechat-official-account-articles/)
- [How much does a WeChat Official Account article API cost?](https://okdata.online/answers/wechat-official-account-api-price/)
- [Why can't ChatGPT or Claude read a WeChat article link, and how do I fix it?](https://okdata.online/answers/ai-read-wechat-article-link/)
- [How do I compare data API prices quoted per call, per result, per credit or per GB?](https://okdata.online/answers/compare-data-api-pricing-units/)
- [How do I export all articles of a WeChat Official Account without logging in?](https://okdata.online/answers/export-wechat-official-account-articles/)
- [Am I charged when a data API call fails or finds nothing?](https://okdata.online/answers/failed-api-calls-charged-refund/)
- [How do I find a WeChat Official Account's biz or original ID (gh_)?](https://okdata.online/answers/find-wechat-official-account-id/)
- [Official platform APIs vs third-party data APIs (2026)](https://okdata.online/compare/official-apis-vs-data-apis/)
- [MCP servers for social media data: self-hosted vs hosted](https://okdata.online/compare/social-media-data-mcp-servers/)
- [WeChat article APIs: official vs third-party vs open-source (2026)](https://okdata.online/compare/wechat-article-data-apis/)
- [Ways to get WeChat Official Account data: the official API, RSS bridges and data APIs](https://okdata.online/compare/wechat-official-account-data-apis/)
- [Xiaohongshu, Douyin and WeChat MCP servers: self-hosted vs hosted](https://okdata.online/compare/xiaohongshu-douyin-wechat-mcp-servers/)

## Sources

- [X API pay-per-usage pricing: charged per resource returned](https://docs.x.com/x-api/getting-started/pricing) (read 2026-11-12)

Where people asked this (read 2026-11-12): 

- https://devcommunity.x.com/t/are-2-tweets-search-requests-charged-per-request-per-post-returned-or-both/258982
- https://devcommunity.x.com/t/i-was-charged-for-4k-posts-while-ive-only-received-around-500-posts/256385

Updated 2026-11-12
