{
  "openapi": "3.0.1",
  "info": {
    "title": "Local Business Leads Finder: OpenStreetMap Open Data",
    "description": "Find local businesses by category and city from OpenStreetMap open data: name, address, phone, website, opening hours, brand, coordinates and OSM link. Open data for local business leads and directories, licensed under the ODbL. Flags businesses with no website. USD 0.50 per 1,000 businesses.",
    "version": "1.0",
    "x-build-id": "5jhNQX2tI6AsUnrcv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jtpalms~osm-business-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jtpalms-osm-business-finder",
        "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/jtpalms~osm-business-finder/runs": {
      "post": {
        "operationId": "runs-sync-jtpalms-osm-business-finder",
        "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/jtpalms~osm-business-finder/run-sync": {
      "post": {
        "operationId": "run-sync-jtpalms-osm-business-finder",
        "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": {
          "category": {
            "title": "Category",
            "enum": [
              "dentist",
              "doctor",
              "pharmacy",
              "veterinary",
              "restaurant",
              "cafe",
              "bar",
              "bakery",
              "hairdresser",
              "beauty",
              "gym",
              "hotel",
              "car_repair",
              "car_dealer",
              "plumber",
              "electrician",
              "hvac",
              "roofer",
              "lawyer",
              "accountant",
              "insurance",
              "school",
              "childcare",
              "supermarket",
              "convenience",
              "clothes",
              "hardware",
              "florist",
              "pet_store",
              "bicycle_shop"
            ],
            "type": "string",
            "description": "Type of business. Each category maps to OpenStreetMap tags (listed in the README), for example Dentists = amenity=dentist or healthcare=dentist. Leave empty to search only by custom tags."
          },
          "customTags": {
            "title": "Custom OpenStreetMap tags (optional)",
            "type": "array",
            "description": "Extra tags in key=value form, for example shop=bakery or craft=carpenter. Use key=* for any value. They are ORed with the category (a business matching any of them is found). Tag list: https://wiki.openstreetmap.org/wiki/Map_features",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City, region or neighbourhood, for example Brampton, Ontario. It is looked up once on OpenStreetMap Nominatim and remembered for 30 days, so reruns do not look it up again. The search covers the place boundary. Not used when a bounding box or latitude/longitude is given."
          },
          "boundingBox": {
            "title": "Bounding box (optional)",
            "type": "string",
            "description": "Search a rectangle instead of a place: south,west,north,east in decimal degrees, for example 43.60,-79.89,43.85,-79.63. No place lookup is made."
          },
          "latitude": {
            "title": "Latitude (optional)",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Centre of a circle search in decimal degrees, for example 43.6858. Use with longitude and radius. No place lookup is made."
          },
          "longitude": {
            "title": "Longitude (optional)",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "Centre of a circle search in decimal degrees, for example -79.7599."
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 0.1,
            "maximum": 50,
            "type": "number",
            "description": "Radius of the circle search, 0.1 to 50 km. Used only with latitude and longitude.",
            "default": 5
          },
          "onlyWithoutWebsite": {
            "title": "Only businesses without a website",
            "type": "boolean",
            "description": "Keep only businesses that have no website in OpenStreetMap: a prospect list for web design and local SEO agencies. Note that OpenStreetMap often lacks websites that do exist.",
            "default": false
          },
          "onlyWithWebsite": {
            "title": "Only businesses with a website",
            "type": "boolean",
            "description": "Keep only businesses that have a website in OpenStreetMap. Cannot be combined with the option above.",
            "default": false
          },
          "excludeChains": {
            "title": "Exclude chains",
            "type": "boolean",
            "description": "Drop businesses that carry a brand tag in OpenStreetMap (chains and franchises such as Tim Hortons or Starbucks), keeping independents.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum businesses",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many businesses. Each business is billed once.",
            "default": 1000
          },
          "overpassUrl": {
            "title": "Overpass server",
            "type": "string",
            "description": "OpenStreetMap Overpass API endpoint. The default is the main public server (overpass-api.de). If it is busy the actor waits and retries, then tries the public Private.coffee community instance (overpass.private.coffee) once, then the main server once more. You can enter your own Overpass server here.",
            "default": "https://overpass-api.de/api/interpreter"
          },
          "nominatimUrl": {
            "title": "Nominatim server",
            "type": "string",
            "description": "Place lookup endpoint (Nominatim search). The default is the public OpenStreetMap server, used at most once per place every 30 days. Change it only if that server asks apps to switch, or to use your own.",
            "default": "https://nominatim.openstreetmap.org/search"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}