{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Google Trends Scraper: Interest, Regions & Related Queries",
    "description": "UK Google Trends scraper and API: interest over time, interest by region for England, Scotland, Wales and Northern Ireland, related queries and topics. Works for any country. Export CSV or JSON for SEO and market research. By RawTrader | UK Industry & Bills",
    "version": "0.1",
    "x-build-id": "Z0Sm1ScWeN0SHtjLV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/seaf999ield~uk-google-trends/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-seaf999ield-uk-google-trends",
        "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/seaf999ield~uk-google-trends/runs": {
      "post": {
        "operationId": "runs-sync-seaf999ield-uk-google-trends",
        "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/seaf999ield~uk-google-trends/run-sync": {
      "post": {
        "operationId": "run-sync-seaf999ield-uk-google-trends",
        "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": {
          "searchTerms": {
            "title": "Search terms (one comparison per line)",
            "type": "array",
            "description": "Each line is one Google Trends comparison. Put up to 5 terms on a line, separated by commas, to compare them on the same 0-100 scale (e.g. <code>vinted, ebay, depop</code>). Add as many lines as you like. Leave empty if you only use presets.",
            "items": {
              "type": "string"
            }
          },
          "presets": {
            "title": "UK presets",
            "uniqueItems": true,
            "type": "array",
            "description": "Ready-made UK keyword sets, added on top of your own search terms. Each preset adds 4-5 comparisons.",
            "items": {
              "type": "string",
              "enum": [
                "uk_energy_price_cap",
                "uk_diesel_heating_oil",
                "uk_redundancies_administration",
                "uk_steel",
                "uk_carmakers",
                "uk_cost_of_living_retail",
                "uk_motorcycle_gear",
                "uk_reselling"
              ],
              "enumTitles": [
                "UK energy price cap & Ofgem",
                "Diesel, petrol & heating oil prices",
                "Redundancies & companies going into administration",
                "UK steel (British Steel, Port Talbot, Scunthorpe)",
                "UK carmakers (Nissan Sunderland, JLR, Mini, Toyota)",
                "Cost of living, Vinted & Black Friday",
                "UK motorcycle gear (evergreen)",
                "UK reselling & side hustles (evergreen)"
              ]
            }
          },
          "geos": {
            "title": "Locations (geo codes)",
            "type": "array",
            "description": "One or more locations. Every comparison runs once per location. Defaults to <code>GB</code> (United Kingdom). UK nations: <code>GB-ENG</code>, <code>GB-SCT</code>, <code>GB-WLS</code>, <code>GB-NIR</code>. Any country (<code>IE</code>, <code>US</code>, <code>DE</code>…), US states (<code>US-CA</code>) or <code>WORLDWIDE</code>.",
            "default": [
              "GB"
            ],
            "items": {
              "type": "string"
            }
          },
          "ukNationsBundle": {
            "title": "Add all UK nations",
            "type": "boolean",
            "description": "Also run every comparison for GB, England, Scotland, Wales and Northern Ireland (5 locations).",
            "default": false
          },
          "timeframe": {
            "title": "Timeframe",
            "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": "Time range for every comparison.",
            "default": "today 12-m"
          },
          "customTimeframe": {
            "title": "Custom timeframe",
            "type": "string",
            "description": "Used when Timeframe is 'Custom'. Format <code>YYYY-MM-DD YYYY-MM-DD</code>, e.g. <code>2025-11-01 2025-12-31</code>."
          },
          "category": {
            "title": "Category",
            "enum": [
              "0",
              "3",
              "47",
              "44",
              "22",
              "12",
              "233",
              "5",
              "7",
              "71",
              "8",
              "45",
              "65",
              "11",
              "13",
              "958",
              "60",
              "19",
              "16",
              "299",
              "14",
              "66",
              "29",
              "533",
              "174",
              "18",
              "20",
              "67",
              "1179"
            ],
            "type": "string",
            "description": "Narrow results to a Google Trends category.",
            "default": "0"
          },
          "customCategoryId": {
            "title": "Other category ID",
            "minimum": 0,
            "type": "integer",
            "description": "Any other numeric Google Trends category ID (overrides the dropdown)."
          },
          "searchProperty": {
            "title": "Search type",
            "enum": [
              "web",
              "images",
              "news",
              "froogle",
              "youtube"
            ],
            "type": "string",
            "description": "Which Google search property to measure.",
            "default": "web"
          },
          "includeInterestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "0-100 time series for every term.",
            "default": true
          },
          "includeInterestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Breakdown by sub-region (for GB: England, Scotland, Wales, Northern Ireland).",
            "default": true
          },
          "includeRelatedQueries": {
            "title": "Related queries (top + rising)",
            "type": "boolean",
            "description": "Top and rising related searches per term, incl. 'Breakout'.",
            "default": true
          },
          "includeRelatedTopics": {
            "title": "Related topics (top + rising)",
            "type": "boolean",
            "description": "Top and rising related topics per term. Note: Google currently withholds related topics from automated requests for most queries; when it does, the row says so in 'unavailableSections' (you are not charged extra). Off by default.",
            "default": false
          },
          "regionResolution": {
            "title": "Region resolution",
            "enum": [
              "AUTO",
              "COUNTRY",
              "REGION",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "Granularity of 'Interest by region'. Not every resolution exists for every location; if Google refuses it you get a clear note.",
            "default": "AUTO"
          },
          "includeLowVolumeRegions": {
            "title": "Include low-volume regions",
            "type": "boolean",
            "description": "Also return regions with low search volume.",
            "default": false
          },
          "outputLayout": {
            "title": "Output layout",
            "enum": [
              "combined",
              "split"
            ],
            "type": "string",
            "description": "Combined is cheapest (one result row per comparison x location). Split gives one row per section, which is easier to filter, and each section row counts as a result.",
            "default": "combined"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Default: Apify residential proxy in the UK. Every retry uses a new proxy session (new IP).",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "GB"
            }
          },
          "maxRetries": {
            "title": "Max retries per comparison",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Google rate-limits (HTTP 429). Each retry waits with exponential backoff (2 s, 4 s, 8 s… capped at 60 s) and switches to a fresh proxy session (new IP). Data already fetched is kept between retries.",
            "default": 6
          },
          "backoffBaseSecs": {
            "title": "Backoff base (seconds)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "First retry waits about this long; each further retry doubles it (capped at 60 s).",
            "default": 2
          },
          "maxConcurrency": {
            "title": "Parallel sessions",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many comparisons run in parallel, each on its own proxy session.",
            "default": 5
          },
          "requestDelaySecs": {
            "title": "Delay between requests (seconds)",
            "type": "string",
            "description": "Average pause between Google requests within one session (jittered).",
            "default": "0.6"
          },
          "maxComparisons": {
            "title": "Max comparisons",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap on comparisons x locations (handy for testing). Empty = no cap."
          },
          "timezone": {
            "title": "Time zone",
            "type": "string",
            "description": "IANA time zone used for dates in the time series.",
            "default": "Europe/London"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Google Trends interface language (affects topic names).",
            "default": "en-GB"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}