Appearance
Yellow Pages Scraper API
Turn yellowpages.com searches and business pages into structured data. Send what and where, get back one page of 30 businesses - listing id, name, categories, phone, address, website, Yellow Pages and TripAdvisor ratings, years in business, BBB grade, open status and hours - or send one business page and get everything it shows: extra phones, email, coordinates, payment methods, founding year, neighborhoods, other names, cuisines, photos and the reviews on the page. No proxy pool, bot-check handling or parser maintenance on your side.
It ships as two synchronous Scraper APIs and a no-code scraper:
| Product | Type | Product code | What it does |
|---|---|---|---|
| Yellow Pages Search API | Scraper API (synchronous) | yellow_pages_search | Search yellowpages.com for what and where, get 30 businesses. |
| Yellow Pages Business API | Scraper API (synchronous) | yellow_pages_business | Give one business page URL, get its details and reviews. |
| Yellow Pages Scraper | No-code scraper | yellow_pages | Sweep up to 20 search pages and export JSON, CSV or XML. |
Every field is snake_case, the same convention as the Web Scraping API. yellowpages.com lists US businesses, so every request runs from a US residential exit.
Yellow Pages Search API
GET https://api.scrapeit.io/api/v1/scrape/yellowpages/search
x-api-key: YOUR_SCRAPEIT_API_KEY| Parameter | Type | Example | Description |
|---|---|---|---|
q | string | pizza | Required. What to look for: a business type or a name, up to 200 characters. |
location | string | New York, NY | Required. Where: a US city and state, or a ZIP code, up to 200 characters. |
sort | string | rating | relevance (default), distance, rating or name. |
page | number | 2 | Results page of 30 businesses, 1–100. Defaults to 1. |
include_html | boolean | false | Also return the fetched page HTML in html. Paid add-on: +4 credits per request. |
Example request
bash
curl -G 'https://api.scrapeit.io/api/v1/scrape/yellowpages/search' \
-H 'x-api-key: YOUR_SCRAPEIT_API_KEY' \
--data-urlencode 'q=pizza' \
--data-urlencode 'location=New York, NY'js
const response = await fetch(
'https://api.scrapeit.io/api/v1/scrape/yellowpages/search?' +
new URLSearchParams({ q: 'pizza', location: 'New York, NY' }),
{ headers: { 'x-api-key': 'YOUR_SCRAPEIT_API_KEY' } },
);
const { data } = await response.json();
for (const business of data.results) console.log(business.position, business.name, business.phone);python
import requests
response = requests.get(
"https://api.scrapeit.io/api/v1/scrape/yellowpages/search",
headers={"x-api-key": "YOUR_SCRAPEIT_API_KEY"},
params={"q": "pizza", "location": "New York, NY"},
timeout=120,
)
for business in response.json()["data"]["results"]:
print(business["position"], business["name"], business["phone"])Search response
json
{
"data": {
"query": "pizza",
"location": "New York, NY",
"search_url": "https://www.yellowpages.com/search?search_terms=pizza&geo_location_terms=New+York%2C+NY",
"resolved_location": {
"name": "New York, NY",
"city": "New York",
"state": "NY",
"latitude": 40.7142691,
"longitude": -74.0059729
},
"facets": [
{
"name": "Category",
"options": [
{ "label": "Pizza", "count": 1884 },
{ "label": "Restaurants", "count": 1796 }
]
}
],
"results": [
{
"position": 1,
"listing_id": "459218516",
"name": "Famous Original Ray's Pizza",
"is_sponsored": false,
"is_claimed": false,
"url": "https://www.yellowpages.com/new-york-ny/mip/famous-original-rays-pizza-459218516",
"categories": ["Pizza", "Take Out Restaurants", "Italian Restaurants"],
"phone": "(212) 956-7297",
"street_address": "736 7th Ave",
"city": "New York",
"state": "NY",
"zip_code": "10019",
"website": "http://www.rayspizza.com",
"rating": 4,
"reviews_count": 4,
"tripadvisor_rating": 3.5,
"tripadvisor_reviews_count": 185,
"years_in_business": 23,
"years_with_yp": null,
"bbb_rating": null,
"bbb_accredited": false,
"open_status": "open now",
"opening_hours": ["Mo-Su 09:00-04:00"],
"amenities": [],
"locations_count": null,
"links": [],
"snippet": "Dining at Famous Original Ray's Pizza was an absolute delight…",
"description": null,
"thumbnail": "https://i3.ypcdn.com/blob/130c80297994a5442323b662240e86e63faca689_130x130_crop.jpg?fbfdc6472"
}
],
"pagination": { "current_page": 1, "total_results": 1694, "next_page": 2 }
}
}| Field | Description |
|---|---|
resolved_location | Where yellowpages.com placed the search, with its coordinates. |
facets | The page's filters (Category, Price, Features, Neighborhoods, Insurance…) with their counts. |
results[].position | 1-based position across pages: page 2 starts at 31. |
results[].listing_id | yellowpages.com listing id; url is its business page - pass it to the Business API. |
results[].is_sponsored | true for a paid listing placed among the results. The ad blocks above the results are left out. |
results[].is_claimed | Whether the owner has claimed the listing. |
results[].rating, reviews_count | Yellow Pages star rating out of 5 and its review count. |
results[].tripadvisor_rating, …_reviews_count | The TripAdvisor rating yellowpages.com shows next to its own. |
results[].bbb_rating, bbb_accredited | Better Business Bureau grade (e.g. A+) and the "BBB Accredited Business" badge. |
results[].open_status | As shown: open now, closed now, open 24 hours, closing soon. |
results[].opening_hours | Opening hours as schema.org writes them, e.g. Mo-Su 09:00-04:00. |
results[].locations_count | Locations of the same chain, from "View all 44 Locations". |
results[].links | Coupon, offer, booking and video links as { label, url }, without tracking tags (the website is website). |
results[].snippet, description | The review excerpt on the card, and the business's own "From Business" blurb. |
pagination.next_page | The page to ask for next, or null on the last one. |
A missing field is null or an empty list, never an error.
Yellow Pages Business API
GET https://api.scrapeit.io/api/v1/scrape/yellowpages/business
x-api-key: YOUR_SCRAPEIT_API_KEY| Parameter | Type | Example | Description |
|---|---|---|---|
url | string | https://www.yellowpages.com/new-york-ny/mip/famous-original-rays-pizza-459218516 | Required. A yellowpages.com business page URL, …/<city-state>/mip/<slug>-<listing id>. |
include_html | boolean | false | Also return the fetched page HTML in html. Paid add-on: +4 credits per request. |
A url is never fetched as given: ScrapeIt rebuilds the yellowpages.com business page from its path, without query string or tracking tags.
Example request
bash
curl -G 'https://api.scrapeit.io/api/v1/scrape/yellowpages/business' \
-H 'x-api-key: YOUR_SCRAPEIT_API_KEY' \
--data-urlencode 'url=https://www.yellowpages.com/new-york-ny/mip/famous-original-rays-pizza-459218516'js
const response = await fetch(
'https://api.scrapeit.io/api/v1/scrape/yellowpages/business?' +
new URLSearchParams({
url: 'https://www.yellowpages.com/new-york-ny/mip/famous-original-rays-pizza-459218516',
}),
{ headers: { 'x-api-key': 'YOUR_SCRAPEIT_API_KEY' } },
);
const { data } = await response.json();
console.log(data.name, data.phone, data.payment_methods, data.reviews.length);python
import requests
response = requests.get(
"https://api.scrapeit.io/api/v1/scrape/yellowpages/business",
headers={"x-api-key": "YOUR_SCRAPEIT_API_KEY"},
params={"url": "https://www.yellowpages.com/new-york-ny/mip/famous-original-rays-pizza-459218516"},
timeout=120,
)
business = response.json()["data"]
print(business["name"], business["phone"], business["payment_methods"], len(business["reviews"]))Business response
json
{
"data": {
"listing_id": "459218516",
"url": "https://www.yellowpages.com/new-york-ny/mip/famous-original-rays-pizza-459218516",
"name": "Famous Original Ray's Pizza",
"types": ["Restaurant", "LocalBusiness"],
"is_sponsored": false,
"is_claimed": false,
"primary_category": "Pizza",
"phone": "(212) 956-7297",
"extra_phones": ["Fax: (212) 307-0606"],
"email": null,
"website": "http://www.rayspizza.com",
"other_links": ["http://www.rayspizza.com"],
"street_address": "736 7th Ave",
"city": "New York",
"state": "NY",
"zip_code": "10019",
"service_area": "New York, NY",
"latitude": 40.760372,
"longitude": -73.98398,
"rating": 4,
"reviews_count": 4,
"tripadvisor_rating": 3.5,
"tripadvisor_reviews_count": 185,
"tripadvisor_url": "https://www.tripadvisor.com/Restaurant_Review-g60763-d6535724-Reviews-Famous_Original_Ray_s_Pizza-New_York_City_New_York.html",
"payment_methods": [
"all major credit cards",
"amex",
"discover",
"mastercard",
"travelers checks",
"visa"
],
"founded_year": 2003,
"years_in_business": 23,
"open_status": "open now",
"opening_hours": ["Mo-Su 09:00-04:00"],
"hours_text": ["Mon - Sun: 9:00 am - 4:00 am"],
"neighborhoods": ["Theater District", "Midtown Manhattan"],
"aka": ["Carnegie Pizza"],
"categories": [
"Pizza",
"Fast Food Restaurants",
"Italian Restaurants",
"Restaurants",
"Take Out Restaurants"
],
"cuisines": ["Pizza", "Take Out", "Italian", "Continental", "Fast Food", "European"],
"other_information": [
{ "label": "Cuisines", "value": "Pizza, Take Out, Italian, Continental, Fast Food, European" }
],
"images": ["https://i2.ypcdn.com/blob/7b8889212249570766065a3308b7ce72da0c8de4"],
"photos_count": 8,
"reviews": [
{
"id": "c8644fc2-b11b-46c6-9b9d-4d9755379a31",
"source": "yellowpages",
"author_name": "Gustavo W.",
"rating": 5,
"sub_ratings": [
{ "label": "Atmosphere", "rating": 5 },
{ "label": "Service", "rating": 5 }
],
"title": null,
"text": "Dining at Famous Original Ray's Pizza was an absolute delight…",
"published_at": "2023-10-15",
"helpful_count": 0,
"business_response": null
}
]
}
}| Field | Description |
|---|---|
types | schema.org types of the listing, e.g. Restaurant, LocalBusiness. |
extra_phones | Other numbers with their label, e.g. Fax: (212) 307-0606. |
email | The address the listing publishes, when it has one. |
service_area | The area the business serves. |
tripadvisor_url | The business's TripAdvisor reviews page. |
founded_year | The year the business was founded; years_in_business counts from it. |
opening_hours | schema.org hours; hours_text holds them as the page prints them. |
aka | Other names the business is known by. |
other_information | The "More Info" rows as label / value pairs. |
images, photos_count | Full-size gallery photos the page shows (Yellow Pages and TripAdvisor ones), and how many the whole gallery holds. |
reviews | The reviews the page shows: Yellow Pages ones first, then TripAdvisor ones (source). Only the author's public display name is kept. |
reviews[].sub_ratings | The aspects the reviewer rated besides the overall rating. |
reviews[].published_at | YYYY-MM-DD as the page shows it; an edited review shows its edit date. |
A missing field is null or an empty list, never an error.
No-code Yellow Pages Scraper
Prefer a dashboard run and a file? Scrapers without code → Yellow Pages Scraper takes the same q, location and sort, sweeps up to 20 search pages and produces JSON, CSV and XML files with one record per business (the search result fields above). With include_detail it also opens every business page and nests it under detail. The same job is available over HTTP with an API key (x-api-key; scope scrapers:run to start, scrapers:read to poll):
POST https://api.scrapeit.io/api/v1/scrapers/yellow-pages/jobs
GET https://api.scrapeit.io/api/v1/scrapers/yellow-pages/jobs/{jobId}| Parameter | Type | Example | Description |
|---|---|---|---|
q | string | pizza | Required. What to look for. |
location | string | New York, NY | Required. A US city and state, or a ZIP code. |
sort | string | rating | Result ordering, as in the Search API. |
max_pages | number | 10 | Search pages to sweep, 1–20. Defaults to 5; the run stops earlier at the last page. |
include_detail | boolean | true | Also fetch each business page and nest it under detail (the Business API fields). Defaults to false. |
output_format | array | ["json", "csv"] | One or more of json, csv, xml. Defaults to ["json"]; an empty list is rejected. |
A sweep of five pages or fewer without include_detail finishes inline and the POST already answers with the result-file ids; a larger one, or any run with include_detail, answers queued, so poll the GET endpoint until status is finished (or failed). A business yellowpages.com repeats on a later page is written once. Each swept page is billed like one Search API request and each business page like one Business API request; a business whose page fails keeps its search fields with detail: null and a detail_error code, and that page costs nothing. A job started with an API key runs under that key, queued or not: its pages count in the key's usage.
Errors
| Code | HTTP | Meaning |
|---|---|---|
VALIDATION_ERROR | 400 | Missing or blank q or location; a page outside 1–100; a url that is not an https yellowpages.com /mip/ page. |
NOT_FOUND | 404 | Business API: yellowpages.com has no business page at this URL. |
TARGET_BLOCKED | 502 | Every proxy attempt drew a yellowpages.com bot or error page. Retry later; the request costs nothing. |
See Error codes for the shared error format.
Credits and billing
Both APIs bill one flat price per request under their own product code - the residential proxy is part of it (billing & credits). Every request is scraped live - never served from the shared cache - so hours and ratings are current.
Price per request: 30 credits, flat; this is an introductory price for a new product and may change - the dashboard Pricing page always shows the current price. A no-code job pays the Search API price per results page it fetched, and the Business API price per business page with include_detail.
Limits and behavior
- One search request returns one page of 30 businesses; yellowpages.com serves at most 100 pages (3 000 results) per search. Use
pageto walk further. - Each page is a plain fetch of a few hundred kilobytes, usually answered in one to two seconds.
- The business page shows the reviews yellowpages.com puts on it first; this API does not page through all reviews.
Related pages
- Yelp Scraper API - business search and business pages from Yelp.
- Google Maps API - places, hours and reviews from Google Maps.
- Billing & credits - credit prices and plans.
- Files & artifacts - downloading the no-code result files.