{
  "openapi": "3.0.1",
  "info": {
    "title": "Telefonbuch.de Scraper - German Directory & Phone Lookup",
    "description": "Scrape Das Telefonbuch (telefonbuch.de) — Germany's phone book. Search businesses by keyword & city, people by last name, or reverse phone lookup. Get full phone numbers, decoded emails, websites, opening hours, GPS and ratings. Incremental monitoring for cheap recurring runs.",
    "version": "1.0",
    "x-build-id": "lXTjhJeOeH6vMN55t"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/trev0n~telefonbuch-de-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-trev0n-telefonbuch-de-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/trev0n~telefonbuch-de-scraper/runs": {
      "post": {
        "operationId": "runs-sync-trev0n-telefonbuch-de-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/trev0n~telefonbuch-de-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-trev0n-telefonbuch-de-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": {
          "searchType": {
            "title": "Search type",
            "enum": [
              "business",
              "person",
              "reverse"
            ],
            "type": "string",
            "description": "What to search: <b>Businesses</b> (Branchen — companies by keyword/category), <b>People</b> (Personen — private phone-book entries by last name) or <b>Reverse phone lookup</b> (Rückwärtssuche — find who owns a number).",
            "default": "business"
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Business keyword/category (e.g. <i>Friseur</i>, <i>Zahnarzt</i>, <i>Restaurant</i>), last name for people search (e.g. <i>Müller</i>), or the full phone number for reverse lookup (e.g. <i>030 8 52 19 63</i>)."
          },
          "location": {
            "title": "Location (city)",
            "type": "string",
            "description": "German city or town, e.g. <i>Berlin</i>, <i>München</i>, <i>Hamburg</i>. Leave empty for a nationwide search (not used for reverse lookup)."
          },
          "startUrls": {
            "title": "Start URLs (advanced — overrides the search fields)",
            "type": "array",
            "description": "Optional. Paste any telefonbuch.de / dastelefonbuch.de URLs — a search-results page (e.g. https://www.dastelefonbuch.de/Branchen/Friseur/Berlin) or an entry detail page (adresse.dastelefonbuch.de/…). Auto-classified. When provided, these REPLACE the search fields above.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "includeDetails": {
            "title": "Fetch full entry details",
            "type": "boolean",
            "description": "When enabled, every entry's detail page is opened to collect email, website, fax, weekly opening hours, GPS coordinates and ratings (one extra request per entry). When disabled (default, cheapest), you still get the full listing card: name, complete address, FULL phone number and category.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on the number of records pushed to the dataset. Use 0 for unlimited. Note: the site itself serves at most ~500 results (50 pages) per query — split by city district or postcode for more.",
            "default": 100
          },
          "maxPages": {
            "title": "Max search pages",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of search-result pages to crawl (10 entries per page; the site clamps at 50 pages per query).",
            "default": 50
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of parallel requests.",
            "default": 10
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "type": "integer",
            "description": "How many times a failed request is retried.",
            "default": 5
          },
          "incremental": {
            "title": "Incremental monitoring",
            "type": "boolean",
            "description": "Track changes across runs. The first run records a baseline; later runs emit only NEW, UPDATED (e.g. changed phone/address) and REAPPEARED entries — typically 80–95% cheaper for recurring monitoring of the same search.",
            "default": false
          },
          "stateKey": {
            "title": "Monitoring state key",
            "type": "string",
            "description": "Optional. Identifier for this monitoring baseline. Leave empty to derive one automatically from the search fields. Use a fixed value to keep one baseline across config tweaks."
          },
          "emitUnchanged": {
            "title": "Emit unchanged entries",
            "type": "boolean",
            "description": "Incremental only. Also output entries that did not change since the last run.",
            "default": false
          },
          "emitExpired": {
            "title": "Emit expired entries",
            "type": "boolean",
            "description": "Incremental only. Also output entries that disappeared since the last run (e.g. business closed), tagged EXPIRED.",
            "default": false
          },
          "skipReposts": {
            "title": "Skip reposts",
            "type": "boolean",
            "description": "Incremental only. Drop NEW entries whose content matches a recently expired one (same entry re-listed under a new id).",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "The site blocks unproxied cloud IPs, so the automatic Apify Proxy (datacenter, cheapest) is the default and works well. For very large or fast runs, switch to RESIDENTIAL with country DE.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}