fetchapi

How to spend less on data API calls: where the money really goes

By FetchAPI · 8 October 2026 · 4 min read

Most of a data API bill comes from a few per-row calls and from asking for the same thing twice. Seven ways to get the same data for less.

Most of a data API bill comes from a handful of expensive calls and from asking for the same thing twice. A few calls priced per row can cost more than thousands of flat-priced ones, and a request repeated after it already succeeded buys nothing new. Fix those two things before you shop for a cheaper provider.

Your own breakdown is on /account under "Where your money goes": spend by endpoint, repeat requests, and a cheaper endpoint for the same job where the catalogue has one.

Where the money goes

Compare list prices, not call counts. On DataForSEO, a Google results page is $0.002 live, while an AI-mentions search is $0.10 per request plus $0.001 per row, so a single 1,000-row call costs up to $1.10: as much as 550 results pages. The calls priced per row are where a bill grows.

1. Ask for the rows you will read, not the maximum

DataForSEO's LLM Mentions search charges $0.10 per request plus $0.001 per row returned. A call with limit: 1000 costs up to $1.10; the default 100 rows cost $0.20.

A test call with limit: 10 cost $0.11 and its total_count showed how many mentions exist in all, so you know exactly how many rows a full pull would buy before buying them.

The same pattern holds wherever a price has a per-item part: DataForSEO Labs Ranked Keywords is $0.012 per task plus $0.00012 per keyword, so a 1,000-keyword answer costs $0.132 and a 100-keyword answer about $0.024.

2. If you only need the count, call the summary endpoint

Many APIs have a cheap "how many" endpoint next to the expensive "list them all" one. llm_mentions/aggregated_metrics returns the mention totals by platform and location for about $0.10: one row, no list. If the question is "is this brand mentioned in AI answers, and how much", that is the call. Pull the rows only for the targets that clear your threshold.

3. Cache what does not change between calls

A company profile, an app record or last month's search volume does not change in an hour, so a second identical request pays again for the answer you already have. Store each answer with the time you fetched it and reuse it for as long as the data can't have moved (a day for profiles, a month for monthly metrics).

# one call, saved; re-read the file instead of calling again
curl -s "https://fetchapi.co/api/gw/dataforseo/ai_optimization/llm_mentions/aggregated_metrics/live" \
  -H "x-api-key: $FETCHAPI_KEY" -H "content-type: application/json" \
  -d '[{"target":[{"domain":"example.com"}],"location_code":2840,"language_code":"en","platform":"google"}]' \
  > cache/example.com-llm-mentions-$(date +%F).json

4. Use the queue when you don't need the answer this second

DataForSEO prices the same Google results page three ways: $0.0006 in the standard queue (task_post, then task_get when it's ready), $0.0012 with priority, and $0.002 live. A nightly rank tracker has no reason to pay the live price: the queue is 3.3x cheaper for the identical page.

5. Pick the cheapest endpoint for the job, not the first one you find

The same job often has several routes in the catalog at very different prices. Listing a TikTok user's latest posts costs about $0.00002 a call through tiktok-scraper7 and about $0.002 through tiktok-api6: a 100x difference for the same list. We wrote up why in Why the same TikTok data costs 100x more from one API than another. On /account, any endpoint you use that has a cheaper same-job route is flagged with the price.

6. Watch the calls whose price isn't fixed

Some prices depend on what you send. DataForSEO's LLM Responses (ChatGPT, Claude, Gemini answers) charge a task fee plus the model's own token charge, so a long prompt or a long answer costs more. Keep prompts short and cap the output length when the API lets you.

7. Don't pay for failures, and don't retry blindly

FetchAPI does not charge for a failed call (terms), and the gateway reads the body too, so a provider answer that says HTTP 200 but carries an error is treated as a failure. Retrying a request that failed because the input was wrong just fails again; retry only on timeouts and 5xx, with a back-off. The hidden costs post covers retries and failover in detail.

A checklist before you run a job at scale

  1. Run it on 10 inputs and read the upstream cost per call (every gateway answer carries it in meta.cost_usd).
  2. Set limit / depth to what you will read.
  3. Use the summary endpoint if you only need counts.
  4. Cache by request; reuse within the data's natural refresh period.
  5. Use queued modes for anything that can wait.
  6. Check /account after the first day: the "Where your money goes" table shows the top endpoints and any cheaper same-job route.

Get a key on /account, browse prices per call in the catalog, or connect the MCP server and let your agent call get_usage to see its own spend.

Sources and data

Real calls made for this post through the FetchAPI gateway:

  • dataforseo ai_optimization/llm_mentions/search/live one target domain, platform google, limit 10: HTTP 200, 10 items, 1898 ms, cost $0.11 on 2026-10-08 15:53 UTC
  • dataforseo ai_optimization/llm_mentions/aggregated_metrics/live one target domain, platform google: HTTP 200, 1 items, 1261 ms, cost $0.101 on 2026-10-08 15:53 UTC
Call these APIs with one key.

Every endpoint is tested daily and metered at the provider's price; failed calls are free.