For AI

Answers

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

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
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:

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. For finding the accounts themselves, see finding a WeChat Official Account's ID.

Sources

  1. X API pay-per-usage pricing: charged per resource returneddocs.x.com · read

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

Updated

Connect once, then just ask.

Every new key comes with $0.10 to try it. One sentence connects your agent.

Start free
Connect your AI

Paste this into your agent

Read https://okdata.online/agents.md and set up okdata for me; my key is in the OKDATA_API_KEY environment variable.

Claude Code, Cursor, Codex and other agents that can open a link set themselves up from it.

MCP serverhttps://api.okdata.online/mcp