Dataspryva

YellowPagesPK Business Directory & Lead Finder

Browse Pakistan's YellowPagesPK.com directory by business category, run a keyword search, or fetch full profiles by listing URL. Get business names, addresses, cities, phone numbers, emails, websites, ratings, and claimed status.

Input schema

Input fields, types, required flags, descriptions, defaults, and prefills come from the published definition. Prefill examples are distinct from defaults.

FieldTypeRequiredDescription
modestringrequiredHow to find businesses: browse a category archive, browse a city archive, run the site's keyword search, or open specific listing URLs.
categoriesarrayoptionalOne or more categories to browse (mode=byCategory), or exact category filters (other modes). In byCategory, Restaurant is used when the field is omitted; select additional categories to broaden the run, or leave the selection empty to crawl the entire directory (2,198 listings).
citiesarrayoptionalOne or more location terms to browse (mode=byCity). In other modes the same selection acts as an exact location filter. Leave empty to skip city browsing/filtering. All 65 published location terms are listed, including provinces and countries.
Show all input fields
FieldTypeRequiredDescription
modestringrequiredHow to find businesses: browse a category archive, browse a city archive, run the site's keyword search, or open specific listing URLs.
categoriesarrayoptionalOne or more categories to browse (mode=byCategory), or exact category filters (other modes). In byCategory, Restaurant is used when the field is omitted; select additional categories to broaden the run, or leave the selection empty to crawl the entire directory (2,198 listings).
citiesarrayoptionalOne or more location terms to browse (mode=byCity). In other modes the same selection acts as an exact location filter. Leave empty to skip city browsing/filtering. All 65 published location terms are listed, including provinces and countries.
searchQuerystringoptionalWhat to search for (mode=search), e.g. a service, business name or city. The site's own relevance-ranked search is used, so 'restaurant lahore' narrows results well.
listingUrlsarrayoptionalYellowPagesPK.com business listing URLs to open directly (mode=byUrls). Non-YellowPagesPK hosts are rejected.
minRatingintegeroptionalOnly keep businesses rated at least this many stars (0-5). 0 disables the filter. Businesses without a published rating are excluded when this is above 0. Profile enrichment turns on automatically when the selected mode's fast path has no ratings.
onlyClaimedbooleanoptionalOnly keep listings claimed and verified by their owner on YellowPagesPK.com. Profile enrichment turns on automatically when the selected path has no claim badges.
onlyWithEmailbooleanoptionalOnly keep businesses with a published email. Turns on profile enrichment automatically.
onlyWithWebsitebooleanoptionalOnly keep businesses with a published website. Turns on profile enrichment automatically.
onlyWithPhonebooleanoptionalOnly keep businesses with a published phone number. Turns on profile enrichment automatically.
fetchDetailsbooleanoptionalOpen each listing page for description, email, website, hours, social links, gallery and coordinates (one extra request per business). Turn off for the cheapest list: category/city archives keep card fields, while search and whole-directory REST runs return name, category, city, description and dates.
maxItemsintegeroptionalMaximum number of business records to return. The directory currently contains 2,198 listings.

Download the published input schema

