{
  "openapi": "3.0.1",
  "info": {
    "title": "Restaurant Leads Scraper — Emails & Rank",
    "description": "Restaurant lead scraper for agencies and SaaS that sell to restaurants. Google Maps listing with booking platforms, website emails, optional local-pack rank and review velocity. City, postal codes or country sweep. No review text, photos or menus. Pay per restaurant delivered.",
    "version": "0.1",
    "x-build-id": "i0zoOdewAT9aDw27P"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pequod-labs~restaurant-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pequod-labs-restaurant-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/pequod-labs~restaurant-leads/runs": {
      "post": {
        "operationId": "runs-sync-pequod-labs-restaurant-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/pequod-labs~restaurant-leads/run-sync": {
      "post": {
        "operationId": "run-sync-pequod-labs-restaurant-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": [
          "countryCode"
        ],
        "properties": {
          "searchTerms": {
            "title": "Search terms",
            "maxItems": 20,
            "type": "array",
            "description": "Maps keywords. Defaults follow the country: <code>ristorante</code>/<code>pizzeria</code> in Italy, <code>restaurante</code> in Spain/LatAm, <code>restaurant</code>/<code>pizzeria</code> elsewhere. Override for sushi, trattoria, steakhouse, etc. Up to 20 terms.",
            "items": {
              "type": "string"
            }
          },
          "locationQuery": {
            "title": "Location (city or address)",
            "type": "string",
            "description": "Human-readable area — e.g. <code>Rome, Italy</code> or <code>Trastevere Roma</code>. Use this <b>or</b> coordinates <b>or</b> postalCodes <b>or</b> countrySweep."
          },
          "postalCodes": {
            "title": "Postal codes",
            "maxItems": 200,
            "type": "array",
            "description": "Postal codes for the selected <code>countryCode</code>. Each code is its own Maps cell. IT/FR/ES/DE must be 5 digits; US is ZIP or ZIP+4; GB is outward+inward (e.g. <code>SW1A 1AA</code>). Cannot combine with locationQuery, coordinates, or countrySweep. Apify free-plan users keep the first 3 codes.",
            "items": {
              "type": "string"
            }
          },
          "latitude": {
            "title": "Latitude",
            "type": "number",
            "description": "Center latitude when you already have coordinates. Requires <code>longitude</code>."
          },
          "longitude": {
            "title": "Longitude",
            "type": "number",
            "description": "Center longitude when you already have coordinates. Requires <code>latitude</code>."
          },
          "radiusKm": {
            "title": "Search radius (km)",
            "minimum": 0.1,
            "maximum": 50,
            "type": "number",
            "description": "Radius around the center point. Capped at 50 km.",
            "default": 5
          },
          "countryCode": {
            "title": "Country",
            "enum": [
              "IT",
              "FR",
              "ES",
              "DE",
              "GB",
              "US",
              "NL",
              "BE",
              "PT",
              "PL",
              "AT",
              "CH",
              "IE",
              "CA",
              "AU",
              "BR",
              "MX",
              "AR",
              "CL",
              "CO",
              "PE"
            ],
            "type": "string",
            "description": "Required. ISO country for Maps results, search-term defaults, and owner legal pages. Not inferred from coordinates. If you leave location empty, the actor searches the capital of this country."
          },
          "languageCode": {
            "title": "Language (optional)",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Two-letter interface language for Maps. Defaults from country when omitted."
          },
          "maxPlaces": {
            "title": "Max restaurants to deliver",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper bound on billable restaurants pushed to the dataset. Apify free-plan users are capped at 20 per run and 20 per UTC day.",
            "default": 20
          },
          "queryBudgetMultiplier": {
            "title": "Query budget multiplier",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Raises the upstream Maps query cap for a given maxPlaces. Does NOT change place-scraped billing. If RUN_SUMMARY.queryBudgetExhausted is true, rerun with queryBudgetMultiplier = RUN_SUMMARY.suggestedQueryBudgetMultiplier.",
            "default": 3
          },
          "tableServiceOnly": {
            "title": "Table-service restaurants only",
            "type": "boolean",
            "description": "Drop hotels, shops, takeaway-only and off-target Maps categories <b>before billing</b>. Default on — this actor sells restaurant leads, not every food pin.",
            "default": true
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Skip restaurants below this Google rating (0–5). Leave empty for no filter."
          },
          "minReviews": {
            "title": "Minimum review count",
            "minimum": 0,
            "type": "integer",
            "description": "Skip listings below this Google review count. Filtered before billing."
          },
          "websiteKind": {
            "title": "Website kind",
            "enum": [
              "any",
              "owned",
              "none",
              "aggregator"
            ],
            "type": "string",
            "description": "<b>any</b>: all. <b>owned</b>: only restaurants with their own site on Maps (not Facebook/Quandoo). <b>none</b>: no website on the pin — web agencies. <b>aggregator</b>: Quandoo/TheFork as the Maps website.",
            "default": "any"
          },
          "websiteFilter": {
            "title": "Website listed on Maps",
            "enum": [
              "any",
              "has",
              "none"
            ],
            "type": "string",
            "description": "<b>any</b> / <b>has</b> / <b>none</b> — whether Maps shows a website URL, regardless of kind. Prefer <code>websiteKind</code> for owned vs social vs aggregator.",
            "default": "any"
          },
          "enrichWebsiteContacts": {
            "title": "Extract website contacts",
            "type": "boolean",
            "description": "Visit each owned website for public emails, phones and social links. Billed as <code>website-contacts</code> only when an email or phone is found. Social links alone are free.",
            "default": true
          },
          "enrichInstagram": {
            "title": "Instagram profile",
            "type": "boolean",
            "description": "When an Instagram handle is on the Maps pin or the website, fetch followers, last post date, posts in the last 90 days, reel share, WhatsApp-in-bio and external URL. Billed as <code>instagram-profile</code> only when a profile is delivered. Does not dump posts or captions.",
            "default": true
          },
          "enrichFacebook": {
            "title": "Facebook page (opt-in)",
            "type": "boolean",
            "description": "Fetch Facebook page followers and public contact fields. Off by default — more expensive than Instagram for weaker WhatsApp signal. Billed as <code>facebook-page</code> only when a page is delivered. Paid Apify plan only; ignored on the free plan.",
            "default": false
          },
          "enrichRanking": {
            "title": "Local-pack rank (per cell)",
            "type": "boolean",
            "description": "One Maps query per postal code / city cell (<code>pizzeria 00153</code>), then join rank by placeId. Not one query per restaurant. Billed as <code>local-rank</code> once per cell ranked. Use this for 'how visible is this restaurant nearby', not a national ranking. Paid Apify plan only; ignored on the free plan.",
            "default": false
          },
          "enrichReviewVelocity": {
            "title": "Review velocity",
            "type": "boolean",
            "description": "Count Google reviews in the last 7 and 30 days from newest-first timestamps, plus how often the owner replied in that sample. No review text, no photos. Billed as <code>review-velocity</code> when velocity is computed. Combine with rank to see the gap vs the local pack leader. Paid Apify plan only; ignored on the free plan.",
            "default": false
          },
          "enrichReviewThemes": {
            "title": "Review theme flags (opt-in)",
            "type": "boolean",
            "description": "Off by default. From the same review fetch as velocity, count in-flight mentions of wait / food / service / price, then discard the snippet. Dataset never contains review text. Uses the <code>review-velocity</code> event (no extra PPE). Leave off if the classifier is too noisy for your market.",
            "default": false
          },
          "enrichDeliverySearch": {
            "title": "Find delivery platforms (search)",
            "type": "boolean",
            "description": "One web search per restaurant against the country aggregators (Deliveroo, Just Eat, Uber Eats, Glovo, and DoorDash in the US). A platform id is kept only when the result URL is a venue page that names this restaurant in this city or postal code — not a neighbourhood index, dish page, chain hub or a namesake in another city. Billed as <code>delivery-platforms</code> only when search adds at least one id that was missing from the Maps pin. Does not fetch menus.",
            "default": true
          },
          "findOwner": {
            "title": "Find the owner / decision maker",
            "type": "boolean",
            "description": "Named owner or chef-patron grounded on the restaurant website or Instagram bio (up to <code>maxDecisionMakers</code>). On-domain current-operator language: Italian patron/gestito da/SAS di/titolare, German Impressum Geschäftsführer/Inhaber, French gérant, English owned by/chef-owner, Spanish propietario, Dutch eigenaar. A person mailbox already on the page counts (first name alone is enough); brand/franchise inboxes are skipped. Not a LinkedIn CEO search. Charged as <code>decision-maker</code> when a person name is found. Email is attached only if it already appears on the page and names that person — never invented, never SMTP-guessed.",
            "default": false
          },
          "maxDecisionMakers": {
            "title": "Max owner lookups",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on how many restaurants with a website receive an owner lookup this run.",
            "default": 50
          },
          "countrySweep": {
            "title": "Country sweep mode",
            "type": "boolean",
            "description": "Scrape an entire supported country locality-by-locality. Do not set locationQuery, coordinates, or postalCodes. Progress is saved so the next run resumes without double-charging. Paid Apify plan only — free-plan runs are rejected.",
            "default": false
          },
          "sweepRegions": {
            "title": "Sweep regions (admin1)",
            "maxItems": 100,
            "type": "array",
            "description": "Optional region names (e.g. <code>[\"Lazio\", \"Lombardy\"]</code>). Requires countrySweep=true.",
            "items": {
              "type": "string"
            }
          },
          "sweepProvinces": {
            "title": "Sweep provinces",
            "maxItems": 100,
            "type": "array",
            "description": "Optional province names (e.g. <code>[\"Roma\"]</code>). Requires countrySweep=true.",
            "items": {
              "type": "string"
            }
          },
          "sweepLocalities": {
            "title": "Sweep municipalities",
            "maxItems": 100,
            "type": "array",
            "description": "Optional town names. Requires countrySweep=true.",
            "items": {
              "type": "string"
            }
          },
          "startFromLocality": {
            "title": "Start from locality",
            "type": "string",
            "description": "Jump the sweep cursor to this locality name (always overrides the saved cursor for this run)."
          },
          "sweepStateName": {
            "title": "Sweep state store name (optional)",
            "maxLength": 20,
            "type": "string",
            "description": "Optional label (1–20 chars) appended to the named key-value store. Use to start a sweep from scratch. Requires countrySweep=true."
          },
          "sweepMinPopulation": {
            "title": "Minimum locality population",
            "minimum": 500,
            "maximum": 1000000,
            "type": "integer",
            "description": "Skip localities below this population during country sweep.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}