Advanced Yellowpages Scraper avatar
Advanced Yellowpages Scraper
Try for free

3 days trial then $9.99/month - No credit card required now

View all Actors
Advanced Yellowpages Scraper

Advanced Yellowpages Scraper

dainty_screw/advanced-yellowpages-scraper
Try for free

3 days trial then $9.99/month - No credit card required now

Yellowpages Scraper is a robust tool designed to scrape business information from Yellowpages. It efficiently extracts essential details such as business names, addresses, phone numbers, categories, and more.

Sure, here is the updated README.md with your contact details included:


Yellow Pages Scraper

Yellow Pages Scraper is an Apify actor designed for scraping information from Yellow Pages listings. It allows you to search records based on a combination of search terms and location or a list of URLs. Built on top of the Apify SDK, it can be run both on the Apify platform and locally.

Table of Contents

Input

FieldTypeDescriptionDefault Value
searchstringQuery string to be searched on the site"Dentist"
locationstringLocation string to search the records in"Los Angeles"
startUrlsarrayList of Request objects that will be deeply crawled. The URL can be any Yellowpages.com record list pagenone
maxItemsnumberMaximum number of pages that will be scraped200
extendOutputFunctionstringFunction that takes a Cheerio object and a Cheerio representation of the record element ($, record) as arguments and returns data that will be merged with the default output. More information in Extend Output Function($, record) => { return {}; }
proxyConfigurationobjectProxy settings of the run. If you have access to Apify proxy, you can set { "useApifyProxy": true } to enable proxy usage{ "useApifyProxy": false }

Either the search and location attributes or the startUrls attribute must be set.

Output

Output is stored in a dataset. Each item contains information about a record.

1{
2    "name": "Kloesel's Steak House & Bar",
3    "address": "101 W Moore Moulton, TX 77975",
4    "phone": "(361) 596-7323",
5    "website": "http://www.kloesel.com",
6    "rating": 3.5,
7    "reviewSnippet": "Top notch food! Best steaks within 100 miles!!! Excellent lunch specials as well.",
8    "categories": [
9        "Restaurants",
10        "Steak Houses",
11        "Night Clubs"
12    ],
13    "url": "https://www.yellowpages.com/moulton-tx/mip/kloesels-steak-house-bar-11137114?lid=171485443"
14}

Please note that not all attributes will be present in all results.

Compute Units Consumption

Keep in mind that it is more efficient to run one longer scrape (at least one minute) than multiple shorter ones due to the startup time.

The average consumption is about 0.04 Compute Units per 2000 results scraped.

Extend Output Function

You can use this function to customize the default output of this actor. This function takes a Cheerio object and a Cheerio representation of the record element ($, record) as arguments, allowing you to add or modify attributes as needed. The output from this function will be merged with the default output.

The return value of this function must be an object!

You can return fields to achieve three different things:

  • Add a new field: Return an object with a field that is not in the default output.
  • Change a field: Return an existing field with a new value.
  • Remove a field: Return an existing field with a value of undefined.
1($, record) => {
2    return {
3        directionsLink: record.find('.directions').attr('href'),
4        rating: 5,
5        phone: undefined,
6    }
7}

This example will add a new field directionsLink, change the rating field, and remove the phone field.

Contact

For any questions or support, please contact us at support@example.com.


Connect With Us

Developer
Maintained by Community
Actor metrics
  • 1 monthly user
  • 1 star
  • 97.5% runs succeeded
  • Created in May 2024
  • Modified 22 days ago