{
  "openapi": "3.0.1",
  "info": {
    "title": "YellowPagesPK Business Directory & Lead Finder",
    "description": "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.",
    "version": "1.0",
    "x-build-id": "9ZaBl7uvgtmywvUcU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dataspryva~yellowpagespk-business-directory-and-lead-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dataspryva-yellowpagespk-business-directory-and-lead-finder",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/dataspryva~yellowpagespk-business-directory-and-lead-finder/runs": {
      "post": {
        "operationId": "runs-sync-dataspryva-yellowpagespk-business-directory-and-lead-finder",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/dataspryva~yellowpagespk-business-directory-and-lead-finder/run-sync": {
      "post": {
        "operationId": "run-sync-dataspryva-yellowpagespk-business-directory-and-lead-finder",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "byCategory",
              "byCity",
              "search",
              "byUrls"
            ],
            "type": "string",
            "description": "How to find businesses: browse a category archive, browse a city archive, run the site's keyword search, or open specific listing URLs.",
            "default": "byCategory"
          },
          "categories": {
            "title": "Business categories",
            "type": "array",
            "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).",
            "items": {
              "type": "string",
              "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"
              ]
            }
          },
          "cities": {
            "title": "Cities / locations",
            "type": "array",
            "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.",
            "items": {
              "type": "string",
              "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"
              ]
            },
            "default": []
          },
          "searchQuery": {
            "title": "Keyword",
            "type": "string",
            "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."
          },
          "listingUrls": {
            "title": "Listing URLs",
            "type": "array",
            "description": "YellowPagesPK.com business listing URLs to open directly (mode=byUrls). Non-YellowPagesPK hosts are rejected.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "URL",
                  "type": "string",
                  "description": "A https://yellowpagespk.com/listing/... URL."
                }
              }
            },
            "default": []
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "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.",
            "default": 0
          },
          "onlyClaimed": {
            "title": "Only claimed listings",
            "type": "boolean",
            "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.",
            "default": false
          },
          "onlyWithEmail": {
            "title": "Only with email",
            "type": "boolean",
            "description": "Only keep businesses with a published email. Turns on profile enrichment automatically.",
            "default": false
          },
          "onlyWithWebsite": {
            "title": "Only with website",
            "type": "boolean",
            "description": "Only keep businesses with a published website. Turns on profile enrichment automatically.",
            "default": false
          },
          "onlyWithPhone": {
            "title": "Only with phone",
            "type": "boolean",
            "description": "Only keep businesses with a published phone number. Turns on profile enrichment automatically.",
            "default": false
          },
          "fetchDetails": {
            "title": "Fetch full profiles",
            "type": "boolean",
            "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.",
            "default": true
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of business records to return. The directory currently contains 2,198 listings.",
            "default": 30
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}