{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends API Alternative: Data Scraper | $0.20 / 1K",
    "description": "Google Trends data and API alternative: interest over time, top and rising related queries, interest by region and Trending now by country. JSON, CSV or Excel, no login or API key. $0.20 per 1,000 rows plus a $0.0015 start fee.",
    "version": "1.0",
    "x-build-id": "GJVEIxdalILJAy37F"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hridayrungta~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hridayrungta-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/hridayrungta~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hridayrungta-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/hridayrungta~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hridayrungta-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",
        "properties": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "search",
              "trending"
            ],
            "type": "string",
            "description": "\"Search terms\": interest over time, related queries and interest by region for your keywords. \"Trending now\": what people in a country are searching for right now.",
            "default": "search"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Search mode. One keyword or topic per line, e.g. \"pizza\" or \"electric car\".",
            "items": {
              "type": "string"
            }
          },
          "compareTerms": {
            "title": "Compare terms against each other",
            "type": "boolean",
            "description": "Off: every term is scored 0-100 on its own. On: terms are sent to Google together (up to 5 per group) so the numbers are relative to each other, exactly like the compare view on trends.google.com. You still get one row per term.",
            "default": false
          },
          "geos": {
            "title": "Countries / regions",
            "type": "array",
            "description": "Search mode. Country codes (US, GB, IN) or sub-regions (US-CA, GB-ENG). Leave empty for worldwide. Each geo is scraped separately.",
            "items": {
              "type": "string"
            }
          },
          "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": "Search mode. How far back to look.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom date range (optional)",
            "type": "string",
            "description": "Overrides the time range. Format: \"YYYY-MM-DD YYYY-MM-DD\", e.g. \"2025-01-01 2025-06-30\"."
          },
          "category": {
            "title": "Category ID",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category number. 0 = all categories. Examples: 71 Food & Drink, 5 Computers & Electronics, 7 Finance, 45 Health, 18 Shopping, 3 Arts & Entertainment.",
            "default": 0
          },
          "property": {
            "title": "Search type",
            "enum": [
              "web",
              "news",
              "youtube",
              "images",
              "shopping"
            ],
            "type": "string",
            "description": "Which Google search to measure.",
            "default": "web"
          },
          "includeInterestOverTime": {
            "title": "Include interest over time",
            "type": "boolean",
            "description": "A 0-100 score for every point on the chart, plus the average and the peak.",
            "default": true
          },
          "includeRelatedQueries": {
            "title": "Include related queries",
            "type": "boolean",
            "description": "Top and rising related searches (rising ones flagged as breakout when Google marks them so).",
            "default": true
          },
          "includeInterestByRegion": {
            "title": "Include interest by region",
            "type": "boolean",
            "description": "Score per country / state / city inside the selected geo.",
            "default": false
          },
          "regionResolution": {
            "title": "Region detail",
            "enum": [
              "auto",
              "COUNTRY",
              "REGION",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "How fine the region breakdown is. \"Automatic\" lets Google pick (countries for worldwide, states for a country).",
            "default": "auto"
          },
          "includeLowSearchVolumeRegions": {
            "title": "Include low-search-volume regions",
            "type": "boolean",
            "description": "Also return regions where Google has little data.",
            "default": false
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Interface language for related queries and labels, e.g. en-US, de-DE, es-ES.",
            "default": "en-US"
          },
          "trendingGeos": {
            "title": "Trending now: countries",
            "type": "array",
            "description": "Trending mode. Country codes such as US, GB, IN, DE, BR.",
            "items": {
              "type": "string"
            }
          },
          "trendingWindowHours": {
            "title": "Trending now: time window",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Trending mode. Look back 4, 24, 48 or 168 hours (7 days).",
            "default": "24"
          },
          "trendingLimit": {
            "title": "Trending now: max rows per country",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Trending mode. Google returns up to several hundred trending searches per country; this keeps the top N (in Google's own order).",
            "default": 50
          },
          "maxItems": {
            "title": "Max rows (cost cap)",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on billed rows for the whole run.",
            "default": 1000
          },
          "maxRetries": {
            "title": "Retries per request",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "How many times a blocked or failed request is retried on a fresh connection.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}