{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper & Keyword Ideas: Interest, Trending",
    "description": "Google Trends at scale: one rich row per keyword with interest over time, average and peak, regions, US metros, top and rising related queries, plus full Trending Now and autocomplete keyword ideas. Compare 25+ terms. Rows without data are never charged. No login.",
    "version": "0.1",
    "x-build-id": "rzdOaGzARKhoKQG2W"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/oswaldocarabano~google-trends-keyword-ideas-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-oswaldocarabano-google-trends-keyword-ideas-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/oswaldocarabano~google-trends-keyword-ideas-scraper/runs": {
      "post": {
        "operationId": "runs-sync-oswaldocarabano-google-trends-keyword-ideas-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/oswaldocarabano~google-trends-keyword-ideas-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-oswaldocarabano-google-trends-keyword-ideas-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": {
          "outputType": {
            "title": "What to extract",
            "enum": [
              "keyword-trend",
              "comparison-set",
              "trending-item",
              "keyword-idea",
              "ideas-then-trends"
            ],
            "type": "string",
            "description": "One row type per run. <b>keyword-trend</b>: one rich row per keyword. <b>comparison-set</b>: your terms on one shared scale (more than 5 are merged through the first term as anchor). <b>trending-item</b>: every trending search of a country. <b>keyword-idea</b>: autocomplete ideas for seed terms. <b>ideas-then-trends</b>: ideas for each seed, then the trend row of each idea.",
            "default": "keyword-trend"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search terms for keyword-trend and comparison-set. A Knowledge Graph topic id such as /m/019qb_ also works. Up to 500 per run (25 for a comparison).",
            "default": [
              "seo"
            ],
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "Location",
            "type": "string",
            "description": "Two-letter country code (US, GB, DE), a subregion (US-CA) or empty for worldwide.",
            "default": ""
          },
          "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",
              "custom"
            ],
            "type": "string",
            "description": "Period of the series. Choose \"custom\" to set exact dates below.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom dates",
            "type": "string",
            "description": "Only with time range \"custom\": start and end date separated by a space, e.g. 2025-01-01 2025-06-30 (from 2004-01-01).",
            "default": ""
          },
          "category": {
            "title": "Category",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category id to narrow the search (0 = all categories; e.g. 13 = Computers & Electronics, 71 = Food & Drink).",
            "default": 0
          },
          "property": {
            "title": "Search type",
            "enum": [
              "web",
              "images",
              "news",
              "youtube",
              "shopping"
            ],
            "type": "string",
            "description": "Which Google search the interest comes from.",
            "default": "web"
          },
          "includeRegions": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Countries (worldwide) or regions (country) with their relative interest.",
            "default": true
          },
          "includeDmas": {
            "title": "Interest by US metro (DMA)",
            "type": "boolean",
            "description": "Only when the location is US: every metro area with data. One extra request per keyword.",
            "default": true
          },
          "includeCities": {
            "title": "Interest by city",
            "type": "boolean",
            "description": "Cities with data and their coordinates. Google returns city data for few terms (measured: 27 of 216 rows had at least one city), so it is off by default. One extra request per keyword.",
            "default": false
          },
          "includeRelated": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Top and rising related queries with their values (rising ones include Breakout).",
            "default": true
          },
          "seeds": {
            "title": "Seed terms (ideas)",
            "type": "array",
            "description": "For keyword-idea and ideas-then-trends: the terms to expand with autocomplete. Up to 20 per run.",
            "default": [
              "seo"
            ],
            "items": {
              "type": "string"
            }
          },
          "ideasMode": {
            "title": "Idea expansion",
            "enum": [
              "seed",
              "alphabet",
              "questions",
              "all"
            ],
            "type": "string",
            "description": "seed: the seed alone (10 ideas). alphabet: seed + a-z and 0-9. questions: question words and prepositions in the chosen language. all: both (usually 350-500 unique ideas per seed).",
            "default": "all"
          },
          "ideaLanguages": {
            "title": "Idea languages",
            "type": "array",
            "description": "Two-letter language codes. Question words are available for en, es, pt, de, fr and it; other languages get the alphabet expansion. ideas-then-trends uses the first language.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "ideaCountry": {
            "title": "Idea country",
            "type": "string",
            "description": "Optional two-letter country for autocomplete. Empty = the usual country of each language (en: us, es: es, pt: br, de: de, fr: fr, it: it).",
            "default": ""
          },
          "onlyContainingSeed": {
            "title": "Only ideas that contain the seed",
            "type": "boolean",
            "description": "Drops unrelated suggestions such as seo -> seoul. Plurals of the seed are kept.",
            "default": true
          },
          "maxIdeasPerSeed": {
            "title": "Ideas to trend per seed",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Only for ideas-then-trends: how many ideas of each seed get a trend row.",
            "default": 10
          },
          "trendingGeos": {
            "title": "Trending countries",
            "type": "array",
            "description": "For trending-item: two-letter country codes. One request per country returns every trending search of the window (hundreds to thousands).",
            "default": [
              "US"
            ],
            "items": {
              "type": "string"
            }
          },
          "trendingHours": {
            "title": "Trending window",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Trending searches started in the past 4, 24, 48 hours or 7 days.",
            "default": "24"
          },
          "trendingCategories": {
            "title": "Trending categories",
            "type": "array",
            "description": "Optional list of Google Trends category ids; only trending searches in at least one of them are delivered (and charged). Empty = all.",
            "default": []
          },
          "maxItems": {
            "title": "Max charged rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on rows with data (the ones you pay for). Rows without data and error rows do not count.",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Parallel keywords",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Keywords fetched at the same time. Measured on Apify with 8 in parallel: 33-58 complete keywords per minute. Lower values are slower and not more reliable; rate limits are handled automatically.",
            "default": 6
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy is used as the secondary route. Leave the default unless you know you need another group.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}