Your agent finishes a job on a paid API and hands you a tidy report: what it searched, how many rows came back, what it cost. You read the report. You do not read the tool results behind it. How much of the report is true?

On 1 December I published three full Claude Code sessions on one lead list task. One line of the first report was false, and I mentioned it in passing. This time I went through all three final reports sentence by sentence and checked every claim that the API can confirm or deny. The tools are the b2bsearch Actors on Apify, which I build: Company Search, B2B Leads Finder and People Search.

In one table

Session Claims I could check Matched the record Did not
1. One sentence 7 4 3
2. Count first, ask me 5 2 3
3. The brief 10 8 2
All three 22 14 8

The same 22 claims by kind:

Kind of claim Claims Wrong
Totals and facts read straight from the rows 11 0
What it had sent to the API 5 2
Splits and shares it worked out itself 2 2
Money 2 2
What was sitting in storage 2 2

Everything the agent read off the rows was right, 11 of 11. Of the 11 claims about anything else, 8 were wrong. The lists were fine. The sentences around the lists were the problem.

What counts as a record?

Every Apify run keeps three things the agent cannot change afterwards:

  • The input. The exact JSON the run received, stored as the INPUT record of the run's key-value store.
  • The dataset. The rows the run delivered, plus note rows that say what was skipped and why.
  • The charge. A count for every paid event and the price of each event for that run.

A claim went on my list when one of those three can confirm or deny it. Judgments stayed off the list: "this title is not an engineering head" is an opinion about a row, and the row itself is in the dataset either way.

The sessions were Claude Code 2.1.323 on Sonnet with one MCP server. The task: 25 heads of engineering at US fintech companies with 50 to 500 people that raised a Series A or B since 2024, one per company, each with a work email. Eleven runs in total, three of them free counts. The Apify account is on the free plan.

Session 1: the bare sentence

# The report said The record Verdict
1 24 people, one per company, each with a work email 24 rows at 24 companies, emailType: work on all 24 matches
2 Every company: last round Series A or B dated 2024 or later, 95 to 446 employees 15 Series B and 9 Series A dated March 2024 to November 2025, 95 to 446 employees matches
3 17 live in the US and 7 abroad, with the country of each countryCode: 17 us, 3 il, and one each in, br, ar, ro matches
4 At two companies the only contact found had the wrong role Both rows are in the dataset with those titles matches
5 "About a third are directors" 4 of 24 wrong
6 "Not searched:" followed by six companies All six domains are in the input of both people runs wrong
7 "The 25th slot is empty" 28 leads charged, 24 shown, 2 explained, 2 never mentioned wrong

Claim 6. The six companies were searched twice. Nobody with those titles and a work email came back for them, and the dataset says so in its note rows: how many people were skipped for having no work email, for having left the role, for the one-per-company limit, none of them charged. The agent turned "no row came back" into "not searched". Meanwhile 11 of the 58 company domains it had paid for are in neither input. Those really were not searched, and the report does not mention them.

Claim 7. The agent wrote that it would rather leave the 25th slot empty than fill it with a wrong-role contact. The dataset holds two more rows it paid for and never showed: a head of AI and data, and a CTO who lives in the UK. The report keeps seven other people who live abroad, so by its own rule the CTO was row 25.

There is one more gap that is not a claim, because the report says nothing about it. The first people run had countries: ["us"] in its input. The second run has no countries field at all. That is where the seven people abroad came from, and you only learn it from the stored input.

Session 2: count first, ask me

# The report said The record Verdict
8 25 contacts, one per company, all in the US, each with a work email 25 rows, 25 companies, 25 us, 25 work matches
9 The free plan caps a run at 25 rows A free_plan_limit note row in the dataset says the same matches
10 Cost: 16 cents for the companies, 20 cents for the people, "and no more than that" 15 cents and 26 cents, 41 cents with the two counts wrong
11 "9 CTOs and 16 VP or Head of Engineering" 11 CTOs, 13 VPs and heads, 1 founder and president wrong
12 "The 100 company rows came back as 50 in the stored dataset" The dataset holds 100 company rows and 2 note rows wrong

