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

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

说明与用途

Claude Sonnet 代理在不预先编写代码的情况下,使用浏览器工具抓取了 60 家咖啡店的 Google Maps 数据,准确率 100%,但每条记录耗费 190-540k 处理令牌和 23-35 秒,远高于 Playwright 脚本的 6-14 秒且无模型令牌。混合方法将令牌使用降低 71% ,墙壁时间降低 14%。

问题

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?

结果

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.

工作流

  • 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.

证据

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.

来源

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

来源

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

来源

  • 记录日期: 2026-09-17T05:45:25.924Z