DEV Community

Cover image for Local Lead Generation with Yelp Data: How to Scrape Yelp Search Results in 2026
Truffle Pig Data
Truffle Pig Data

Posted on

Local Lead Generation with Yelp Data: How to Scrape Yelp Search Results in 2026

If you sell anything to local businesses, Yelp is one of the best prospect databases that exists: ranked listings, review counts that signal how established a business is, price tiers, phone numbers, neighborhoods. Getting that out of the site programmatically is the annoying part. The Yelp Search API on Apify does it for you: a search term and a location go in, and the ranked business listings come out as clean JSON.

Disclosure: the Apify links in this post are affiliate links. If you run the Actor, I may earn a referral commission at no extra cost to you.

Doesn't Yelp already have an API?

It does. The Yelp Fusion API is official, documented, and worth knowing about. It also comes with the usual official-API friction: key registration, daily call quotas, terms that constrain how you store and reuse the data, and responses shaped by what Yelp chooses to expose rather than what the search page shows. The ranked results page, with its sponsored slots and refinement filters, is its own thing. A scraper you call like an API gives you that page as data, with no key and no quota negotiation, which is usually what local lead generation work actually needs.

What the Yelp Search API returns

The Yelp Search API returns ranked local business listings as structured JSON: name, rating, review count, price tier, categories, phone, neighborhood, and the place IDs you need to pull full details later.

Field Example Notes
Business name Brooklyn Smile Dental As ranked on the page
Rating 4.7 Star rating
Reviews 284 Review count, a proxy for how established they are
Price $$ Yelp's price tier
Categories dentists, cosmetic dentists Yelp category aliases
Phone (718) 555-0139 The outreach field

Each result also carries a filters object listing the valid category, price, feature, distance, and neighborhood refinements for that search, so you can discover legal filter values straight from the data instead of guessing.

Who this is for

Local lead generation shops building B2B lists by trade and metro. Agencies pitching reputation or marketing services who want review counts and ratings attached to every prospect. And data teams who need a ranked snapshot of a local market, whether that's dentists in Brooklyn or every $$ restaurant near a ZIP code.

The manual way, and where it breaks

Yelp's search results render through heavy client-side code, the markup is deliberately unfriendly to parsers, and unattended scripts meet the anti-bot wall quickly. The refinement system runs on URL parameters (find_desc, find_loc, cflt, attrs) that are documented nowhere, so you reverse-engineer them from your browser bar. I did exactly that while building this Actor, and I can report the parameters change just often enough to keep a DIY scraper permanently on your maintenance list.

The faster way: run the Yelp Search API

Apify Console

  1. Open the Yelp Search API and click Try for free.
  2. Set location (city, address, or ZIP) and optionally a search_term.
  3. Run it and export the listings as JSON or CSV.

REST

curl -X POST "https://api.apify.com/v2/acts/johnvc~yelp-search-api/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "search_term": "plumbers", "location": "Chicago, IL", "sort_by": "review_count", "max_pages": 2 }'
Enter fullscreen mode Exit fullscreen mode

Standard Apify run endpoints; reference in the Apify API docs.

Search Yelp in Python

from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run = client.actor("johnvc/yelp-search-api").call(
    run_input={
        "search_term": "dentists",
        "location": "Brooklyn, NY",
        "sort_by": "rating",
        "max_pages": 2,
    }
)

for biz in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(biz.get("rating"), biz.get("phone"), biz.get("categories"))
Enter fullscreen mode Exit fullscreen mode

Twenty listings, sorted by rating, with phone numbers attached: that's a cold-call sheet in about ten lines.

Build B2B lists by ZIP code

The task Find dentists by ZIP code for B2B lead lists shows ZIP-level targeting, the granularity most sales territories are drawn in.

Target one borough at a time

Find dentists in Brooklyn for lead generation is the metro version of the same play, ready to clone for your own city and niche.

Cover the trades

Find plumbers in Chicago for lead generation applies the pattern to home services, where review count doubles as a longevity signal.

Rank the best restaurants in a city

Find the best restaurants in Newark uses rating sort for a market snapshot rather than a lead list.

Clone it for the next market

Find the best restaurants in Oakland is the same search pointed at another coast, which is the whole point: one saved task per market, run on demand.

Yelp MCP: let your agent search listings

Through Apify's MCP server, the Actor is callable from Claude, Claude Code, and Cursor as a tool. Ask "find the ten highest-rated plumbers in Chicago and give me their phone numbers" and the agent runs a real search instead of inventing plausible-sounding businesses. Setup is a one-time config, and you can read more about Claude at claude.ai.

FAQ about the Yelp scraper

Is the Yelp scraper free, and what does it cost after that?

Runs bill one cent per results page (about 10 businesses) plus a one-cent setup fee, so a 100-listing pull costs roughly eleven cents. New Apify accounts ship with free platform credit that covers early runs.

Why use a scraper instead of the Yelp Fusion API?

Use Fusion when its quotas and terms fit your project; it's a fine API. Use the scraper when you want the ranked search page itself, filters and all, without key management or daily caps, and in a shape built for exporting lead lists.

Can Claude run this Yelp scraper through MCP?

Yes. Registered as an MCP tool it works from Claude, Claude Code, and Cursor, returning the same structured listings a direct run produces.

Can I schedule the Yelp scraper for rank tracking?

Yes. Multi-location brands do this to watch where each location ranks for its core search. Save a task per location-query pair, attach an Apify schedule, and diff positions over time, starting from the Yelp Search API.

What data will the search scraper not give me?

Whatever the results page doesn't show: no email addresses, no full review text, no hours. It returns place IDs precisely so you can chain a second Actor for depth on the businesses that matter.

More from Truffle Pig Data

The chain I just mentioned: the Yelp Place API turns place IDs into full business detail, the Yelp Reviews API pulls the review text, and the Google Local API gives you the same market from Google's side for comparison.

Wrapping up

Local lead generation runs on fresh, ranked, filterable business data, and Yelp has exactly that. The Yelp Search API hands it to you as JSON; start with one niche in one city and scale from there.

Top comments (0)