{
  "openapi": "3.0.1",
  "info": {
    "title": "Restaurant Chain Locations Spain — Openings Tracker",
    "description": "Every store of 25 restaurant chains in Spain (Burger King, McDonald's, Telepizza, Domino's, KFC, Goiko…) from their official store locators, with coordinates, operator company and openings, changes and closures between runs.",
    "version": "0.3",
    "x-build-id": "BfIBQ8XSvMT3ErRNT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rastriq~spain-restaurant-chain-locations/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rastriq-spain-restaurant-chain-locations",
        "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/rastriq~spain-restaurant-chain-locations/runs": {
      "post": {
        "operationId": "runs-sync-rastriq-spain-restaurant-chain-locations",
        "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/rastriq~spain-restaurant-chain-locations/run-sync": {
      "post": {
        "operationId": "run-sync-rastriq-spain-restaurant-chain-locations",
        "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": {
          "brands": {
            "title": "🍔 Restaurant chains",
            "type": "array",
            "description": "Chains to sweep. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "mcdonalds",
                "burger_king",
                "popeyes",
                "kfc",
                "dominos",
                "telepizza",
                "tagliatella",
                "goiko",
                "five_guys",
                "muerde_la_pasta",
                "starbucks",
                "vips",
                "fosters_hollywood",
                "ginos",
                "papa_johns",
                "subway",
                "pizza_hut",
                "santagloria",
                "sibuya",
                "manolo_bakes",
                "udon",
                "pizzerias_carlos",
                "haagen_dazs",
                "volapie",
                "tony_romas"
              ],
              "enumTitles": [
                "McDonald's",
                "Burger King",
                "Popeyes",
                "KFC",
                "Domino's Pizza",
                "Telepizza (residential proxy)",
                "La Tagliatella",
                "Goiko",
                "Five Guys",
                "Muerde la Pasta",
                "Starbucks (slow: ~8 min)",
                "VIPS (residential proxy)",
                "Foster's Hollywood (residential proxy)",
                "Ginos (residential proxy)",
                "Papa John's",
                "Subway",
                "Pizza Hut",
                "Santagloria",
                "Sibuya Urban Sushi Bar",
                "Manolo Bakes",
                "Udon",
                "Pizzerías Carlos",
                "Häagen-Dazs",
                "Taberna del Volapié",
                "Tony Roma's"
              ]
            }
          },
          "trackChanges": {
            "title": "🔄 Track openings, changes and closures",
            "type": "boolean",
            "description": "Compare each store with the previous run of the same stream and set <code>_delta_status</code>. The first run of a stream is a baseline: every store comes as <code>new</code> with <code>_baseline: true</code>.",
            "default": true
          },
          "outputMode": {
            "title": "📤 Output",
            "enum": [
              "full",
              "delta"
            ],
            "type": "string",
            "description": "<b>Full</b> returns every store. <b>Changes only</b> returns just openings, changes and closures; needs change tracking.",
            "default": "full"
          },
          "detectClosures": {
            "title": "❌ Detect closures",
            "type": "boolean",
            "description": "Emit stores missing from a complete sweep as <code>removed</code>. Skipped automatically for a brand whose sweep failed, came back short, or was capped.",
            "default": true
          },
          "googleMapsCheck": {
            "title": "🗺️ Check stores on Google Maps",
            "enum": [
              "off",
              "closures",
              "changes",
              "all"
            ],
            "type": "string",
            "description": "Looks each selected store up on Google Maps with the Rastriq Google Maps actor and adds a <code>googleMaps</code> object (status, place id, rating, reviews). For <code>removed</code> stores it adds <code>_closure_check</code>: <code>confirmed</code>, <code>temporary</code> or <code>contradicted</code> (Google says it is still open: the brand probably just unpublished it). Billed by that actor (about $2 per 1,000 places).",
            "default": "changes"
          },
          "googleMapsMaxPlaces": {
            "title": "🔢 Google Maps: max stores per run",
            "minimum": 0,
            "type": "integer",
            "description": "Cap on stores checked per run. Closures go first, then openings, then updates.",
            "default": 300
          },
          "closureGuardRatio": {
            "title": "🛡️ Closure guard ratio",
            "minimum": 0.5,
            "maximum": 1,
            "type": "number",
            "description": "Closures are computed only if the sweep returned at least this share of the previous snapshot. Protects against a partial response reading as mass closures.",
            "default": 0.8
          },
          "cursorId": {
            "title": "🏷️ Stream id",
            "type": "string",
            "description": "Names the change-tracking stream. Runs sharing an id compare against each other; different ids are independent. Empty = <code>default</code>."
          },
          "maxStoresPerBrand": {
            "title": "🧪 Max stores per chain (testing)",
            "minimum": 0,
            "type": "integer",
            "description": "Cap per brand for quick tests. A capped run never updates the snapshot and never reports closures. 0 or empty = no cap."
          },
          "starbucksIntervalSecs": {
            "title": "⏱️ Starbucks: seconds between calls",
            "minimum": 1,
            "type": "number",
            "description": "Starbucks rate-limits hard below one call every ~3 s (measured). The sweep takes ~130 calls.",
            "default": 3
          },
          "maxConcurrency": {
            "title": "⚡ Chains in parallel",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many brands are swept at the same time.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy for chains that block datacenters",
            "type": "object",
            "description": "Used only for VIPS, Foster's Hollywood, Ginos and Telepizza, which block datacenter IPs. Empty = Apify RESIDENTIAL (ES). Other brands always go direct."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}