{
  "openapi": "3.0.1",
  "info": {
    "title": "Local.ch Swiss Business Leads Scraper",
    "description": "Find Swiss businesses by keyword and location. Export clean, deduplicated leads with phones, emails, websites, addresses, contactability metrics and AI-ready summaries for CRM, sales and automation.",
    "version": "1.0",
    "x-build-id": "TJAT9ouqN4iqNxmxH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/swissdatatools~local-ch-swiss-business-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-swissdatatools-local-ch-swiss-business-leads",
        "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/swissdatatools~local-ch-swiss-business-leads/runs": {
      "post": {
        "operationId": "runs-sync-swissdatatools-local-ch-swiss-business-leads",
        "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/swissdatatools~local-ch-swiss-business-leads/run-sync": {
      "post": {
        "operationId": "run-sync-swissdatatools-local-ch-swiss-business-leads",
        "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": [
          "searchTerms",
          "locations"
        ],
        "properties": {
          "searchTerms": {
            "title": "What businesses are you looking for?",
            "minItems": 1,
            "type": "array",
            "description": "Enter one or more business types or keywords, such as plumber, dentist, restaurant, fiduciary, or electrician.",
            "items": {
              "type": "string"
            },
            "default": [
              "restaurant"
            ]
          },
          "locations": {
            "title": "Where in Switzerland?",
            "minItems": 1,
            "type": "array",
            "description": "Enter Swiss cities, cantons, regions, or postal codes such as Lausanne, Zürich, Geneva, VD, Ticino, or 1000 Lausanne.",
            "items": {
              "type": "string"
            },
            "default": [
              "Lausanne"
            ]
          },
          "maxResultsPerSearch": {
            "title": "Maximum results per search",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of businesses to keep for each keyword × location combination.",
            "default": 100
          },
          "maxTotalResults": {
            "title": "Maximum total results",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Hard cap for the whole run, after deduplication.",
            "default": 1000
          },
          "language": {
            "title": "Language",
            "enum": [
              "auto",
              "de",
              "fr",
              "it",
              "en"
            ],
            "type": "string",
            "description": "Language used for local.ch search pages and AI summaries. Auto picks French, German or Italian from the location.",
            "default": "auto"
          },
          "includeDetails": {
            "title": "Visit business profiles",
            "type": "boolean",
            "description": "Visit business profiles to collect descriptions and opening hours. Search pages already include phone, email, website and address for most listings.",
            "default": false
          },
          "includeAiSummary": {
            "title": "Include AI-ready summary",
            "type": "boolean",
            "description": "Add a deterministic Markdown summary (ai_summary) to each lead. No external LLM is used.",
            "default": true
          },
          "deduplicateResults": {
            "title": "Deduplicate results",
            "type": "boolean",
            "description": "Keep one row per business across all searches and merge matchedSearches.",
            "default": true
          },
          "includeOpeningHours": {
            "title": "Include opening hours",
            "type": "boolean",
            "description": "Collect structured opening hours from business profiles. Requires visiting detail pages.",
            "default": false
          },
          "includeSocialLinks": {
            "title": "Include social links",
            "type": "boolean",
            "description": "Collect Facebook, Instagram, LinkedIn and other public social links when local.ch publishes them.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many pages to fetch in parallel. Keep this low to reduce blocking and platform cost.",
            "default": 5
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Wait this many milliseconds before each request. Helps stay polite toward local.ch.",
            "default": 400
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy standard (datacenter) is required on the Apify platform. Local.ch otherwise returns an HTTP 200 anti-bot page with no listings. Leave the default on. Use residential groups only if standard proxy still gets blocked. Do not use this to bypass CAPTCHAs.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}