{
  "openapi": "3.0.1",
  "info": {
    "title": "Africa Business Directory Scraper — 12 Countries",
    "description": "Scrape business listings across 12 African countries from the BusinessList / Yello network. Registration codes, VAT numbers, employee bands and named managers that Google Maps does not carry.",
    "version": "1.0",
    "x-build-id": "AZC6xFN5Nq4AXRFyM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/piquno~businesslist-africa-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-piquno-businesslist-africa-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/piquno~businesslist-africa-scraper/runs": {
      "post": {
        "operationId": "runs-sync-piquno-businesslist-africa-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/piquno~businesslist-africa-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-piquno-businesslist-africa-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": {
          "country": {
            "title": "Country",
            "enum": [
              "nigeria",
              "kenya",
              "ghana",
              "uganda",
              "zimbabwe",
              "egypt",
              "southafrica",
              "tanzania",
              "zambia",
              "ethiopia",
              "cameroon",
              "rwanda"
            ],
            "type": "string",
            "description": "Which national directory to crawl. Each country is a separate site sharing the same structure.",
            "default": "nigeria"
          },
          "indexType": {
            "title": "Browse by",
            "enum": [
              "category",
              "location"
            ],
            "type": "string",
            "description": "Crawl an industry category or a city. The site does not support combining the two.",
            "default": "category"
          },
          "slugs": {
            "title": "Categories or cities",
            "type": "array",
            "description": "Slugs to crawl, e.g. restaurants, construction-services, lagos. Find them on the site's own browse pages — slug style differs per country (Nigeria and Kenya use hyphens, Ghana uses underscores).",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Optional. Paste directory index URLs directly. Overrides country, browse-by and slugs.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResults": {
            "title": "Max businesses",
            "minimum": 1,
            "type": "integer",
            "description": "Hard limit. Index pages return 20 businesses each, so this divided by 20 is your request count — and at the default 40s crawl delay each of those costs 40 seconds. The default of 20 is a single index page, which returns in seconds; raise it for a bulk crawl and expect roughly 1,800 businesses per hour.",
            "default": 20
          },
          "fetchDetails": {
            "title": "Fetch full company profiles",
            "type": "boolean",
            "description": "Visit each company page for registration code, VAT number, employee band, manager, establishment year, opening hours, coordinates and products. SLOW — it costs one extra request per business. Leave off for bulk name/address/phone extraction, which the index pages already provide.",
            "default": false
          },
          "requestDelaySecs": {
            "title": "Delay between requests (seconds)",
            "minimum": 0,
            "type": "integer",
            "description": "The directory publishes Crawl-delay: 40 in its robots.txt and this actor honours it by default. Lowering it departs from what the site asks for and raises your risk of being blocked. At 40s an index page yields 20 businesses, so bulk mode collects roughly 1,800 businesses per hour.",
            "default": 40
          },
          "incremental": {
            "title": "Incremental mode (only new businesses)",
            "type": "boolean",
            "description": "Remember company ids between runs and emit only listings not seen before.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Namespace for incremental state. Use a different key per saved crawl.",
            "default": "default"
          },
          "verifiedOnly": {
            "title": "Verified listings only",
            "type": "boolean",
            "description": "Keep only businesses the directory marks as verified.",
            "default": false
          },
          "withPhoneOnly": {
            "title": "Only listings with a phone number",
            "type": "boolean",
            "description": "Drop listings that published no contact number. Index pages carry the phone, so this works without full profiles.",
            "default": false
          },
          "withRegistrationOnly": {
            "title": "Only listings with a company registration code",
            "type": "boolean",
            "description": "The strongest signal that a business is formally incorporated. Requires full profiles to be fetched.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Keep Apify Proxy enabled. The directory returns 403 to Apify's bare container egress but serves normally through the Apify Proxy datacenter pool — measured 0/4 without it and 20/20 with it. Datacenter proxy is included on every plan; residential is not needed.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}