Get business details (Location, phone, website, etc.) from the Yellow Pages.
Templates are view-only on mobile. Please switch to a desktop to run this template.
Yellow Pages Scraper (Cloud)
How to Use
Step 1: Click Try it!
Step 2: Enter parameter: Company;zip code, with no space between but a semicolon (eg: Trust GDC;63353)
Step 3: Click Start to choose your preferred mode Output
Note
Please contact our support team (click on the widget on the bottom right) if you have any questions about this template or if you would like to have a template customized.
[{"Address":"521 Oliver Rd Montgomery, AL 36117","Location":"36117","Name":"HVAC contractor","Phone":"(334) 651-0307","Title":"Clark Heating, Air Conditioning & Plumbing","URL":"https://www.yellowpages.com/montgomery-al/mip/clark-heating-air-conditioning-plumbing-520737214","Website":"http://www.clarkcomfort.com"}]
Is Scraping Yellow Pages Legal?
Web scraping is generally legal if you scrape publicly available non-personal data. What you do with the data is another question. Learn more about the legality of web scraping in this article. If you're not sure, please seek professional legal advice.
Run this template
Input
Use these field names and accepted formats when configuring the template in Console or through the API.
Field
Type
Required
API
Company;zip code (with no space between but a semicolon)Field key: company;zip_code
string (multiple values)
Yes
Yes
PageSize(The default value is 100)Field key: pageSize
[{"Address":"521 Oliver Rd Montgomery, AL 36117","Location":"36117","Name":"HVAC contractor","Phone":"(334) 651-0307","Title":"Clark Heating, Air Conditioning & Plumbing","URL":"https://www.yellowpages.com/montgomery-al/mip/clark-heating-air-conditioning-plumbing-520737214","Website":"http://www.clarkcomfort.com"}]
Run Yellow Pages Scraper (Cloud) with the API
Prepare the supported input, start one cloud task, then poll and export the result with the returned identifiers.
1
Prepare parameters
Use the API-enabled field names from the Input tab to build the parameters object.
2
Start the task
Call executeTask once, then save taskId and lotNo from the accepted response.
3
Poll and export the result
Call exportData with the same taskId and lotNo until the completed rows are returned.
POST/api/agentTools/executeTask
GET/api/agentTools/exportData
curl -X POST 'https://openapi.octoparse.com/api/agentTools/executeTask' \
-H 'x-api-key: op_sk_xxxxx' \
-H "Content-Type: application/json" \
-d '{"templateName":"yellow-page-scraper-cloud","taskName":"Yellow Pages Scraper (Cloud) API run","parameters":"{\"company;zip_code\":[\"Trust GDC;63353\"],\"pageSize\":\"3\"}"}'# Reuse taskId and lotNo from the accepted response.
curl -G 'https://openapi.octoparse.com/api/agentTools/exportData' \
-H 'x-api-key: op_sk_xxxxx' \
--data-urlencode "taskId=<taskId>" \
--data-urlencode "lotNo=<lotNo>" \
--data-urlencode "exportFileType=JSON"