The YellowPages Search API allows users to get results from the YellowPages search page. This API enables searching for businesses by keyword and location.
Get Your API Key
Sign in at hasdata.com, go to your account settings, and copy your API key.
All requests must include your key in the x-api-key header.
Request Cost and API Credits
Each request to the YellowPages Search API consumes API Credits from your account balance.
- Cost per request: 5 API Credits
- Credits are deducted only for successful requests.
- Your total available credits depend on your active plan.
You can use your credits across all HasData APIs. The same credit balance is shared platform-wide.
Unused credits do not roll over. Any remaining credits expire at the end of the current billing period.
To monitor your credit usage and remaining balance, sign in to your account dashboard at app.hasdata.com.
Make Your First Request
curl --request GET \
--url 'https://api.hasdata.com/scrape/yellowpages/search?keyword=Plumbers&location=New%20York%2C%20NY&sort=default' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <your-api-key>'
API Parameters
| Parameter | Default Value | Required | Description |
|---|
keyword | Plumbers | Yes | The search term for which to get the search results. |
location | New York, NY | Yes | The location where to search for businesses with the given keyword. |
sort | default | No | The sorting option for the search results. |
domain | - | No | YellowPages domain to use. Default is www.yellowpages.com. |
page | - | No | The page number of the results to retrieve. |