scraper
Back to API docs

Overview

  • Overview

APIs

  • POSTSearch
  • POSTBusiness
  • POSTReviews

Yellow Pages Search

1 (2 with fetchDetails)

Search Yellow Pages for businesses by a term and a place.

POST/api/v1/tools/yellowpages/search

Parameters

countrystring

Which Yellow Pages to read: "us" (yellowpages.com), "uk" (yell.com), or "ca" (yellowpages.ca). Links, IDs, and locations must match the country. Defaults to "us".

searchTermstringrequired

What to search for, such as "plumbers", "pizza", or a business name. From 1 through 200 characters.

locationstring

A city, state, ZIP code, postcode, or address in the chosen country, such as "Austin, TX", "Leeds", or "Toronto, ON". Send location, or latitude and longitude. When you send both, location wins. A search in Canada needs location.

latitudenumber

From -90 through 90. Send it with longitude. Not for Canada.

longitudenumber

From -180 through 180. Send it with latitude. Not for Canada.

searchSortstring

One of "relevance", "distance", "average_rating", or "name". Defaults to "relevance".

maxItemsnumber

Maximum businesses to return. From 1 through 100, and not above your plan limit. Must be 20 or less when fetchDetails is true. Defaults to 20.

fetchDetailsboolean

Read the full business record for each result. Costs 2 credits. Defaults to false.

Response Schema

dataobject

Yellow Pages search result

businessesobject[]

Businesses in search order

countnumber

Businesses returned

totalResultsnumber

Matches that Yellow Pages counted. It can be more than it serves.

truncatedboolean

True when the request time ran out and some businesses are missing

searchedPlacestring

The place that Yellow Pages searched. Check it when you search by a name.

suggestedTermstring

The corrected term, when Yellow Pages corrected a misspelled one

metaobject

Request metadata

toolstring

Tool name (yellowpages-search)

creditsUsednumber

Credits consumed (1, or 2 with fetchDetails)

requestIdstring

Unique request ID

Request

curl -X POST https://scraper.run/api/v1/tools/yellowpages/search \
-H "Authorization: Bearer sc_live_..." \
-H "Content-Type: application/json" \
-d '{
"searchTerm": "plumbers",
"location": "Austin, TX",
"maxItems": 10,
"searchSort": "average_rating"
}'

Response Example

{
"data": {
"businesses": [
{
"ypid": "467675667",
"listingId": "467675667",
"name": "Texan Water",
"yellowPagesUrl": "https://www.yellowpages.com/austin-tx/mip/texan-water-467675667",
"phoneNumber": "(512) 555-0100",
"address": "100 Example St",
"city": "Austin",
"state": "TX",
"zip": "78701",
"latitude": 30.2672,
"longitude": -97.7431,
"headingText": "Plumbers",
"averageRating": 4.5,
"ratingCount": 38,
"searchListing": {
"distance": 1.2
},
"scrapedAt": "2026-10-22T09:00:00.000Z"
}
],
"count": 1,
"totalResults": 1240,
"truncated": false,
"searchedPlace": "Austin, TX"
},
"meta": {
"tool": "yellowpages-search",
"creditsUsed": 1,
"requestId": "req_abc123"
}
}