{
  "openapi": "3.0.1",
  "info": {
    "title": "YP Business Directories Scraper — 136 Country Yellow Pages",
    "description": "136 country Yellow Pages directories, one Actor — Woomar's YP network (businesslist.*, *yp.com, *yello.*, yelu.*). Seven tasks: search, category, city, company profiles, category tree, city list, auto from a link. Profiles add hours, manager, products, reviews. Verified, phone, no-website filters.",
    "version": "0.0",
    "x-build-id": "Lt6q8YlM4JioX7xhH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hamza325~yp-business-directories-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hamza325-yp-business-directories-scraper",
        "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/hamza325~yp-business-directories-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hamza325-yp-business-directories-scraper",
        "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/hamza325~yp-business-directories-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hamza325-yp-business-directories-scraper",
        "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",
        "properties": {
          "pageUrl": {
            "title": "URL",
            "type": "string",
            "description": "A link from any directory in the network, when you already have one. Paste it straight from the address bar: a category page, a city page, a company profile, the browse pages, or a search-results page. A listing link that already points at page 2 (`/category/General_business/2`) continues from page 2 for as many pages as `maxPages` allows, so a long listing can be split across runs — page 1 in one run, pages 2-5 in the next — without the Actor having to remember anything between them."
          },
          "country": {
            "title": "Country",
            "enum": [
              "Albania",
              "Algeria",
              "Argentina",
              "Armenia",
              "Australia",
              "Austria",
              "Azerbaijan",
              "Bahamas",
              "Bahrain",
              "Bangladesh",
              "Barbados",
              "Belarus",
              "Belgium",
              "Belize",
              "Benin",
              "Bolivia",
              "Botswana",
              "Brazil",
              "Brunei",
              "Cambodia",
              "Cameroon",
              "Cayman Islands",
              "Chad",
              "Chile",
              "China",
              "Colombia",
              "Costa Rica",
              "Croatia",
              "Cuba",
              "Cyprus",
              "Djibouti",
              "Dominican Republic",
              "DR Congo",
              "Ecuador",
              "Egypt",
              "El Salvador",
              "Emirates",
              "Estonia",
              "Ethiopia",
              "Fiji",
              "Finland",
              "Florida",
              "Gabon",
              "Georgia",
              "Ghana",
              "Grenada",
              "Guadeloupe",
              "Guatemala",
              "Guyana",
              "Honduras",
              "Hong Kong",
              "Iceland",
              "India",
              "Indonesia",
              "Iran",
              "Ireland",
              "Israel",
              "Ivory Coast",
              "Jamaica",
              "Japan",
              "Jordan",
              "Kazakhstan",
              "Kenya",
              "Kuwait",
              "Kyrgyzstan",
              "Laos",
              "Lebanon",
              "Lesotho",
              "Libya",
              "Lithuania",
              "Luxembourg",
              "Madagascar",
              "Malawi",
              "Malaysia",
              "Maldives",
              "Mali",
              "Malta",
              "Martinique",
              "Mauritania",
              "Mauritius",
              "Mexico",
              "Morocco",
              "Mozambique",
              "Myanmar",
              "Namibia",
              "Nepal",
              "Netherlands",
              "New Zealand",
              "Nicaragua",
              "Niger",
              "Nigeria",
              "Norway",
              "Oman",
              "Pakistan",
              "Panama",
              "Papua New Guinea",
              "Paraguay",
              "Peru",
              "Philippines",
              "Poland",
              "Portugal",
              "Puerto Rico",
              "Qatar",
              "Romania",
              "Rwanda",
              "Saint Lucia",
              "Saudi Arabia",
              "Senegal",
              "Seychelles",
              "Singapore",
              "Slovakia",
              "Slovenia",
              "South Africa",
              "South Korea",
              "Sri Lanka",
              "Sudan",
              "Suriname",
              "Sweden",
              "Switzerland",
              "Syria",
              "Taiwan",
              "Tanzania",
              "Thailand",
              "Togo",
              "Trinidad and Tobago",
              "Tunisia",
              "Turkey",
              "Uganda",
              "United Kingdom",
              "Uruguay",
              "Uzbekistan",
              "Venezuela",
              "Vietnam",
              "Yemen",
              "Zambia",
              "Zimbabwe"
            ],
            "type": "string",
            "description": "The directory to read. Every country the network covers is in this list, with its hostname; a hostname is accepted too."
          },
          "searchQuery": {
            "title": "Search keywords",
            "type": "string",
            "description": "What you are looking for, sent to the directory's own search. The site keeps its results in the browser session, so the words cannot come from a pasted link and belong here. A keyword that matches exactly one company returns that company's full profile. Four directories publish no keyword search — DR Congo, Iceland, Laos and Lithuania — and a search there is refused with a message naming the alternatives."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "Optional city: keeps a search local, narrows a category listing, or is what the Location task reads. Names come from the `cities` task."
          },
          "startMode": {
            "title": "What to scrape",
            "enum": [
              "auto",
              "companies",
              "location",
              "search",
              "company",
              "categories",
              "cities"
            ],
            "type": "string",
            "description": "`auto` follows the pasted URL; the explicit tasks take their scope from these fields.",
            "default": "auto"
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Narrow a companies run to some categories: labels (`Cleaning equipment & Services`), URL slugs (`Cleaning_equipment_Services`) or ids from the `categories` mode. Leave empty for every category. A value that matches nothing fails the run with the real list instead of returning nothing, and categories are read from the live directory at the start of every run.",
            "items": {
              "type": "string"
            }
          },
          "companyUrls": {
            "title": "Company links or ids",
            "type": "array",
            "description": "Company task, required: profile links from any directory, or bare ids — the `companyId` column of a previous run works when `Countries` names the directory it came from.",
            "items": {
              "type": "string"
            }
          },
          "includeDetails": {
            "title": "Fetch full profiles",
            "type": "boolean",
            "description": "On: every company is read from its own page, adding opening hours, manager, employees, description, website address, categories, keywords, photos, products and reviews — one extra request per company. Off: the listing card is the row, which is roughly 20× faster and carries the name, address, phone, badges, coordinates and photo count. Profiles are always read in company mode.",
            "default": false
          },
          "verifiedOnly": {
            "title": "Verified listings only",
            "type": "boolean",
            "description": "Keep only companies the directory marks as verified — the badge a business earns by confirming its own details. Cheap: the listing page already carries the flag, so a rejected lead is dropped before its profile is fetched.",
            "default": false
          },
          "withPhoneOnly": {
            "title": "Only listings with a phone number",
            "type": "boolean",
            "description": "Drop companies that publish no phone number. The listing page carries the number, so this costs nothing extra even without full profiles. Note that some directories publish masked numbers (`+213****4222`); those still count as a phone, and `phoneMasked` says which they are.",
            "default": false
          },
          "withoutWebsiteOnly": {
            "title": "Only listings with no website",
            "type": "boolean",
            "description": "Keep the companies that have no website at all — the classic local-lead shortlist for web design, SEO or hosting outreach. The listing page states whether a website exists, so no profile fetch is needed to apply it.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 0,
            "maximum": 5000000,
            "type": "integer",
            "description": "Row cap for the whole run. The default keeps a run quick; 0 collects everything — the whole directory is about 13,000 companies, which takes roughly an hour in listing mode.",
            "default": 200
          },
          "maxPages": {
            "title": "Maximum pages per list",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Page cap for each category or city listing (20 companies per page). 0 pages every list to its end; a small number keeps a run short and cheap. It counts the pages actually read, so with a link that starts at page 2 it walks pages 2, 3, 4 … up to this many pages — the way to continue a long listing in a later run.",
            "default": 0
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Pause between two pages, in milliseconds. The directories ask visitors to wait 10 seconds between pages; the default is much shorter and is fine for ordinary use — raise it for very large sweeps.",
            "default": 250
          },
          "maxRequestRetries": {
            "title": "Retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many times a failed request is retried before it is given up on.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. When a directory refuses a request, the Actor retries it through Apify Proxy by itself, so nothing has to be set here; use this only to pin a proxy for the whole run."
          },
          "debugIncludeRaw": {
            "title": "Debug: include the parsed page record",
            "type": "boolean",
            "description": "Add the parsed page record to every row, for debugging.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}