Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I Had an AI Agent Scrape Google Maps Instead of Writing a Scraper. Here’s What It Cost.

Description and use

Claude Sonnet, an LLM agent with browser tools, scraped 60 coffee shops on Google Maps without pre‑written code, achieving 100 % accuracy but at 190‑540 k processed tokens and 23‑35 s per record, versus a Playwright script that ran 6‑14 s per URL with zero model tokens. A hybrid strategy reduced token usage by 71 % and wall time by 14 %.

Problem

Can an LLM agent replace a hand‑written scraper for a simple site like Google Maps, and what are the cost and performance trade‑offs?

Outcome

The agent achieved 100% field accuracy across 60 rows but incurred 190k–540k processed tokens and 23–35 s per place, whereas the script ran 6–14 s per URL with zero model tokens. A hybrid approach cut weighted tokens by 71% and wall time by 14% compared to full agent runs.

Workflow

  • 1. Run Claude Sonnet with browser tools to search "coffee near" and collect name, rating, review count, address, and phone for each result.
  • 2. Measure token usage and wall time per run using a custom script.
  • 3. Compare results to a Playwright script that re‑fetches known URLs and handles async widgets.
  • 4. Analyze accuracy by field‑by‑field comparison and a second automated browser re‑check.
  • 5. Identify trade‑offs: agent slower and token‑heavy but more graceful on failures; script faster but brittle.
  • 6. Experiment with hybrid approach: use script for bulk, agent for missing review counts and failures.
  • 7. Refine agent strategy by writing a recipe based on earlier transcript to reduce model calls and context growth.

Evidence

The agent got every field right on every checked row, but cost 190k-540k processed tokens and 23-35 seconds per place, against 6-14 seconds and zero model tokens for the script.

Source

Zero true value mismatches on name, rating, address, or phone across all 60 rows.

Source

The plain script is roughly 1.6x to 5.7x faster per URL and burns zero model tokens once written.

Source

  • Record date: 2026-09-17T05:45:25.924Z