{
  "openapi": "3.0.1",
  "info": {
    "title": "Foursquare Places Scraper - Search, Chains, Phones & Emails",
    "description": "Search Foursquare places by city, radius, category and name: address, coordinates, categories, phone, website, email, socials, date created and refreshed. Or pull a chain's live locations in 20 US cities with rating, check-ins, hours and tips. No login or API key.",
    "version": "0.1",
    "x-build-id": "nX4kdzczUtymB45XZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapersdelight~foursquare-places-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapersdelight-foursquare-places-scraper",
        "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/scrapersdelight~foursquare-places-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapersdelight-foursquare-places-scraper",
        "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/scrapersdelight~foursquare-places-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapersdelight-foursquare-places-scraper",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "chainLocations"
            ],
            "type": "string",
            "description": "Search = places by area, category and name from Foursquare Open Source Places (release 2025-02-06, with email and dates). Chain locations = live foursquare.com pages with rating, hours and tips (up to 30 per chain and city).",
            "default": "search"
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Search mode. Foursquare category names or ids, any level, e.g. \"Coffee Shop\", \"Dentist\", \"Pizzeria\", \"Restaurant\", \"4bf58dd8d48988d1e0931735\". A place matches if any of its categories contains one of these.",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Place name contains",
            "type": "array",
            "description": "Search mode. Keep places whose name contains any of these words, e.g. \"starbucks\", \"pizza\", \"dental\". Combines with Categories (both must match). Empty = any name.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Search mode. Cities as \"City, Region, Country\" (\"Austin, TX\", \"Berlin, Germany\"), coordinates \"40.758,-73.985\", or a country name for a whole-country search. Results come nearest the centre first.",
            "items": {
              "type": "string"
            }
          },
          "chains": {
            "title": "Chains (chain locations mode)",
            "type": "array",
            "description": "Chain or brand names, e.g. \"Starbucks\", \"Target\", \"CVS Pharmacy\", \"Chipotle\", \"7-Eleven\". Each is read for every city picked below (all 20 if none).",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities (chain locations mode)",
            "type": "array",
            "description": "US metros foursquare.com publishes chain pages for. Empty = all 20.",
            "items": {
              "type": "string",
              "enum": [
                "atlanta",
                "boston",
                "chicago",
                "cleveland",
                "dallas",
                "denver",
                "detroit",
                "houston",
                "los-angeles",
                "miami",
                "minneapolis",
                "new-york-city",
                "orlando",
                "philadelphia",
                "phoenix",
                "sacramento",
                "san-francisco",
                "seattle",
                "tampa",
                "washington-dc"
              ],
              "enumTitles": [
                "Atlanta",
                "Boston",
                "Chicago",
                "Cleveland",
                "Dallas",
                "Denver",
                "Detroit",
                "Houston",
                "Los Angeles",
                "Miami",
                "Minneapolis",
                "New York City",
                "Orlando",
                "Philadelphia",
                "Phoenix",
                "Sacramento",
                "San Francisco",
                "Seattle",
                "Tampa",
                "Washington, DC"
              ]
            }
          },
          "startUrls": {
            "title": "Chain location URLs",
            "type": "array",
            "description": "Chain locations mode. foursquare.com/locations/<chain>/<city> links from any Foursquare host, e.g. https://foursquare.com/locations/starbucks/new-york-city. Adds to Chains x Cities.",
            "items": {
              "type": "string"
            }
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 0,
            "maximum": 500,
            "type": "number",
            "description": "Search radius around each location. 0 = automatic: 2 km around coordinates, 2-30 km around a city by its size (New York 30, Berlin 22, Austin 12).",
            "default": 0
          },
          "boundingBox": {
            "title": "Bounding box",
            "type": "string",
            "description": "Search a rectangle instead of (or as well as) locations: \"minLongitude,minLatitude,maxLongitude,maxLatitude\", e.g. \"-74.02,40.70,-73.93,40.80\" (Manhattan)."
          },
          "categoryGroup": {
            "title": "Category group",
            "enum": [
              "any",
              "dining",
              "retail",
              "business",
              "health",
              "artsEntertainment",
              "community",
              "landmarks",
              "sports",
              "travel",
              "event"
            ],
            "type": "string",
            "description": "Keep only one of Foursquare's ten top-level category groups.",
            "default": "any"
          },
          "countryCode": {
            "title": "Country",
            "type": "string",
            "description": "Keep places in this country (two-letter code or name, e.g. US, DE, \"United Kingdom\"). With no locations, searches the whole country."
          },
          "region": {
            "title": "Region / state",
            "type": "string",
            "description": "Keep places whose region field equals this, as Foursquare writes it, e.g. \"TX\", \"CA\", \"NY\" in the US."
          },
          "locality": {
            "title": "City name in the record",
            "type": "string",
            "description": "Keep places whose city (locality) field equals this, e.g. \"Brooklyn\". Use it to cut a radius search to one municipality."
          },
          "postcodePrefixes": {
            "title": "Postcode starts with",
            "type": "array",
            "description": "Keep places whose postcode starts with any of these, e.g. \"100\" (Manhattan ZIPs), \"SW1\", \"10115\".",
            "items": {
              "type": "string"
            }
          },
          "openOnly": {
            "title": "Open places only",
            "type": "boolean",
            "description": "Skip places Foursquare has marked closed (dateClosed set).",
            "default": true
          },
          "refreshedSince": {
            "title": "Refreshed since",
            "type": "string",
            "description": "Keep places whose Foursquare record was last refreshed on or after this date (YYYY-MM-DD), e.g. 2023-01-01. The best freshness filter for the open dataset."
          },
          "createdSince": {
            "title": "Created since",
            "type": "string",
            "description": "Keep places first added to Foursquare on or after this date (YYYY-MM-DD) - newer businesses."
          },
          "withPhoneOnly": {
            "title": "With phone only",
            "type": "boolean",
            "description": "Keep only places that have a phone number.",
            "default": false
          },
          "withWebsiteOnly": {
            "title": "With website only",
            "type": "boolean",
            "description": "Keep only places that have a website.",
            "default": false
          },
          "withEmailOnly": {
            "title": "With email only",
            "type": "boolean",
            "description": "Keep only places that have an email address (open dataset; chain mode needs the join below).",
            "default": false
          },
          "withSocialOnly": {
            "title": "With social profile only",
            "type": "boolean",
            "description": "Keep only places with a Facebook, Instagram or X (Twitter) profile.",
            "default": false
          },
          "enrichFromOpenData": {
            "title": "Add email & dates to chain locations",
            "type": "boolean",
            "description": "Chain locations mode. Join each live venue to the open dataset by its Foursquare id to add email, date created / refreshed / closed and full category paths.",
            "default": true
          },
          "monitorMode": {
            "title": "Only places not delivered before",
            "type": "boolean",
            "description": "Deliver (and charge) only places this monitor never delivered: new chain locations on a schedule, or the next-nearest places on a repeated search.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Optional. Name the monitor to keep its memory when you change the search; empty = one memory per search."
          },
          "resetMonitor": {
            "title": "Reset monitor memory",
            "type": "boolean",
            "description": "Forget what this monitor delivered before and start again.",
            "default": false
          },
          "maxResults": {
            "title": "Max places",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Most places this run delivers, shared across locations or chain pages. 0 = no limit (100,000). Chain pages list at most 30 each.",
            "default": 100
          },
          "compact": {
            "title": "Compact output",
            "type": "boolean",
            "description": "Core fields only (id, name, category, address, coordinates, phone, website, email, rating, URL) - sized for AI agents and MCP.",
            "default": false
          },
          "excludeEmptyFields": {
            "title": "Drop empty fields",
            "type": "boolean",
            "description": "Remove null, empty-string and empty-list fields from each row.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed: both sources answer Apify's own network. A proxy is used only as a fallback if a request is refused.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}