{
  "openapi": "3.0.1",
  "info": {
    "title": "Local Business Leads — Google Maps Alternative (OpenStreetMap)",
    "description": "Find businesses by type and place like on Google Maps: name, category, address, coordinates, phone, website, opening hours, plus emails and social links from their websites. Open data, no proxies, no login.",
    "version": "0.0",
    "x-build-id": "4748nv1JRHzXvM6Dx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/codepal~local-business-leads-osm/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-codepal-local-business-leads-osm",
        "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/codepal~local-business-leads-osm/runs": {
      "post": {
        "operationId": "runs-sync-codepal-local-business-leads-osm",
        "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/codepal~local-business-leads-osm/run-sync": {
      "post": {
        "operationId": "run-sync-codepal-local-business-leads-osm",
        "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": [
          "searchStringsArray"
        ],
        "properties": {
          "searchStringsArray": {
            "title": "Search terms",
            "type": "array",
            "description": "Business types or names, e.g. <code>restaurant</code>, <code>dentist</code>, <code>hardware store</code>, <code>Java House</code>. 150+ common categories are matched to OpenStreetMap tags; anything else is searched by name.",
            "items": {
              "type": "string"
            }
          },
          "locationQuery": {
            "title": "Location",
            "type": "string",
            "description": "City, district, county or country, e.g. <code>Westlands, Nairobi, Kenya</code> or <code>Berlin, Germany</code>. Searches the whole administrative area."
          },
          "maxCrawledPlacesPerSearch": {
            "title": "Max places per search term",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "The most complete listings (with phone, website, hours) come first. 0 = no limit.",
            "default": 200
          },
          "scrapeContacts": {
            "title": "Find emails & social profiles on business websites",
            "type": "boolean",
            "description": "Visits each business's website (home page + up to 2 contact/about pages) and adds emails, extra phone numbers and Facebook, Instagram, LinkedIn, X, YouTube, TikTok and WhatsApp links.",
            "default": true
          },
          "skipClosedPlaces": {
            "title": "Skip closed places",
            "type": "boolean",
            "description": "Leave out places marked as disused, abandoned or closed.",
            "default": true
          },
          "requireWebsite": {
            "title": "Only places with a website",
            "type": "boolean",
            "description": "Useful for web-design, SEO and digital-marketing outreach.",
            "default": false
          },
          "requirePhone": {
            "title": "Only places with a phone number",
            "type": "boolean",
            "description": "Useful for call and SMS/WhatsApp campaigns.",
            "default": false
          },
          "radiusKm": {
            "title": "Radius around the location (km)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Optional. Search a circle around the location's centre instead of the whole administrative area. Also used with custom coordinates (default 5 km)."
          },
          "latitude": {
            "title": "Latitude",
            "type": "string",
            "description": "Optional centre point, e.g. <code>-1.2864</code>. Use with Longitude and Radius."
          },
          "longitude": {
            "title": "Longitude",
            "type": "string",
            "description": "Optional centre point, e.g. <code>36.8172</code>."
          },
          "boundingBox": {
            "title": "Bounding box",
            "type": "string",
            "description": "Optional rectangle <code>south,west,north,east</code>, e.g. <code>-1.33,36.70,-1.20,36.95</code>. Overrides other area settings."
          },
          "maxPagesPerSite": {
            "title": "Max pages per website",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Website pages read per business when finding contacts.",
            "default": 3
          },
          "includeRawTags": {
            "title": "Include all OpenStreetMap tags",
            "type": "boolean",
            "description": "Adds the raw <code>osmTags</code> object (cuisine, payment methods, accessibility, brand IDs and more).",
            "default": false
          },
          "overpassUrls": {
            "title": "Overpass API servers",
            "type": "array",
            "description": "Optional. Your own Overpass endpoints. By default several public servers are used with automatic failover.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "proxyConfiguration": {
            "title": "Proxy for business websites",
            "type": "object",
            "description": "Not needed in most cases: map data comes from open APIs and business websites rarely block. Turn on only if many websites show as unreachable.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}