{
  "openapi": "3.0.1",
  "info": {
    "title": "Local Business Leads from OpenStreetMap",
    "description": "Find local businesses by category in any suburb, city or radius from OpenStreetMap open data: name, address, phone, email, website, socials and a lead score. No login.",
    "version": "1.3",
    "x-build-id": "oyfy0qjStk8Q7HvNz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/southern-data~osm-business-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-southern-data-osm-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/southern-data~osm-business-leads/runs": {
      "post": {
        "operationId": "runs-sync-southern-data-osm-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/southern-data~osm-business-leads/run-sync": {
      "post": {
        "operationId": "run-sync-southern-data-osm-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",
        "properties": {
          "categories": {
            "title": "Business categories",
            "type": "array",
            "description": "Plain-English categories (e.g. \"cafe\", \"plumber\", \"dentist\", \"real estate agent\") or raw OSM tag filters like \"shop=florist\" or \"craft=electrician\". 135 built-in categories (full list in the README) plus common synonyms (\"hair salon\", \"solicitor\", \"pizzeria\") and small typos (\"resturant\"). Unknown words are skipped with suggestions — nothing is guessed from partial matches.",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City, suburb, region or country, e.g. \"City of Newcastle, NSW, Australia\". Resolved with OpenStreetMap Nominatim; the place found (and its country) is shown in the run status before anything is fetched. If your text matches only a suburb, the surrounding city is used unless \"Exact location only\" is ticked. Leave empty if you give coordinates below."
          },
          "strictLocation": {
            "title": "Exact location only",
            "type": "boolean",
            "description": "By default, a place name that only matches a suburb (e.g. \"Newcastle, NSW\" → the suburb Newcastle) is widened to the city it belongs to (City of Newcastle). Tick this to search exactly the place Nominatim returns.",
            "default": false
          },
          "countryCode": {
            "title": "Country code (optional)",
            "type": "string",
            "description": "Two-letter ISO code (e.g. au, gb, us) to stop place names like \"Newcastle\" or \"Perth\" resolving to the wrong country. The resolved place and any other matches are printed in the log before anything is fetched."
          },
          "searchMode": {
            "title": "Search area",
            "enum": [
              "boundary",
              "radius"
            ],
            "type": "string",
            "description": "\"boundary\" searches inside the official administrative boundary of the location (most accurate). \"radius\" searches a circle around the location centre or the coordinates you give.",
            "default": "boundary"
          },
          "latitude": {
            "title": "Latitude (radius mode)",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Optional centre latitude, e.g. -32.9283. Overrides the location centre."
          },
          "longitude": {
            "title": "Longitude (radius mode)",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "Optional centre longitude, e.g. 151.7817."
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 0.1,
            "maximum": 100,
            "type": "number",
            "description": "Used in radius mode, and as a fallback when the location has no boundary.",
            "default": 5
          },
          "onlyWithContact": {
            "title": "Only leads with a phone, email or website",
            "type": "boolean",
            "description": "Skip places with no phone, email or website (recommended — you only pay for contactable leads). Untick to get every named business, e.g. for mapping or market sizing.",
            "default": true
          },
          "requireFields": {
            "title": "Required fields",
            "type": "array",
            "description": "Only return leads that have ALL of these fields.",
            "items": {
              "type": "string",
              "enum": [
                "phone",
                "email",
                "website",
                "openingHours",
                "address"
              ]
            },
            "default": []
          },
          "websiteFilter": {
            "title": "Website filter",
            "enum": [
              "any",
              "with_website",
              "without_website",
              "no_real_website"
            ],
            "type": "string",
            "description": "Find local businesses without a website, e.g. to sell web design.<br>• <b>without_website</b>: no website listed in OpenStreetMap.<br>• <b>no_real_website</b>: no website, <i>or</i> the \"website\" is just a Facebook/Instagram/Linktree/Yelp/Google Maps page. Turn on <b>Check websites are live</b> as well to also include businesses whose own website is dead (domain gone) or returns 404 Not Found. Every row says why in <code>websitePresence</code> (none / social_only / dead / broken).",
            "default": "any"
          },
          "findEmails": {
            "title": "Find emails on business websites",
            "type": "boolean",
            "description": "For leads with a website but no email in OpenStreetMap, visit the homepage and up to 2 contact/about pages (one site at a time, politely) and extract published emails, including Cloudflare-obfuscated ones. Template placeholders (info@mysite.com), web-agency credits (\"website by …\") and injected spam are filtered out; the business's own-domain address is preferred, then free mailboxes (gmail, bigpond…). Each email has emailSource and the exact page it was found on (emailFoundOn). Only delivered leads with a found email are charged. Check your local anti-spam law before emailing (e.g. Australia's Spam Act 2003).",
            "default": false
          },
          "checkWebsites": {
            "title": "Check websites are live",
            "type": "boolean",
            "description": "Send one lightweight request to each lead's own website and report websiteState: live, live_blocked (answers but blocks bots), http_error (404/5xx), tls_error (broken HTTPS certificate — browsers show a warning), dead (domain gone / refused) or inconclusive (timeout — not proof it is down). Great for web-design / SEO prospecting.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many leads (0 = no limit). With \"Required fields\" = email and \"Find emails\" on, the limit counts leads WITH an email: websites are searched (best leads first, up to 5× this number) until enough are found.",
            "default": 200
          },
          "excludeSeenStore": {
            "title": "Skip leads delivered in earlier runs (store name)",
            "type": "string",
            "description": "Name of a key-value store in your account, e.g. \"newcastle-leads\". Leads delivered by any run that used the same name are skipped, so scheduled runs only return NEW businesses. Leave empty to disable."
          },
          "dryRun": {
            "title": "Dry run: count only, deliver nothing",
            "type": "boolean",
            "description": "Resolve the area, query OpenStreetMap and report how many leads match (before and after maxResults), how many have phone / email / website and, on pay-per-event pricing, the estimated cost — in the run status and RUN_SUMMARY, without writing or charging anything. Use it before big areas.",
            "default": false
          },
          "overpassUrl": {
            "title": "Overpass API endpoint (advanced)",
            "type": "string",
            "description": "Leave empty to use the public OpenStreetMap (Overpass) servers with automatic failover, slot checks and backoff. Set your own Overpass instance for very large jobs."
          },
          "selfTest": {
            "title": "Self-test (health check)",
            "type": "boolean",
            "description": "Run the built-in health check instead of a search: offline checks of category matching, de-duplication and email filtering plus three tiny live checks (Nominatim, Overpass, one website). Writes no rows and charges nothing; the run fails if a check fails. Other inputs are ignored.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}