To access a public Yelp page from your own code, send its URL and a country to the QuanticData Web Unlocker and read the HTML that comes back. On 21 November 2026 we read 19 public Yelp business and search pages this way, median 3.4 seconds, and parsed name, rating, review count, address, phone, categories and hours with 68 lines of Python.
The pages, the seconds, the bytes and the parser output below come from that run.
What you can do with a Yelp page in your code
The call returns the page as HTML. What you do with it is up to your code:
- Check a listing. Read the page of your own business and see the name, rating, review count, address, phone and hours it shows.
- Read it with a chosen country. The
countryfield of the call sets where the request comes from. Our run usedus. - Hand it to a script or an AI agent. The body is plain HTML. On the REST API,
formatset tomarkdownortextconverts the result for a language model. - Collect business facts. Parse the HTML into rows, as the Python script further down does.
The request: a URL and a country
You call the Web Unlocker with a URL and a country. This is the Python call from the Web Unlocker page with a Yelp business URL in it; the last lines print three fields of the response and save the body:
import requests
r = requests.post(
"https://app.quanticdata.io/api/v1/scraper/unlock",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"url": "https://www.yelp.com/biz/sawada-coffee-chicago", "country": "us"},
timeout=130,
)
page = r.json()["payload"]
print(page["status"], page["latency_ms"], page["cost"])
if page["status"] == 200 and "star rating" in page["body"]:
open("business.html", "w", encoding="utf-8").write(page["body"])
The response says what happened: status is the status of the page, latency_ms is the time and cost is what the call cost. The last two lines save the body when the status is 200 and the body holds a star rating.
For this post we called the same service through our MCP tool, with the same two parameters: the URL and country set to us. The numbers below come from those calls. Everything else was left at its default. A search page works the same way: put a URL such as https://www.yelp.com/search?find_desc=coffee&find_loc=Chicago%2C+IL in the url field.
What came back in our test
On 21 November 2026, between 10:26 and 10:32 UTC, we read 19 public Yelp pages, one call at a time. Each page in the table was checked for content: a business page had the name, rating, review count and address in the body; a search page had at least ten results with their ratings.
| Page type | Pages read | Median time | Fastest and slowest | Body size |
|---|---|---|---|---|
| Business pages | 13 reads of 7 businesses | 4.3 s | 2.0 s and 12.1 s | 1.65 to 1.88 MB, median 1.84 MB |
| Search pages | 6 (61 results) | 2.7 s | 2.3 s and 12.3 s | 1.00 to 1.12 MB, median 1.07 MB |
| All | 19 | 3.4 s | 2.0 s and 12.3 s |
The seconds are the latency_ms of each response. The seven businesses were in New York, Chicago and Austin; some were read more than once, also with the start and sort_by query parameters in the URL, and each of the 13 reads returned all seven business facts. The searches were coffee in Chicago, tacos in Austin, sushi in Los Angeles, bakeries in Seattle, ramen in San Francisco and BBQ in Houston.
Later the same day we read one of the business pages once more with country set to gb. It came back in 12.1 seconds, 1.82 MB, with the same seven facts as the read with us.
What a public Yelp page carries
The facts of a business page are in its HTML. This is where each one sat in the 13 business page reads of our run, with the values of one Chicago coffee shop as the example.
| Field | Where it is in the HTML | Example from our run | Found |
|---|---|---|---|
| Name | The h1 heading | Sawada Coffee | 13 of 13 |
| Rating | aria-label ending in "star rating" | 4.5 | 13 of 13 |
| Review count | The page title | 1221 | 13 of 13 |
| Address | A PostalAddress in the JSON-LD blocks | 112 N Green St, Chicago, IL 60607 | 13 of 13 |
| Phone | The visible text | (312) 344-1750 | 13 of 13 |
| Categories | The BreadcrumbList JSON-LD block | Food, Coffee & Tea | 13 of 13 |
| Opening hours | The hours table | Mon 8:00 AM - 4:00 PM | 13 of 13 |
A search page, such as coffee in Chicago, carries a list instead: for each result the name, the rating, the review count and the link to the business page. The six search pages we read held 61 results, 10 or 11 per page.
Scrape Yelp data from the page with Python
Once the page is in a file, reading the facts is ordinary HTML parsing. The parser needs Beautiful Soup (pip install beautifulsoup4; we ran version 4.14.3 on Python 3.12). This is parse_yelp.py, the file we ran on all 19 saved pages:
import json
import re
import sys
from html import unescape
from bs4 import BeautifulSoup
def business(html):
"""Facts from one Yelp business page."""
soup = BeautifulSoup(html, "html.parser")
text = soup.get_text(" ", strip=True)
stars = soup.select_one('[aria-label$="star rating"]')
count = re.search(r"([\d,]+) Reviews", soup.title.string)
phone = re.search(r"\(\d{3}\) \d{3}-\d{4}", text)
address, categories = None, []
for tag in soup.select('script[type="application/ld+json"]'):
data = json.loads(tag.string)
if data.get("@type") == "BreadcrumbList":
categories = [unescape(item["name"]) for item in data["itemListElement"]]
found = re.search(r'"address": ?(\{.*?\})', tag.string)
if found and not address:
a = json.loads(found.group(1))
address = "%s, %s, %s %s" % (a["streetAddress"], a["addressLocality"], a["addressRegion"], a["postalCode"])
hours = {}
for row in soup.select('table[class*="hours-table"] tr'):
day, times = row.select_one("th p"), row.select("td li p")
if day and times:
hours[day.get_text()] = ", ".join(p.get_text() for p in times)
return {
"name": soup.h1.get_text(strip=True),
"rating": float(stars["aria-label"].split()[0]) if stars else None,
"reviews": int(count.group(1).replace(",", "")) if count else None,
"address": address,
"phone": phone.group(0) if phone else None,
"categories": categories,
"hours": hours,
}
def search_results(html):
"""Name, rating, review count and link of each result on a Yelp search page."""
soup = BeautifulSoup(html, "html.parser")
rows = []
for link in soup.select('a[href^="/biz/"][href*="osq="]'):
name = link.get_text(strip=True)
if not name or "hrid=" in link["href"]:
continue
card = link.find_parent(lambda tag: tag.select_one('[aria-label$="star rating"]'))
stars = card.select_one('[aria-label$="star rating"]')
count = re.search(r"\(([\d.,k]+) reviews\)", card.get_text(" ", strip=True))
rows.append({
"name": name,
"rating": float(stars["aria-label"].split()[0]) if stars else None,
"reviews": count.group(1) if count else None,
"url": "https://www.yelp.com" + link["href"].split("?")[0],
})
return rows
if __name__ == "__main__":
kind, path = sys.argv[1], sys.argv[2]
html = open(path, encoding="utf-8").read()
if kind == "biz":
print(json.dumps(business(html), indent=2))
else:
for row in search_results(html):
print(row["name"], "|", row["rating"], "|", row["reviews"], "|", row["url"])
Run on the saved business page:
$ python parse_yelp.py biz business.html
{
"name": "Sawada Coffee",
"rating": 4.5,
"reviews": 1221,
"address": "112 N Green St, Chicago, IL 60607",
"phone": "(312) 344-1750",
"categories": [
"Food",
"Coffee & Tea"
],
"hours": {
"Mon": "8:00 AM - 4:00 PM",
"Tue": "8:00 AM - 4:00 PM",
"Wed": "8:00 AM - 4:00 PM",
"Thu": "8:00 AM - 4:00 PM",
"Fri": "8:00 AM - 4:00 PM",
"Sat": "8:00 AM - 4:00 PM",
"Sun": "8:00 AM - 4:00 PM"
}
}
How it reads each field:
- Name is the only
h1of the page. - Rating is an attribute, not text: the star image carries
aria-label="4.5 star rating". - Review count on the page is shortened to "1.2k reviews". The page title has the full number, so the parser takes it from there.
- Address and categories come from the JSON-LD blocks, structured data the page publishes for search engines. They are tied to meaning, not to styling.
- Hours come from the table whose class contains
hours-table. The rest of that class name is generated, so the selector matches a part of it.
The class names on Yelp pages are generated and can change. Selectors tied to meaning, such as aria-label, JSON-LD and the page title, are the ones this parser uses. More on parsing in our Beautiful Soup guide and in web scraping with Python.
A search page
The second function reads a search page. Each result is a link to /biz/...; the card around it holds the rating and the review count. Run on the saved page for coffee in Chicago:
$ python parse_yelp.py search search.html
Sawada Coffee | 4.5 | 1.2k | https://www.yelp.com/biz/sawada-coffee-chicago
The Wormhole Coffee | 4.4 | 1.4k | https://www.yelp.com/biz/the-wormhole-coffee-chicago-3
Oud Coffee & Cafe | 4.4 | 37 | https://www.yelp.com/biz/oud-coffee-and-cafe-chicago-2
Candor | 4.4 | 50 | https://www.yelp.com/biz/candor-chicago
Groundswell Coffee Roasters | 4.0 | 3 | https://www.yelp.com/biz/groundswell-coffee-roasters-chicago-5
Metric Coffee | 4.3 | 174 | https://www.yelp.com/biz/metric-coffee-chicago
Damn Fine Coffee Bar | 4.4 | 133 | https://www.yelp.com/biz/damn-fine-coffee-bar-chicago-2
Nimble | 4.3 | 20 | https://www.yelp.com/biz/nimble-chicago
Magnifico Coffee Roasters | 4.8 | 76 | https://www.yelp.com/biz/magnifico-coffee-roasters-chicago
Dark Matter Coffee - The Mothership | 4.4 | 333 | https://www.yelp.com/biz/dark-matter-coffee-the-mothership-chicago
The search page gives the list and the business page gives the details. The links in the last column are the business pages the first function reads; four of the seven businesses of our run are in this list.
What it costs
The Web Unlocker is billed by the gigabyte, prepaid, with no subscription: you buy a pack from 1 GB in the dashboard, where the rate per gigabyte is shown before you buy, and every call moves bytes against it. Each response reports the bytes it moved and the cost of that call.
So the cost of a Yelp page follows its size. In our run a business page was 1.65 to 1.88 MB, median 1.84 MB, and a search page 1.00 to 1.12 MB, median 1.07 MB. Counting 1 GB as 1,000 MB, that is about 540 business pages or about 930 search pages per gigabyte at the median sizes.
Two settings from the Web Unlocker page keep the bill predictable. max_bytes caps a single call before it starts. cache_ttl keeps a page for the time you choose, and the same call again is answered from the cache at no cost while it is cached. Business hours and addresses change rarely, so a long cache lifetime fits this kind of data.
Yelp's rules, its own API, and proper use
We read three of Yelp's documents on 21 November 2026. Its robots.txt sets rules for the crawlers it names, ends with User-Agent: * and Disallow: /, and says that automated access is prohibited except as expressly permitted by Yelp, with a contact link to ask for permission. Its Support Center article "Can I copy or scrape data from the Yelp site?" says scraping is not allowed. And Yelp offers the Yelp Places API, which its documentation also calls the Yelp Fusion API: it works with a private key under https://api.yelp.com/v3, and its Business Details endpoint returns the name, address, phone number, photos, rating, price level and hours of a business.
Read those documents before you build on Yelp pages, and ask Yelp where your use needs its permission. Our robots.txt tester shows what a robots.txt file allows for a given path, and our overview of web scraping law in the US covers the general ground.
- Public pages only. No logins, no accounts, nothing behind a sign-in.
- A moderate pace. Our run sent one call at a time. Read each page once and cache it. Our explainer on rate limiting shows why sites set limits.
- Business facts, not people. Name, address, phone and hours describe a business. Reviews are written by people: reviewer names, photos and texts can be personal data, and laws such as the GDPR and the CCPA may apply to collecting and storing them.
- No republishing. Yelp's terms cover how its content may be used. Reading a fact is one thing; copying pages, photos or reviews into your own product is another.
If you would rather receive a page as Markdown or as JSON fields than as raw HTML, the QuanticData Web Scraper API does that from one call, and our page on Google Maps data covers another source of local business listings.