View complete JSON
{
  "description": "Scrape YellowPagesPK.com, Pakistan's business directory: browse by category, browse a city, run a keyword search, or open specific listing URLs. Returns contact details, addresses, categories, hours, social links, photos and coordinates.",
  "properties": {
    "categories": {
      "description": "One or more categories to browse (mode=byCategory), or exact category filters (other modes). In byCategory, Restaurant is used when the field is omitted; select additional categories to broaden the run, or leave the selection empty to crawl the entire directory (2,198 listings).",
      "editor": "select",
      "items": {
        "enum": [
          "account-tax-consultant",
          "arts-entertainment",
          "automotive",
          "beauty-spa",
          "beauty-salon",
          "charity-donation",
          "computer-and-mobiles",
          "construction",
          "constructions-repairing",
          "courier-service",
          "customs-broker-clearance-agent",
          "digital-media",
          "education-institute",
          "electronics-and-electrical-equipment",
          "embassy-documents-attestation",
          "best-event-management",
          "fashion-styles",
          "furniture",
          "general-order-supplier",
          "goods-transportation",
          "health-medical",
          "home-garden",
          "home-furniture",
          "hotels",
          "insurance",
          "job-recruitment-agency",
          "law-firms",
          "legal-advisor",
          "legal-service",
          "loan-and-mortgage",
          "manufacturer",
          "movers-packers",
          "property-real-estate-agent",
          "real-estate",
          "rent-a-car",
          "restaurant",
          "security-service",
          "services",
          "shopping",
          "software-houses",
          "specialist-medical-doctors",
          "study-abroad",
          "study-abroad-consultants",
          "travel-agencies",
          "vehicle-denter-painter",
          "web-development",
          "welder"
        ],
        "enumTitles": [
          "Accounts and Tax Consultant",
          "Arts & Entertainment",
          "Automotive",
          "Beauty & Spa",
          "Beauty Salon",
          "Charity & Donation",
          "Computer and Mobiles",
          "Construction",
          "Constructions and Repairing",
          "Courier Service",
          "Customs Broker & Clearance Agent",
          "Digital Media",
          "Education Institute",
          "Electronics and Electrical Equipment",
          "Embassy Documents Attestation",
          "Event Management",
          "Fashion & Styles",
          "Furniture",
          "General Order Supplier",
          "Goods Transportation",
          "Health & Medical",
          "Home & Garden",
          "Home Furniture",
          "Hotels & Guest Houses",
          "Insurance",
          "Job Recruitment Agency",
          "Law Firms",
          "Legal Advisor",
          "Legal Service",
          "Loan and Mortgage",
          "Manufacturer",
          "Packers and Movers",
          "Property & Real Estate Agent",
          "Real Estate",
          "Rent a Car",
          "Restaurant",
          "Security Service",
          "Services",
          "Shopping",
          "Software Houses",
          "Specialist Medical Doctors",
          "Study Abroad",
          "Study Abroad Consultants",
          "Travel Agencies",
          "Vehicle Denter Painter",
          "Web Development",
          "Welder"
        ],
        "type": "string"
      },
      "prefill": [
        "restaurant"
      ],
      "title": "Business categories",
      "type": "array"
    },
    "cities": {
      "default": [],
      "description": "One or more location terms to browse (mode=byCity). In other modes the same selection acts as an exact location filter. Leave empty to skip city browsing/filtering. All 65 published location terms are listed, including provinces and countries.",
      "editor": "select",
      "items": {
        "enum": [
          "abbottabad",
          "amin-pur",
          "australia",
          "azad-kashmir",
          "bahawalpur",
          "baltimore",
          "bangladesh",
          "bellevue",
          "california",
          "canada",
          "chakdara",
          "chennai",
          "chicago",
          "china",
          "clifton",
          "dallas",
          "dera-ghazi-khhan",
          "dera-ismail-khan",
          "dubai",
          "faisalabad",
          "gawadar",
          "georgia",
          "germany",
          "gujranwala",
          "gujrat",
          "hyderabad",
          "india",
          "islamabad",
          "jampur",
          "janiea",
          "jhelum",
          "karachi",
          "lahore",
          "london",
          "lower-dir",
          "manchester",
          "mardan",
          "metro-manila",
          "miami-beach",
          "multan",
          "new-jersey",
          "new-york",
          "pakistan",
          "paradaise",
          "peshawar",
          "punjab",
          "quetta",
          "rahim-rar-khan",
          "rajanpur",
          "rawalpindi",
          "riyadh",
          "sahiwal",
          "sargodha",
          "saudi-arabia",
          "saudia-arabia",
          "seattle",
          "seaview-ave-nw",
          "sialkot",
          "sukkur",
          "texas",
          "uk",
          "united-arab-emirates",
          "usa",
          "utah",
          "washington"
        ],
        "enumTitles": [
          "Abbottabad",
          "Amin Pur",
          "Australia",
          "Azad Kashmir",
          "Bahawalpur",
          "Baltimore",
          "Bangladesh",
          "Bellevue",
          "California",
          "Canada",
          "Chakdara",
          "Chennai",
          "Chicago",
          "China",
          "Clifton",
          "Dallas",
          "Dera Ghazi Khan",
          "Dera Ismail Khan",
          "Dubai",
          "Faisalabad",
          "Gwadar",
          "Georgia",
          "Germany",
          "Gujranwala",
          "Gujrat",
          "Hyderabad",
          "India",
          "Islamabad",
          "Jampur",
          "Jania",
          "Jhelum",
          "Karachi",
          "Lahore",
          "London",
          "Lower Dir",
          "Manchester",
          "Mardan",
          "Metro Manila",
          "Miami Beach",
          "Multan",
          "New Jersey",
          "New York",
          "Pakistan",
          "Paradise",
          "Peshawar",
          "Punjab",
          "Quetta",
          "Rahim Yar Khan",
          "Rajanpur",
          "Rawalpindi",
          "Riyadh",
          "Sahiwal",
          "Sargodha",
          "Saudi Arabia",
          "Saudi Arabia",
          "Seattle",
          "Seaview Ave NW",
          "Sialkot",
          "Sukkur",
          "Texas",
          "UK",
          "United Arab Emirates",
          "USA",
          "Utah",
          "Washington"
        ],
        "type": "string"
      },
      "prefill": [],
      "title": "Cities / locations",
      "type": "array"
    },
    "fetchDetails": {
      "default": true,
      "description": "Open each listing page for description, email, website, hours, social links, gallery and coordinates (one extra request per business). Turn off for the cheapest list: category/city archives keep card fields, while search and whole-directory REST runs return name, category, city, description and dates.",
      "prefill": false,
      "title": "Fetch full profiles",
      "type": "boolean"
    },
    "listingUrls": {
      "default": [],
      "description": "YellowPagesPK.com business listing URLs to open directly (mode=byUrls). Non-YellowPagesPK hosts are rejected.",
      "editor": "requestListSources",
      "items": {
        "properties": {
          "url": {
            "description": "A https://yellowpagespk.com/listing/... URL.",
            "title": "URL",
            "type": "string"
          }
        },
        "type": "object"
      },
      "prefill": [],
      "title": "Listing URLs",
      "type": "array"
    },
    "maxItems": {
      "default": 30,
      "description": "Maximum number of business records to return. The directory currently contains 2,198 listings.",
      "maximum": 5000,
      "minimum": 1,
      "prefill": 2,
      "title": "Max results",
      "type": "integer"
    },
    "minRating": {
      "default": 0,
      "description": "Only keep businesses rated at least this many stars (0-5). 0 disables the filter. Businesses without a published rating are excluded when this is above 0. Profile enrichment turns on automatically when the selected mode's fast path has no ratings.",
      "editor": "number",
      "maximum": 5,
      "minimum": 0,
      "prefill": 0,
      "title": "Minimum rating",
      "type": "integer"
    },
    "mode": {
      "default": "byCategory",
      "description": "How to find businesses: browse a category archive, browse a city archive, run the site's keyword search, or open specific listing URLs.",
      "editor": "select",
      "enum": [
        "byCategory",
        "byCity",
        "search",
        "byUrls"
      ],
      "enumTitles": [
        "Browse by category",
        "Browse by city",
        "Keyword search",
        "Specific listing URLs"
      ],
      "prefill": "byCategory",
      "title": "Mode",
      "type": "string"
    },
    "onlyClaimed": {
      "default": false,
      "description": "Only keep listings claimed and verified by their owner on YellowPagesPK.com. Profile enrichment turns on automatically when the selected path has no claim badges.",
      "prefill": false,
      "title": "Only claimed listings",
      "type": "boolean"
    },
    "onlyWithEmail": {
      "default": false,
      "description": "Only keep businesses with a published email. Turns on profile enrichment automatically.",
      "prefill": false,
      "title": "Only with email",
      "type": "boolean"
    },
    "onlyWithPhone": {
      "default": false,
      "description": "Only keep businesses with a published phone number. Turns on profile enrichment automatically.",
      "prefill": false,
      "title": "Only with phone",
      "type": "boolean"
    },
    "onlyWithWebsite": {
      "default": false,
      "description": "Only keep businesses with a published website. Turns on profile enrichment automatically.",
      "prefill": false,
      "title": "Only with website",
      "type": "boolean"
    },
    "searchQuery": {
      "description": "What to search for (mode=search), e.g. a service, business name or city. The site's own relevance-ranked search is used, so 'restaurant lahore' narrows results well.",
      "editor": "textfield",
      "prefill": "Lahore",
      "title": "Keyword",
      "type": "string"
    }
  },
  "required": [
    "mode"
  ],
  "schemaVersion": 1,
  "title": "YellowPagesPK Business Directory Input",
  "type": "object"
}