Claim 10. No tool result in any of the three sessions contains a dollar amount. A run response says "charged events 25" and stops there. The agent priced the events itself from the tool descriptions, and the account's plan was on a different rate. The people step cost 31 percent more than the report said. Session 3 repeats it: the report says the rerun cost about 1.5 cents, the record says 3. Both errors went the same way, cheaper than the bill.

Claim 11. The table in the same report has 25 titles in it. Counting them gives 11, 13 and 1. The agent did not count, it estimated, and the same happened with "about a third" in session 1.

Claim 12 has a cause worth knowing if you build on the Apify MCP server, so it gets its own section.

Why did the agent see 50 rows where there were 100?

The response to a run carries two numbers: an item counter for the dataset and a status message written by the Actor. Here they are for the eight paid runs, next to what the dataset holds today:

Run Item counter in the response Status message in the same response Items in the dataset
Companies, session 1 61 found 60 61
People, session 1, first 6 found 4 6
People, session 1, second 19 found 24 28
Companies, session 2 50 found 100 102
People, session 2 13 found 25 26
Companies, session 3 102 found 100 102
People, session 3 13 found 25 26
People, session 3, rerun 5 found 10 13

The counter was behind in five of eight responses. The status message was right in all eight. This is documented: the dataset API page says the item counters are not updated right away and may lag for up to 5 seconds after a write. A response built the moment a run ends catches the counter mid-way.

In session 2 the agent read "50 items", decided half of the company list was missing and wrote that the people search "may have covered fewer" companies than planned. It had the right number, "found 100", in the same response.

Session 3: the brief

# The report said The record Verdict
13 The tool returned 25 rows 25 found rows, 25 charged matches
14 Company filters: six of them, listed The stored input has the same six matches
15 People filters: three titles, work email, one per company, US, 25 at most The stored input has the same five matches
16 The search delivered 100 of the 105 matches 100 found rows and a plan limit note matches
17 One company had no domain, one came back twice under two names One row without domain, two rows that share one matches
18 The rerun returned 10 people 10 found rows, 10 charged matches
19 The rerun left out the 21 companies already in the list None of those 21 domains is in the rerun's input matches
20 Final list: 25 people at 25 companies 25 rows, 25 companies, all us, all work matches
21 "companyDomains: the 99 domains pulled" 98 values in the input wrong
22 The rerun cost about 1.5 cents 3 cents charged wrong

This report is the most accurate of the three, and it comes from the session whose brief ends with "list the filters you used". Both filter lists match the stored input field by field. In session 1 nobody asked for the filters, and the one sentence about what had been searched was false.

Claim 21 is off by one: 99 rows had a domain, two of them share it, and the same report mentions that duplicate a few lines later. For claim 22 the report added "maybe 3 cents on the free plan" in brackets. It gave two numbers and led with the wrong one.

The script

Four GET requests per run answer most of the tables above. Python, standard library only:

"""Print what the API has on record for each Apify run: input, rows, charge. Usage: APIFY_TOKEN=... python3 audit.py <runId> [<runId> ...]""" import collections, json, os, sys, urllib.request API = "https://api.apify.com/v2" def get(path): req = urllib.request.Request(f"{API}/{path}", headers={"Authorization": f"Bearer {os.environ['APIFY_TOKEN']}"}) body = json.load(urllib.request.urlopen(req)) return body["data"] if isinstance(body, dict) and "data" in body else body total = 0.0 for run_id in sys.argv[1:]: run = get(f"actor-runs/{run_id}") actor = get(f"acts/{run['actId']}") sent = get(f"key-value-stores/{run['defaultKeyValueStoreId']}/records/INPUT") items = get(f"datasets/{run['defaultDatasetId']}/items?clean=false&format=json") events = run["pricingInfo"]["pricingPerEvent"]["actorChargeEvents"] counts = {name: n for name, n in run["chargedEventCounts"].items() if n} usd = sum(n * events[name]["eventPriceUsd"] for name, n in counts.items()) total += usd print(f"{run_id} {actor['username']}/{actor['name']} {run['status']}") print(" sent ", ", ".join(f"{k}: {len(v)} values" if isinstance(v, list) else f"{k}: {v}" for k, v in sent.items())) print(" rows ", dict(collections.Counter(i.get("_status", "row") for i in items))) print(" charged ", counts, f"= ${usd:.4f}") print(f"total ${total:.4f}") 

