{
  "openapi": "3.0.1",
  "info": {
    "title": "German B2B Leads: Gelbe Seiten + Das Telefonbuch & Impressum",
    "description": "2-in-1 German B2B directory scraper for GelbeSeiten.de & DasTelefonbuch.de with § 5 DDG Impressum KYB enrichment. Extracts phones, decoded websites, direct emails, CEO/Geschäftsführer, VAT ID (USt-IdNr.), HRB/HRA register, court & LinkedIn with field-level source URLs.",
    "version": "0.5",
    "x-build-id": "f6h5AIvS8Ul1nzCaH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/b2b-datalabs~gelbeseiten-dastelefonbuch-b2b-leads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-b2b-datalabs-gelbeseiten-dastelefonbuch-b2b-leads-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-datalabs~gelbeseiten-dastelefonbuch-b2b-leads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-b2b-datalabs-gelbeseiten-dastelefonbuch-b2b-leads-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-datalabs~gelbeseiten-dastelefonbuch-b2b-leads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-b2b-datalabs-gelbeseiten-dastelefonbuch-b2b-leads-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",
        "required": [
          "searchQuery",
          "location"
        ],
        "properties": {
          "portal": {
            "title": "German business directory",
            "enum": [
              "ALL",
              "GELBESEITEN",
              "DASTELEFONBUCH"
            ],
            "type": "string",
            "description": "ALL balances unique accepted records across both directories; unused quota transfers when one source ends.",
            "default": "ALL"
          },
          "searchQuery": {
            "title": "Business category or keyword",
            "minLength": 1,
            "maxLength": 160,
            "type": "string",
            "description": "German category or business keyword, such as Software, Steuerberater or Maschinenbau.",
            "default": "Software"
          },
          "location": {
            "title": "German city, region or postal code",
            "minLength": 1,
            "maxLength": 160,
            "type": "string",
            "description": "Location used by the source directories. Nearby towns may appear in directory results.",
            "default": "München"
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum unique company records to save (1–5,000). Start with 20. Availability and your run budget may reduce the result count. Base event: $0.003 per saved company.",
            "default": 20
          },
          "extractEmailsAndSocials": {
            "title": "Add website email, CEO, VAT and social data",
            "type": "boolean",
            "description": "Find source-backed business email, legal representatives, VAT/register details and social profiles on company websites and Impressum pages. $0.008 once per eligible company, regardless of field count; $0.000 extra when no eligible data is found. Identity matching is heuristic, not an official registry or email-deliverability check.",
            "default": true
          },
          "deduplicationMode": {
            "title": "Deduplication unit",
            "enum": [
              "company",
              "location"
            ],
            "type": "string",
            "description": "company: normalized legal name plus host or postal code. PPE runs require company mode to avoid billing multiple locations of the same matched company. location: name plus full street/postal address; unmonetized tests only.",
            "default": "company"
          },
          "useApifyProxy": {
            "title": "Use Apify datacenter proxy for directory search",
            "type": "boolean",
            "description": "Uses the account default Apify proxy configuration only for directory search pages; company sites and robots.txt requests are direct. No residential proxy is selected by this code.",
            "default": true
          },
          "enrichmentConcurrency": {
            "title": "Concurrent company sites",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum active website crawls and batch size. The cache shares concurrent downloads of the same site.",
            "default": 10
          },
          "requestTimeoutSecs": {
            "title": "Company HTTP request timeout (seconds)",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "Timeout of an individual company-site request; the total site deadline also applies.",
            "default": 5
          },
          "siteTimeoutSecs": {
            "title": "Total company-site timeout (seconds)",
            "minimum": 5,
            "maximum": 90,
            "type": "integer",
            "description": "Includes robots, DNS, redirects, sitemaps and all page requests. Partial evidence is retained on timeout.",
            "default": 25
          },
          "maxRequestsPerSite": {
            "title": "Maximum HTTP requests per company site",
            "minimum": 3,
            "maximum": 40,
            "type": "integer",
            "description": "Includes robots, redirects, TLS retry and sitemaps, limiting failure-path cost.",
            "default": 16
          },
          "maxPagesPerSite": {
            "title": "Maximum analyzed pages per company site",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Successful distinct HTML pages. A complete legal page may stop exploration earlier.",
            "default": 5
          },
          "maxPagesPerPortal": {
            "title": "Maximum pages per directory",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Safety limit; repeated pages stop pagination. Explicit next links take precedence over the guarded legacy URL pattern.",
            "default": 250
          },
          "maxResponseBytes": {
            "title": "Maximum decompressed response bytes",
            "minimum": 65536,
            "maximum": 4194304,
            "type": "integer",
            "description": "Abort downloads above this bound before buffering the entire response. Large pages are reported as body_too_large.",
            "default": 2097152
          },
          "requestDelayMillis": {
            "title": "Minimum company-host delay (milliseconds)",
            "minimum": 100,
            "maximum": 5000,
            "type": "integer",
            "description": "Minimum interval between requests to one host; a larger robots crawl-delay takes precedence.",
            "default": 150
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt on company websites",
            "type": "boolean",
            "description": "Check published robots.txt rules on company websites (directory searches are unaffected). Disable only where you have authorization to fetch restricted website paths.",
            "default": true
          },
          "allowInsecureTls": {
            "title": "Retry an invalid website certificate",
            "type": "boolean",
            "description": "Only after a certificate validation error, retry that company host once without certificate verification. Explicitly flagged fields from this recovery cannot trigger the enrichment fee. Directory TLS remains verified.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}