Output schema

Published result links and storage locations. This schema is not an exhaustive contract for every field in a dataset record.

FieldTypeRequiredDescription
businessesstringoptionalDataset containing all scraped YellowPagesPK.com business listings.

Download the published output schema

View complete JSON
{
  "actorOutputSchemaVersion": 1,
  "description": "YellowPagesPK.com business listings with categories, location, address, phone, email, website, hours, social links, photos, coordinates and publish dates.",
  "properties": {
    "businesses": {
      "description": "Dataset containing all scraped YellowPagesPK.com business listings.",
      "template": "{{links.apiDefaultDatasetUrl}}/items",
      "title": "YellowPagesPK businesses",
      "type": "string"
    }
  },
  "title": "YellowPagesPK Business Directory Output"
}

Dataset schema

Published dataset views and any declared field definitions. A view can select only a subset of the returned record fields.

Download the published dataset schema

View complete JSON
{
  "actorSpecification": 1,
  "views": {
    "overview": {
      "display": {
        "component": "table",
        "properties": {}
      },
      "title": "Businesses",
      "transformation": {
        "fields": [
          "name",
          "category",
          "city",
          "country",
          "address",
          "phone",
          "email",
          "website",
          "rating",
          "sourceUrl"
        ]
      }
    }
  }
}

