{
  "openapi": "3.0.1",
  "info": {
    "title": "Gelbe Seiten Scraper: German Businesses, Emails, No Login",
    "description": "Gelbe Seiten businesses by trade and place: phone, email the business published, website, address, coordinates, opening hours, rating. $1 per 1,000 results, platform usage included.",
    "version": "0.1",
    "x-build-id": "4h3gzYMEKajJrEorF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/one_dollar_store~gelbe-seiten-business-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-one_dollar_store-gelbe-seiten-business-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/one_dollar_store~gelbe-seiten-business-scraper/runs": {
      "post": {
        "operationId": "runs-sync-one_dollar_store-gelbe-seiten-business-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/one_dollar_store~gelbe-seiten-business-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-one_dollar_store-gelbe-seiten-business-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": {
          "queries": {
            "title": "Trades or business types",
            "maxItems": 200,
            "type": "array",
            "description": "What the businesses do, in German as you would type it on gelbeseiten.de, for example \"Klempner\", \"Steuerberater\", \"Zahnarzt\", \"Friseur\" or \"Pizza\". Each trade is searched in each place.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Places",
            "maxItems": 500,
            "type": "array",
            "description": "A town, district or postcode, for example \"Berlin\", \"München\", \"Bad Homburg\" or \"50667\". Leave empty to search the whole country (a common trade then has thousands of businesses, so set Maximum results).",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Gelbe Seiten addresses",
            "maxItems": 5000,
            "type": "array",
            "description": "Optional. Paste search pages such as https://www.gelbeseiten.de/suche/klempner/berlin, or single business pages such as https://www.gelbeseiten.de/gsbiz/<id>.",
            "items": {
              "type": "string"
            }
          },
          "includeDetails": {
            "title": "Open each business page",
            "type": "boolean",
            "description": "On: one extra request per business for map position, e-mail the business published, opening hours, description, keywords, payment methods and all phone numbers. Off: only what the search result shows (about 50 businesses a request, much faster).",
            "default": true
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "rating",
              "distance"
            ],
            "type": "string",
            "description": "Order of the results, the same three choices the site offers.",
            "default": "relevance"
          },
          "scope": {
            "title": "Search area",
            "enum": [
              "town",
              "surroundings",
              "related"
            ],
            "type": "string",
            "description": "Which businesses the site includes. Nearby towns widens the search the way the site does when it runs short. Related trades adds businesses from related categories (verwandte Branchen). The site cannot combine the two.",
            "default": "town"
          },
          "postalCodePrefixes": {
            "title": "Postcode starts with",
            "maxItems": 100,
            "type": "array",
            "description": "Keep businesses whose postcode starts with one of these, for example \"10\" for Berlin Mitte and surroundings or \"80331\" for one postcode. Read from the search result, so businesses that do not fit are skipped without opening their page.",
            "items": {
              "type": "string"
            }
          },
          "requireWebsite": {
            "title": "Only businesses with a website",
            "type": "boolean",
            "description": "Keep businesses that list a website.",
            "default": false
          },
          "requireEmail": {
            "title": "Only businesses with an e-mail address",
            "type": "boolean",
            "description": "Keep businesses that published an e-mail address on Gelbe Seiten. This needs the business pages, so Open each business page is turned on.",
            "default": false
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Keep businesses rated at least this many stars (1 to 5). Businesses without a rating are dropped when this is above 0.",
            "default": 0
          },
          "maxPerSearch": {
            "title": "Maximum results per search",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop each trade and place after this many businesses so one big town does not use the whole budget. 0 means no limit per search.",
            "default": 0
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 10,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many businesses in all. Minimum 10. With business pages on, the actor reads about one business a second, so 3,000 businesses take about an hour; raise the run timeout for more. With them off it reads about 50 businesses a second.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Leave the proxy off: the actor connects directly, which is what it was tested with. After two refused requests in a row it switches to the Apify datacenter proxy by itself. It stops after three refusals in a row and does not try to get past a verification page.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}