{
  "openapi": "3.0.1",
  "info": {
    "title": "Gelbe Seiten Scraper: German Business Leads",
    "description": "Collect live German business data from Gelbe Seiten by city and category: names, addresses, phones, websites, ratings, and reviews — plus contact emails and social profiles for outreach teams. Rows stream to your dataset as structured JSON in real time.",
    "version": "0.0",
    "x-build-id": "AtE0qYaWdKNplFX3G"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/b2b_leads~Gelbe-Seiten-Real-Time-Data-Scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-b2b_leads-Gelbe-Seiten-Real-Time-Data-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/b2b_leads~Gelbe-Seiten-Real-Time-Data-Scraper/runs": {
      "post": {
        "operationId": "runs-sync-b2b_leads-Gelbe-Seiten-Real-Time-Data-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/b2b_leads~Gelbe-Seiten-Real-Time-Data-Scraper/run-sync": {
      "post": {
        "operationId": "run-sync-b2b_leads-Gelbe-Seiten-Real-Time-Data-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": {
          "enableCitySearch": {
            "title": "Search by city & category",
            "type": "boolean",
            "description": "Search a branch within a city — the classic branchenbuch lookup. On by default with a ready-to-run demo below. NOTE: free Apify plans are limited to a small sample of results per run — upgrade to a paid plan for full, unlimited data.",
            "default": true
          },
          "cityTasks": {
            "title": "City search tasks",
            "type": "array",
            "description": "One row per category + city search. Click \"+ Add\" for every additional search. \"Max results\" governs that one row and collection continues until it is reached or the directory runs out of results.",
            "items": {
              "type": "object",
              "properties": {
                "category": {
                  "title": "Category (branch)",
                  "type": "string",
                  "description": "The branch to look up, as a slug or plain words — e.g. \"steuerberater\", \"zahnarzt\", \"hotel\", \"autohändler\".",
                  "editor": "textfield"
                },
                "city": {
                  "title": "City",
                  "type": "string",
                  "description": "City for this search, e.g. \"berlin\", \"münchen\", \"hamburg\", \"köln\". Umlauts are fine.",
                  "editor": "textfield"
                },
                "maxResults": {
                  "title": "Max results",
                  "type": "integer",
                  "description": "Maximum rows this one search may return. Collection continues until this number is reached or the directory runs out of results — whichever comes first.",
                  "minimum": 1,
                  "prefill": 10,
                  "editor": "number"
                }
              },
              "required": [
                "category",
                "city"
              ]
            },
            "default": []
          },
          "enableKeywordSearch": {
            "title": "Search by keyword (nationwide)",
            "type": "boolean",
            "description": "Search the whole directory with free-text keywords, without a city filter — e.g. \"steuerberater\", \"buchhaltung\", \"dachdecker\". Off by default; the demo rows below are ready to run the moment you switch it on.",
            "default": false
          },
          "keywordTasks": {
            "title": "Keyword search tasks",
            "type": "array",
            "description": "One row per nationwide keyword search. Click \"+ Add\" for every additional keyword. \"Max results\" governs that one row.",
            "items": {
              "type": "object",
              "properties": {
                "keyword": {
                  "title": "Keyword",
                  "type": "string",
                  "description": "Free-text search term, e.g. \"steuerberater\", \"zahnarzt\", \"hotel\". Searched across all of Germany.",
                  "editor": "textfield"
                },
                "maxResults": {
                  "title": "Max results",
                  "type": "integer",
                  "description": "Maximum rows this one search may return. Collection continues until this number is reached or the directory runs out of results — whichever comes first.",
                  "minimum": 1,
                  "prefill": 10,
                  "editor": "number"
                }
              },
              "required": [
                "keyword"
              ]
            },
            "default": []
          },
          "enableScrapeByUrl": {
            "title": "Listing URLs",
            "type": "boolean",
            "description": "Collect full details for specific Gelbe Seiten listing URLs instead of (or in addition to) searches.",
            "default": false
          },
          "scrapeUrls": {
            "title": "Listing URLs list",
            "type": "array",
            "description": "Gelbe Seiten listing URLs (https://www.gelbeseiten.de/gsbiz/...).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "enableEnrichment": {
            "title": "Details & enrichment",
            "type": "boolean",
            "description": "Master switch for the enrichments below. Off = fast mode (only the fields the results page already shows). Every result is still exported either way — enrichment fills fields in place, it never filters or drops rows.",
            "default": false
          },
          "enableListingDetails": {
            "title": "Full listing details",
            "type": "boolean",
            "description": "Fill each result with description, opening hours, payment methods, coordinates, fax, and services. Applies when the master switch above is on.",
            "default": false
          },
          "enableLeadDetails": {
            "title": "Lead details (email discovery)",
            "type": "boolean",
            "description": "Fill contact emails and social profiles discovered on the business's own website (businesses with a website only). Applies when the master switch above is on.",
            "default": false
          },
          "enableReviews": {
            "title": "Reviews",
            "type": "boolean",
            "description": "Collect the aggregate rating and public customer reviews for each listing (capped per business). Applies when the master switch above is on.",
            "default": false
          },
          "concurrency": {
            "title": "Details concurrency",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "How many detail enrichments run in parallel (1–4). Higher is faster but a bit harder on rate limits.",
            "default": 2
          },
          "webhookUrl": {
            "title": "Webhook URL (optional)",
            "type": "string",
            "description": "Every record is always saved to the run's dataset — a webhook is an ADDITIONAL real-time push. When set, each new record is also POSTed to this URL (CRM, Zapier, Make, Google Sheets).",
            "default": ""
          },
          "webhookFormat": {
            "title": "Webhook format",
            "type": "string",
            "description": "json = full record object; slack = Slack-friendly message payload.",
            "default": "json"
          },
          "proxyConfiguration": {
            "title": "Proxy settings",
            "type": "object",
            "description": "Apify residential proxy is enabled by default for reliable results.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}