{
  "openapi": "3.0.1",
  "info": {
    "title": "Local Business Leads: Emails & Phones from OpenStreetMap",
    "description": "Generate local business leads with phone, email, website and address for any city and category, from OpenStreetMap open data, with optional website enrichment. Commercial use allowed with attribution.",
    "version": "0.1",
    "x-build-id": "qnb3y1rrsSGgaTJbp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fetchsmith-labs~local-business-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fetchsmith-labs-local-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/fetchsmith-labs~local-business-leads/runs": {
      "post": {
        "operationId": "runs-sync-fetchsmith-labs-local-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/fetchsmith-labs~local-business-leads/run-sync": {
      "post": {
        "operationId": "run-sync-fetchsmith-labs-local-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": [
          "locations",
          "categories"
        ],
        "properties": {
          "locations": {
            "title": "Locations",
            "minItems": 1,
            "type": "array",
            "description": "Cities, regions or countries to search, as free text. Each place is resolved to an OpenStreetMap area (for example \"Potsdam, Germany\" or \"Austin, Texas\"). Use \"City, Country\" for unambiguous results.",
            "default": [
              "Potsdam, Germany"
            ],
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Business categories",
            "type": "array",
            "description": "Business types to find. Each key maps to the matching OpenStreetMap tags (amenity, shop, craft, office, healthcare, leisure, tourism).",
            "items": {
              "type": "string",
              "enum": [
                "restaurant",
                "cafe",
                "bar",
                "hotel",
                "dentist",
                "doctor",
                "pharmacy",
                "hairdresser",
                "beauty",
                "car_repair",
                "car_dealer",
                "plumber",
                "electrician",
                "carpenter",
                "painter",
                "roofer",
                "lawyer",
                "accountant",
                "real_estate",
                "insurance",
                "fitness",
                "bakery",
                "florist",
                "optician",
                "veterinary",
                "physiotherapist",
                "architect",
                "it_services",
                "kindergarten",
                "school",
                "supermarket",
                "clothes",
                "furniture",
                "hardware",
                "bicycle"
              ],
              "enumTitles": [
                "Restaurant",
                "Cafe",
                "Bar",
                "Hotel",
                "Dentist",
                "Doctor",
                "Pharmacy",
                "Hairdresser",
                "Beauty",
                "Car repair",
                "Car dealer",
                "Plumber",
                "Electrician",
                "Carpenter",
                "Painter",
                "Roofer",
                "Lawyer",
                "Accountant",
                "Real estate agent",
                "Insurance",
                "Fitness",
                "Bakery",
                "Florist",
                "Optician",
                "Veterinary",
                "Physiotherapist",
                "Architect",
                "IT services",
                "Kindergarten",
                "School",
                "Supermarket",
                "Clothes",
                "Furniture",
                "Hardware",
                "Bicycle"
              ]
            },
            "default": [
              "dentist"
            ]
          },
          "customTags": {
            "title": "Custom OSM tags",
            "type": "array",
            "description": "Optional raw OpenStreetMap tags as key=value, for example craft=plumber or shop=bakery. Use key=* to match any value, or a|b for alternatives. Combined with the categories above.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "onlyWithContact": {
            "title": "Only businesses with contact data",
            "type": "boolean",
            "description": "Only output businesses that have a phone number, email or website in OpenStreetMap. Recommended for lead generation.",
            "default": true
          },
          "requireEmail": {
            "title": "Require an email address",
            "type": "boolean",
            "description": "Only output businesses with an email address (from OpenStreetMap, or found on their website if website enrichment is on).",
            "default": false
          },
          "enrichFromWebsite": {
            "title": "Enrich from business website",
            "type": "boolean",
            "description": "If a business has a website but OpenStreetMap lacks its email or phone, fetch the homepage and an obvious contact/imprint page to look for them. Respects robots.txt, plain HTTP, 10 s timeout. Pages that block automated access (403, challenge pages) are skipped. Billed with the extra event enriched-lead only when something new is found.",
            "default": false
          },
          "maxItems": {
            "title": "Max businesses",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of businesses to output in total across all locations. Businesses with the richest contact data come first.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}