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

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

Описание и применение

LLM‑агент Claude Sonnet смог собрать данные о 60 кофейнях на Google Maps без предварительного кода, но потребовал 190‑540 тыс. токенов и 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