Analyze your leads with Claude Code

Export your Google Maps leads to JSON, load the file into Claude Code, and prompt it to segment, score, and map your pipeline. No spreadsheets, no formulas.

Key takeaways
  • Export a batch of Google Maps businesses as JSON, then open Claude Code in the folder that holds the file
  • Prompt in plain language: segment by rating, count by category, flag weak spots, build a small map. Claude Code writes and runs the code for you
  • The result is a ranked, filtered list you can act on the same afternoon, not a raw dump you still have to clean

Raw leads are data. You want decisions

A fresh export of local businesses is just rows: names, ratings, review counts, categories, phone numbers, coordinates. Useful, but flat. The real question is which of those 400 restaurants or 90 dental clinics deserve a call first, and why.

Claude Code runs in your terminal and can read files in the current folder. Point it at a JSON export and you can ask it questions the way you would ask an analyst. It writes a short script, runs it, and shows you the answer. You describe the goal, it handles the code.

This pairs naturally with the idea of feeding your AI with business data: the model is only as sharp as the structured input you give it. Clean JSON in, clear segments out.

Get the leads to analyze first
Capture Google Maps businesses straight from your browser, then export them to JSON. The Chrome extension is free to install.
Add Chrome Extension
Free download. No trial, no credit card.
1
JSON file is all Claude Code needs to start
0
spreadsheet formulas you have to write yourself
3
prompts to go from raw export to a ranked call list

Export your leads to JSON

Start with a clean batch. Capture a search on Google Maps (for example "physiotherapists in Lyon" or "auto repair in Austin") and export the results. JSON is the format to pick because it keeps nested fields intact: a rating, a review count, and a category stay attached to the right business instead of drifting apart in a spreadsheet.

A single record usually looks like this: a name, an address, a category, a rating, a review count, a website, and latitude and longitude. That is enough for Claude Code to filter, group, score, and plot. If you are new to gathering this kind of data, our guide on prospecting with Google Maps data walks through what to collect.

Save the file somewhere simple, like a leads folder on your desktop. Then open your terminal in that folder and start Claude Code. It can now see leads.json and read it on request.

Prompt it to segment and score

Now the fun part. You are not writing formulas, you are describing outcomes. Here are prompts that turn a flat list into a prioritized one, in order.

What you typeWhat Claude Code does
"Read leads.json and tell me how many businesses there are and what fields exist"Parses the file and prints a quick schema and count so you know what you are working with
"Group them by category and show the average rating and review count for each"Builds a summary table so you see which niches are strong and which are thin
"Flag every business with a rating below 4.0 and more than 50 reviews"Surfaces busy places with reputation gaps, often the warmest sales openings
"Score each lead from 0 to 100 using review count and rating, then sort descending"Writes a small scoring script and returns a ranked call list
"Save the top 40 as shortlist.json"Exports a clean, focused file you can re-import or hand to a teammate

You can refine mid-flight. If the score feels off, say "weight review count more heavily" or "ignore anything with fewer than 10 reviews" and it rewrites the logic. The scoring rule is yours to shape in plain English.

No leads yet? Start here
The Vonsel extension pulls business data from Google Maps and exports it clean, ready for Claude Code. Install it in Chrome in a couple of minutes.
Add Chrome Extension
Free download. No trial, no credit card.

Ask it to visualize

A quick map

"Plot every lead on a map using the latitude and longitude and save it as an HTML file." Claude Code builds a small self-contained page you open in your browser to see territory at a glance.

A rating histogram

"Chart how ratings are distributed across all leads." You instantly see whether your list skews high or has a long tail of underperformers to target.

A category breakdown

"Make a bar chart of how many businesses fall in each category." Useful for deciding which vertical to focus a campaign on this week.

A density heatmap

"Show where leads cluster geographically." Cluster maps tell you where to send a field rep so a single day of visits covers the most ground.

If you plan to plot coordinates on a real basemap, the Google Maps Platform documentation covers the JavaScript API you would drop into the HTML page Claude Code generates.

The point is not to become a data engineer. It is to ask better questions of the leads you already have. Claude Code removes the friction between "I wonder which leads are worth calling" and an answer you can act on in minutes.

A few practical notes

Work in small batches. A few hundred leads per file keeps prompts fast and answers readable. If you have thousands, ask Claude Code to sample or filter first, then dig into the segment that matters.

Mind the data you load. Public business fields (name, address, category, public review count) are low risk. Personal contact details are a different matter, so only process what you are allowed to under your local rules. For context on where the lines sit, see our note on whether it is legal to scrape Google Maps.

Close the loop. Analysis is only worth it if it changes what you do next. Once you have a shortlist, move it into a workflow that tracks outreach. That is exactly the handoff described in our search to CRM workflow guide, and the same territory the Vonsel mapped CRM covers once your leads are captured.

Stop staring at rows. Ask your leads a question and get an answer
Turn Google Maps into a JSON you can analyze
Capture, filter, and export business data from the map, then take it into Claude Code. Explore features or see plans.
Add Chrome Extension
Free download. No trial, no credit card.

Frequently asked questions

What format should I export my leads in for Claude Code?
JSON is the ideal format. It keeps nested fields like ratings, review counts, categories, and coordinates structured, so Claude Code can parse each field without guessing. CSV works too, but JSON preserves relationships between fields more cleanly and is easier to filter, group, and score with a short script.
Do I need to know how to code to analyze leads with Claude Code?
No. You describe what you want in plain language and Claude Code writes and runs the code for you. You can ask it to segment leads by rating, count businesses per category, or build a small map, and it handles the scripting. Reading the output is enough to act on it.
Is it safe to load business lead data into Claude Code?
Public business data such as names, addresses, categories, and public review counts is low risk. Avoid loading personal contact details or anything you are not allowed to process under your local data rules. Keep the file on your own machine, review what you send, and delete exports you no longer need.