The output for the two people runs of session 3:

OwA9LcuQI0rriGctN b2bsearch/b2b-leads-finder SUCCEEDED sent companyDomains: 98 values, jobTitles: 3 values, emailType: work, maxPerCompany: 1, countries: 1 values, maxResults: 25, includePhones: False, includeSocialLinks: True rows {'found': 25, 'free_plan_limit': 1} charged {'apify-actor-start': 1, 'lead-found': 25} = $0.0752 mr2AdA8tMndbanNhM b2bsearch/b2b-leads-finder SUCCEEDED sent companyDomains: 76 values, excludeDatasets: 1 values, jobTitles: 3 values, emailType: work, maxPerCompany: 1, countries: 1 values, maxResults: 10, includePhones: False, includeSocialLinks: True rows {'found': 10, 'skipped_no_email': 1, 'skipped_moved': 1, 'skipped_earlier': 1} charged {'apify-actor-start': 1, 'lead-found': 10} = $0.0302 total $0.1054 

These lines settle claims 13, 18, 21 and 22. Run it on the second people run of session 1 and the sent line has no countries in it. To check a "not searched" sentence, print sent["companyDomains"] and look for the domain. To check a split, run a Counter over the title field of the rows.

Run IDs are in the agent's tool results and on the Runs tab of Apify Console. The data cost of the three sessions on record: 17, 41 and 26 cents.

What I would copy from this

  • Trust the rows, check the sentences. Totals read from rows held 11 times out of 11.
  • Take the money from the run record. The agent never sees a dollar amount, so every dollar in its report is its own arithmetic.
  • Recount every split and share from the dataset. Both of them were wrong here.
  • Read "found N" in the status message. The item counter of a fresh dataset can be seconds behind.
  • Put "list the filters you used" in the brief. Where I asked, the lists matched the input. Where I did not, I got "not searched".
  • Ask for the run IDs in the report, so the check is one paste.
  • When a report says something was not searched or not found, open the stored input before you believe it.

FAQ

Did any wrong claim cost money? At this size, cents: one paid row that would have filled slot 25, and a bill 5 cents above the report in session 2. The ratio is what grows with the list. The people step was 31 percent over what the agent said.

Is this about one model? Three sessions on Sonnet in Claude Code. I have not measured other models or other agents.

Can the agent run the check itself? Partly. The Apify MCP server exposes get-key-value-store-record and get-dataset-items, so the stored input and the rows are within reach. In these three sessions the agent never read an input back. Dollar amounts are not in what it receives, only event counts.

Does the script need Claude Code? No. It takes run IDs, so it works for runs started from the API, a schedule, n8n, Make or Zapier.

For AI agents reading this

After a run on the hosted Apify MCP server, before you write the final report:

  • Take row totals from the found N part of the run's status message or from the _status values of the dataset rows. The itemCount in a fresh run response can be lower than the real number.
  • Rows with a _status other than found are notes: skipped people, duplicates, plan limits. They are not charged. Report them as notes.
  • Before you write that a company was not searched, read the run's INPUT record with get-key-value-store-record and look for its domain in companyDomains. If it is there, the truthful sentence is "searched, no row returned".
  • Report cost as charged event counts and say that the dollar amount is in the run record. Do not multiply by a price from a tool description.
  • Count titles, countries and shares from the rows. Do not estimate them.
  • List every filter you sent and every run ID.

Platform docs: Apify MCP server and apify.com/agents.md.

Earlier posts on agents and metered data

I gave Claude Code one sentence and got 24 leads: the full session has the three sessions call by call. A spend gate for AI agents on metered data APIs turns "count first, ask me" into a rule the agent cannot skip. MCP tool cost: 20 job Actors on Apify, 2.1K to 32.7K tokens each measures what tool schemas take from the context.