Key-value schema

Published key-value store definitions, when provided by this build.

This definition is not present in the default published build. See the published README for available documentation.

Published README

Read the full published documentation

YellowPagesPK Business Directory & Lead Finder

YellowPagesPK.com is one of Pakistan's largest online business directories. This actor turns it into structured lead data: browse a category, browse a city, run the site's keyword search, or open specific listing URLs. It returns the full public profile behind each business — contact details, addresses, category terms, opening hours, social profiles, photo galleries and map coordinates — with no login, cookies, API key or proxy setup.

What it does

  • Four modes: byCategory (browse one or more category archives), byCity (browse one or more city/location archives), search (the site's relevance-ranked keyword search) and byUrls (open specific listing pages).
  • All 47 published categories and all 65 published location terms, exposed as multi-select dropdowns with human-readable titles.
  • The whole directory: leaving categories or cities empty crawls every published listing through the site's WordPress REST API — currently 2,198 businesses.
  • Combined targeting: pick several categories and several cities in one run; city and category selections also act as exact filters in the other modes.
  • Lead-quality filters: minimum rating, claimed-only, and only-with-email / only-with-website / only-with-phone.
  • Full profile records: description, primary category plus category arrays, city/country, address, phone, email, website, WhatsApp and social profiles, weekday opening hours, open/closed state, rating and real review count, price range, photos, coordinates, author and publish dates.
  • Safe by design: strict listing-URL validation, duplicate removal by WordPress post ID, and empty fields omitted rather than emitted as null.

Services covered

Restaurants, hotels and guest houses, health and medical providers, education institutes, software houses, shopping, real estate, law firms, travel agencies, manufacturers, movers and packers, beauty and spa, automotive, electronics, construction, digital media and every other category the directory publishes.

How it works

The actor uses two public, cookieless data paths:

  1. Server-rendered archives for discovery — category archives and city archives return 100 business cards per page; the native search returns listing teasers 10 per page. Cards carry name, address, phone, coordinates, claimed/sponsored badges and images.
  2. WordPress REST API for exact metadata — category and location term IDs, publish/modified dates, descriptions and totals. Term filters are exact, so a "Lahore + restaurant" request matches the directory's own taxonomy rather than a text guess. The REST endpoint has 2,198 published listings at 100 per request.

When fetchDetails is on, each business page is opened for the rich profile fields. Detail pages are the only source of email, website, opening hours, social links, gallery and price range. A sitemap index provides a fallback enumeration path if the REST endpoint is unavailable.

Requests use full browser headers because the site's LiteSpeed edge rejects incomplete requests with HTTP 406. Retries cover transient 5xx responses. Apify's datacenter proxy is used automatically only after a real block; no proxy configuration is needed from the user.

Input

Field Type Default Description
mode select byCategory byCategory, byCity, search or byUrls
categories multi-select – 47 category slugs; in byCategory restaurant when omitted, empty means the whole directory; exact filter in other modes
cities multi-select [] 65 location slugs; browse in byCity, exact filter elsewhere
searchQuery text – Keyword for search mode
listingUrls URL list [] Exact YellowPagesPK listing URLs for byUrls
minRating integer 0–5 0 Minimum published rating; profiles are fetched automatically when the selected path cannot supply ratings
onlyClaimed boolean false Keep only owner-claimed listings; profiles are fetched automatically when the selected path cannot supply claim badges
onlyWithEmail boolean false Keep only records with an email (turns on profiles)
onlyWithWebsite boolean false Keep only records with a website (turns on profiles)
onlyWithPhone boolean false Keep only records with a phone (turns on profiles)
fetchDetails boolean true Open each profile page for full contact/social/hours data
maxItems integer 1–5,000 30 Maximum records to return

Examples

Browse every restaurant in Lahore:

{
  "mode": "byCategory",
  "categories": ["restaurant"],
  "cities": ["lahore"],
  "maxItems": 100
}

Browse software houses and digital media in Karachi and Islamabad:

{
  "mode": "byCity",
  "cities": ["karachi", "islamabad"],
  "categories": ["software-houses", "digital-media"],
  "maxItems": 200
}

Search for a service, with contactable businesses only:

{
  "mode": "search",
  "searchQuery": "digital marketing lahore",
  "onlyWithEmail": true,
  "maxItems": 50
}

Open specific profiles:

{
  "mode": "byUrls",
  "listingUrls": [
    { "url": "https://yellowpagespk.com/listing/bizlaw/" },
    { "url": "https://yellowpagespk.com/listing/andaaz-restaurant/" }
  ]
}

Crawl the entire directory as a fast list of names, categories, cities, descriptions and dates (no profile requests):

{
  "mode": "byCategory",
  "categories": [],
  "fetchDetails": false,
  "maxItems": 5000
}

Output

Each dataset record is one business. Fields include:

postId, businessId, name, description, category, categorySlug, categories, categorySlugs, searchCategory, searchQuery, address, city, country, locationTerms, phone, email, website, latitude, longitude, rating, reviewCount, openStatus, openNow, openingHours, socialLinks, images, imageUrl, logoUrl, priceRange, claimed, sponsored, authorName, authorProfileUrl, publishedAt, lastUpdated, sourceUrl, recordType, scrapedAt.

All nested values are omit-empty: a business without a website has no website key, and a profile without a gallery has no images key.

Usage cost

The actor makes cheap HTML/JSON requests only; it does not launch a browser and does not use paid proxy groups. A normal category run with profiles enabled costs one archive request plus one request per business. onlyWith* filters, and rating/claimed filters in modes whose fast path lacks those fields, enable profiles automatically. For the lowest-cost large runs, use category/city archives with fetchDetails set to false and maxItems up to 5,000. Apify compute and the actor's own pay-per-result pricing (when enabled on the listing) are billed by the platform according to your plan.

FAQ

Do I need an account, cookies or an API key? No. Every page and endpoint used by this actor is public.

How many businesses can I get? The directory currently has 2,198 published listings. Leave categories or cities empty to crawl all of them; otherwise the selected archives are fully paginated.

Why do some records have no email, website, hours or rating? The directory only shows what each business supplied. Email and website appear on profile pages; hours are published by a small minority; ratings exist only after a review. Missing values are omitted, never invented.

What is the difference between byCategory and byCity? They are two browse paths over the same listings. byCategory walks category archives and can be narrowed with cities; byCity walks location archives and can be narrowed with categories. Both deduplicate by post ID.

Does fetchDetails change the output? Yes. With it off, category/city archive runs still return card + REST fields: name, address, phone, categories, city/country, coordinates, badges and dates. Keyword-search runs return name, image, categories, city/country, description and dates; whole-directory REST runs return name, categories, city/country, description and dates. With it on, every profile is opened for email, website, hours, socials, gallery and price range. Contact filters and filters whose field is missing from the selected fast path turn profiles on automatically.

How is city chosen when the site lists a state or country? The actor prefers a real city among the listing's location terms, then matches the address against a curated city list. Country is derived separately, so a Seattle business tagged "Washington" is returned as city: "Seattle" and country: "United States", not as a city named Washington.

Are duplicate businesses possible across categories or cities? No. Records are deduplicated by WordPress post ID (and canonical URL) within a run.

What happens if a detail page fails? The card/REST fields are kept and the run continues; the log reports how many profile requests failed.

Notes

  • businessId is always the listing slug and postId is always the numeric WordPress ID, in every mode.
  • searchCategory records the category you browsed; searchQuery records the keyword you searched. categories/categorySlugs always describe the business itself.
  • reviewCount is parsed from the profile's "N Ratings" label and is only present when the site publishes it.
  • The default input is deliberately small (two restaurants, profiles off) so scheduled runs stay cheap; raise maxItems and enable fetchDetails for production jobs.

Limitations

  • Address coverage is partial. Roughly half of all listings publish a street address; the rest only have a city/country term. Address is omitted when the source has none.
  • Ratings are rare. Only a handful of listings have a rating and review count. Review text is not published anywhere on the site, so it cannot be scraped.
  • Opening hours are rare. Most profiles do not publish weekday hours; when they do, only the days shown are returned (no day is invented).
  • City and country are best-effort. The location taxonomy mixes cities, provinces, countries and a few neighbourhoods. The actor picks the most specific city term and derives country separately; listings with no location data may have no city.
  • Some images are broken at the source. Older photos and logos referenced by the site may return 404. Gallery and logo URLs are checked before output when profiles are fetched, so a missing image reflects the source, not a scrape failure; card thumbnails in fast runs are passed through as published.
  • 2,198 listings is the current directory total, not a cap imposed by the actor. The REST enumeration includes the two listings that do not appear in category archives; if REST fails, a sitemap fallback enumerates listing URLs.
  • No sort or resume options. The site offers no reliable server-side sort or cursor, so results follow the directory's own archive order.

Python quickstart

Use a schema-derived input and the Python standard library to start a run. An Apify account and token are required for execution.

Open the step-by-step Python guide →

Source build 9ZaBl7uvgtmywvUcU. Documentation is regenerated from the default published build; private drafts are not included.