{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper",
    "description": "Google Trends data: every trending search in 125+ countries for the past 4 hours to 7 days, and keyword interest over time, by region and city, with related queries. Compare up to 5 keywords. From $1 per 1,000 results.",
    "version": "0.0",
    "x-build-id": "pVpG0I1RITkt66Pah"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sourabhbgp~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sourabhbgp-google-trends-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/sourabhbgp~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sourabhbgp-google-trends-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/sourabhbgp~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sourabhbgp-google-trends-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "trending",
              "explore"
            ],
            "type": "string",
            "description": "Trending: the searches trending right now in a country or region (past 4 hours to 7 days). Explore: for each keyword, interest over time, interest by region and related searches.",
            "default": "trending"
          },
          "geo": {
            "title": "Country or region",
            "type": "string",
            "description": "A country code (US, GB, DE, JP) or a region code (US-CA, GB-ENG). Empty: Explore covers the whole world; Trending returns Google's daily feed for the server's own country, because Google has no worldwide trending list. If you leave this field out of an API input entirely, it counts as empty, not the US shown in the form.",
            "default": ""
          },
          "language": {
            "title": "Language",
            "enum": [
              "en-US",
              "en-GB",
              "pt-BR",
              "pt-PT",
              "es-ES",
              "es-MX",
              "fr-FR",
              "de-DE",
              "it-IT",
              "ja-JP",
              "ko-KR",
              "zh-CN",
              "zh-TW",
              "ru-RU",
              "hi-IN",
              "ar-SA"
            ],
            "type": "string",
            "description": "Language of Google's labels: region names, category names and related searches.",
            "default": "en-US"
          },
          "timezone": {
            "title": "Timezone",
            "enum": [
              "UTC",
              "America/New_York",
              "America/Chicago",
              "America/Denver",
              "America/Los_Angeles",
              "America/Sao_Paulo",
              "America/Mexico_City",
              "America/Toronto",
              "Europe/London",
              "Europe/Paris",
              "Europe/Berlin",
              "Europe/Madrid",
              "Europe/Moscow",
              "Africa/Cairo",
              "Africa/Johannesburg",
              "Asia/Dubai",
              "Asia/Kolkata",
              "Asia/Shanghai",
              "Asia/Tokyo",
              "Asia/Seoul",
              "Asia/Singapore",
              "Australia/Sydney"
            ],
            "type": "string",
            "description": "Sets which day counts as today, and the day each trend started (the date field).",
            "default": "UTC"
          },
          "trendingWindow": {
            "title": "Time window",
            "enum": [
              "",
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Past 4 hours, 24 hours, 48 hours or 7 days of Google's Trending Now list. Empty: taken from Days back (1 day = 24 hours, 2 = 48 hours, 3 or more = 7 days).",
            "default": ""
          },
          "trendingCategory": {
            "title": "Category",
            "enum": [
              "0",
              "1",
              "2",
              "3",
              "4",
              "5",
              "6",
              "7",
              "8",
              "9",
              "10",
              "11",
              "13",
              "14",
              "15",
              "16",
              "17",
              "18",
              "19",
              "20"
            ],
            "type": "string",
            "description": "Keep only trends Google files under this category. Needs a country or region.",
            "default": "0"
          },
          "activeOnly": {
            "title": "Active trends only",
            "type": "boolean",
            "description": "Keep only trends Google still marks as active. Needs a country or region.",
            "default": false
          },
          "maxResults": {
            "title": "Max trends per day",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Total rows = this number x the days covered (4 or 24 hours = 1 day, 48 hours = 2, 7 days or Days back = that many days). With no time window, category, active-only or end date set, the rows start with Google's newest trends (the ones that come with news articles), then follow Google's Trending Now order. With any of them set, Google's Trending Now order is used.",
            "default": 10
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "How many days of trends to return, counted back from today (or from End date). Google keeps 7 days; larger values return 7. Ignored when Time window is set.",
            "default": 1
          },
          "date": {
            "title": "End date",
            "type": "string",
            "description": "YYYY-MM-DD. Returns trends that started on this day and the Days back before it. Must be within the last 7 days, which is all Google keeps. Empty: today. Ignored when Time window is set."
          },
          "keywords": {
            "title": "Keywords",
            "type": "string",
            "description": "Comma-separated, for example: bitcoin, ethereum, solana. Up to 100. Duplicates are removed."
          },
          "timeRange": {
            "title": "Time range",
            "enum": [
              "now 1-H",
              "now 4-H",
              "now 1-d",
              "now 7-d",
              "today 1-m",
              "today 3-m",
              "today 12-m",
              "today 5-y",
              "all"
            ],
            "type": "string",
            "description": "Period of the data. Replaced by Start date when that is set.",
            "default": "today 12-m"
          },
          "startDate": {
            "title": "Start date (custom range)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "YYYY-MM-DD, from 2004-01-01. When set, it replaces Time range. Empty: Time range is used."
          },
          "endDate": {
            "title": "End date (custom range)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "YYYY-MM-DD. Used with Start date. Empty: today."
          },
          "compareKeywords": {
            "title": "Compare keywords on one scale",
            "type": "boolean",
            "description": "Off: each keyword's interest over time is on its own 0-100 scale. On: keywords are compared in groups of up to 5 (Google's limit), so their interest over time shares one 0-100 scale. Interest by region stays per keyword (each keyword's top region is 100). Each row lists the other keywords in its group in comparedWith.",
            "default": false
          },
          "regionResolution": {
            "title": "Region level",
            "enum": [
              "",
              "COUNTRY",
              "REGION",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "Level of the interest by region data. Google default: states or provinces inside a country, countries for the whole world. Country works only for the whole world; state needs a country; US metro areas (DMA) need US or a US region; city works everywhere and includes coordinates. A level that does not fit the location falls back to Google's default and the run says so.",
            "default": ""
          },
          "dataTypes": {
            "title": "Data to collect",
            "type": "array",
            "description": "Which data to fetch for each keyword. Empty: all four. Data you leave out is null in the output. Related topics: Google currently returns none to automated requests.",
            "items": {
              "type": "string",
              "enum": [
                "interestOverTime",
                "interestByRegion",
                "relatedQueries",
                "relatedTopics"
              ],
              "enumTitles": [
                "Interest over time",
                "Interest by region",
                "Related queries",
                "Related topics"
              ]
            }
          },
          "category": {
            "title": "Category",
            "enum": [
              "0",
              "3",
              "47",
              "44",
              "22",
              "12",
              "5",
              "7",
              "71",
              "8",
              "45",
              "64",
              "11",
              "13",
              "958",
              "19",
              "16",
              "299",
              "14",
              "66",
              "29",
              "533",
              "174",
              "18",
              "20",
              "67"
            ],
            "type": "string",
            "description": "Limit the keyword data to one Google category.",
            "default": "0"
          },
          "googleProperty": {
            "title": "Google search type",
            "enum": [
              "",
              "images",
              "news",
              "youtube",
              "froogle"
            ],
            "type": "string",
            "description": "Web search, or searches on Images, News, YouTube or Google Shopping.",
            "default": ""
          },
          "exploreConcurrency": {
            "title": "Explore concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Keywords analyzed at the same time, each on its own IP. Default 3, max 5.",
            "default": 3
          },
          "trendingConcurrency": {
            "title": "Trending concurrency (not used)",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "No longer used: Trending makes one request per run. Kept so saved inputs still work.",
            "default": 8
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}