{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper & API - Compare up to 500 Keywords",
    "description": "Google Trends scraper and API for up to 500 keywords on one 0-100 scale, past Google's limit of 5. Interest over time, interest by region, top and rising related queries, change % and busiest month. Web, YouTube, News, Images or Shopping. For SEO and product research; no-data keywords are free.",
    "version": "0.1",
    "x-build-id": "EMjcWWwfdsRK13m58"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/michael_b~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-michael_b-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/michael_b~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-michael_b-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/michael_b~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-michael_b-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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "What people search on Google, one per line. Up to 500 per run, 100 characters each. A keyword repeated in any letter case is looked up once and returns one row, under the spelling you typed first.",
            "default": [
              "air fryer",
              "slow cooker",
              "rice cooker"
            ],
            "items": {
              "type": "string"
            }
          },
          "compare": {
            "title": "Compare keywords on one scale",
            "type": "boolean",
            "description": "On: all keywords share one 0-100 scale like on Google Trends, so average, latest and peak compare directly between rows (100 = the busiest point of the busiest keyword). Works for any number of keywords, not just Google's 5. Off: each keyword gets its own 0-100 scale and the numbers don't compare between rows. Change %, trend, peak date and busiest month always come from each keyword's own scale, so they are right either way.",
            "default": true
          },
          "country": {
            "title": "Country or region",
            "type": "string",
            "description": "One place per run: a two-letter country code (US, GB, DE), a region code (US-CA, GB-SCT), a US metro area code (US-CA-807 = San Francisco Bay Area) or a plain name (Germany, Texas). Leave empty for worldwide. An unknown place gives an invalid_input row that says what to type.",
            "default": "US"
          },
          "timeRange": {
            "title": "Time range",
            "enum": [
              "past24Hours",
              "past7Days",
              "past30Days",
              "past90Days",
              "past12Months",
              "past5Years",
              "since2004",
              "custom"
            ],
            "type": "string",
            "description": "How far back to look. Google gives a point every 8 minutes for 24 hours, every hour for 7 days, every day up to 90 days, every week up to 5 years and every month since 2004. changePct compares the last 12 months with the 12 before for ranges of 2 years or more (custom dates too), and the second half of the range with the first half otherwise.",
            "default": "past5Years"
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "web",
              "youtube",
              "news",
              "images",
              "shopping"
            ],
            "type": "string",
            "description": "Which Google search to measure.",
            "default": "web"
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "Narrow a word with two meanings, e.g. \"jaguar\" in Autos & Vehicles. A Google Trends category name (Shopping, Health, Food & Drink, Finance, Autos & Vehicles, Travel) or its number. Leave empty for all categories. An unknown name gives an invalid_input row.",
            "default": ""
          },
          "startDate": {
            "title": "Custom start date",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Only used when Time range is Custom dates (ignored otherwise). First day, YYYY-MM-DD, 2004-01-01 or later."
          },
          "endDate": {
            "title": "Custom end date",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Only used when Time range is Custom dates. Last day, YYYY-MM-DD. Empty means today."
          },
          "includeTimeline": {
            "title": "Include the timeline",
            "type": "boolean",
            "description": "Add every point of the interest-over-time series (the timeline field). Off keeps the summary numbers, regions and related queries only. A 5-year timeline is about 260 points per keyword, so turning it off makes rows much smaller, useful for AI agents and big keyword lists.",
            "default": true
          },
          "includeRegions": {
            "title": "Include regions",
            "type": "boolean",
            "description": "Add the places where each keyword makes up the biggest share of searches (the regions field).",
            "default": true
          },
          "regionLevel": {
            "title": "Region level",
            "enum": [
              "auto",
              "country",
              "region",
              "metro",
              "city"
            ],
            "type": "string",
            "description": "Automatic: the level Google shows on its own site. That's countries when worldwide, states or provinces inside a country, and metro areas inside a US state. Metro areas exist for the US only; elsewhere you get states or provinces. City lists are often empty for automated requests, even when the website shows cities. Rows report the level as country, state/province, metro or city.",
            "default": "auto"
          },
          "maxRegions": {
            "title": "Regions per keyword",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "How many of the top places to return for each keyword, 1 to 300.",
            "default": 20
          },
          "includeRelatedSearches": {
            "title": "Include related queries",
            "type": "boolean",
            "description": "Add the searches people make alongside each keyword: the most common (topSearches) and the fastest growing (risingSearches, with a Breakout flag for growth over 5,000%).",
            "default": true
          },
          "maxRelatedSearches": {
            "title": "Related queries per list",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "How many top and rising related queries to keep per keyword, 1 to 25 (Google gives at most 25).",
            "default": 25
          },
          "knownMonthlySearches": {
            "title": "Monthly searches of your first keyword (optional)",
            "minimum": 1,
            "type": "integer",
            "description": "Google Trends gives 0-100, not search counts. If you know the monthly searches of your FIRST keyword in the same country (e.g. from Google Keyword Planner), enter it and every keyword gets estimatedMonthlySearches scaled from it. With Compare off, only the first keyword gets an estimate."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Google limits Trends lookups per IP. Keep the default: the actor starts on Apify's datacenter IPs and switches to residential IPs by itself if Google blocks them. Choose a proxy group here only if you want to force one.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}