{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Popular Times & Traffic Analytics",
    "description": "Collect Google Maps Popular Times foot-traffic curves in bulk: hour-by-hour busyness for every day of the week, plus live occupancy where available, for whole categories of venue in an area (every gym or cafe in a city). Wide or long format, JSON/CSV/Excel/NDJSON. No API key.",
    "version": "0.0",
    "x-build-id": "tL8SfOMZWKVPgiTUo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fanndev~google-maps-popular-times-analytics/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fanndev-google-maps-popular-times-analytics",
        "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/fanndev~google-maps-popular-times-analytics/runs": {
      "post": {
        "operationId": "runs-sync-fanndev-google-maps-popular-times-analytics",
        "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/fanndev~google-maps-popular-times-analytics/run-sync": {
      "post": {
        "operationId": "run-sync-fanndev-google-maps-popular-times-analytics",
        "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": {
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Venue types to collect, e.g. 'gym', 'cafe', 'shopping mall'. Each runs across the location below. A location is required with queries.",
            "items": {
              "type": "string"
            }
          },
          "areaName": {
            "title": "Location - named area",
            "type": "string",
            "description": "Built-in city or country, e.g. 'jakarta', 'bali', 'london'. For anywhere else use a centre point with a radius, or a bounding box."
          },
          "centerLatitude": {
            "title": "Location - centre latitude",
            "type": "string",
            "description": "Latitude of the centre point. Use with centre longitude and radius."
          },
          "centerLongitude": {
            "title": "Location - centre longitude",
            "type": "string",
            "description": "Longitude of the centre point."
          },
          "radiusKm": {
            "title": "Location - radius (km)",
            "type": "string",
            "description": "Collect venues within this many kilometres of the centre point."
          },
          "boundingBox": {
            "title": "Location - bounding box [south, west, north, east]",
            "type": "array",
            "description": "Most precise option. Tiled into several search points, then filtered to the box using each venue's real coordinates."
          },
          "tileSizeKm": {
            "title": "Search tile size (km)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Spacing of search points inside your area. Smaller = more thorough, more requests. Leave empty to choose automatically."
          },
          "maxPlacesPerQuery": {
            "title": "Max places per query",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Stop each query after this many venues. Each venue costs one extra request to fetch its popular-times curve.",
            "default": 50
          },
          "placeUrls": {
            "title": "Specific Google Maps URLs",
            "type": "array",
            "description": "Optional. Collect named venues directly instead of searching. Short links are followed automatically.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "placeIds": {
            "title": "Specific Place IDs / CIDs / feature IDs",
            "type": "array",
            "description": "Optional. Accepts a Place ID (ChIJ...), a numeric CID, or a raw feature ID (0x...:0x...).",
            "items": {
              "type": "string"
            }
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "wide",
              "long"
            ],
            "type": "string",
            "description": "Wide keeps the whole weekly curve nested inside one row per venue. Long emits one row per venue/day/hour, which is what you want for CSV, spreadsheets and dataframes - group by hour across venues without unpacking anything.",
            "default": "wide"
          },
          "onlyPlacesWithPopularTimes": {
            "title": "Only keep venues that have popular times",
            "type": "boolean",
            "description": "Most small venues have no foot-traffic data at all. Leave on to keep the dataset to venues that do; switch off to also record which venues were checked and had none.",
            "default": true
          },
          "requestDelaySeconds": {
            "title": "Delay between requests (seconds)",
            "type": "string",
            "description": "Pause between requests. Google returns less data to an IP that has made many recent requests, so slowing down can improve how many venues come back with a curve. Raise it for large runs.",
            "default": "1.5"
          },
          "exportFormats": {
            "title": "Extra export files",
            "type": "array",
            "description": "Also write the results to the key-value store in these formats. The Apify dataset is always produced regardless.",
            "items": {
              "type": "string",
              "enum": [
                "json",
                "csv",
                "excel",
                "ndjson"
              ],
              "enumTitles": [
                "JSON",
                "CSV",
                "Excel (.xlsx)",
                "NDJSON"
              ]
            },
            "default": []
          },
          "language": {
            "title": "Language (hl)",
            "type": "string",
            "description": "Google interface language. Affects busyness wording such as 'Usually a little busy'.",
            "default": "en"
          },
          "region": {
            "title": "Region (gl)",
            "type": "string",
            "description": "Two-letter country code biasing Google's results, e.g. US, ID, GB.",
            "default": "US"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxy is ON by default and this actor genuinely needs it. Google sends a reduced place record to datacenter IPs with the popular-times block stripped out entirely: measured on the Apify platform, the same run returned 0% coverage with no proxy and 62.5% coverage through RESIDENTIAL. Turning the proxy off will usually return no foot-traffic data at all. Note GOOGLE_SERP cannot be used here - it does not tunnel arbitrary HTTPS.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}