{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper | Regions, Rising Queries, $1.50/1K",
    "description": "Scrape Google Trends with runs that finish: unlike Apify's own Trends scraper (56.5% run success in 30 days), blocked keyword groups are retried and reported, at $1.50 per 1,000 results, half its $3.00. Trends URLs or any number of keywords: interest over time, by region, rising queries.",
    "version": "0.1",
    "x-build-id": "qS3mhIRlKEZnpqa0Q"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/aurelix~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-aurelix-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/aurelix~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-aurelix-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/aurelix~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-aurelix-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": "Search terms to look up, one per line, e.g. 'air fryer', 'pickleball'. Any number: they are compared 5 at a time with the first keyword in every group, so all values share one 0-100 scale. Put a keyword of middling popularity first.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Google Trends URLs",
            "type": "array",
            "description": "Optional: paste Google Trends explore links, e.g. https://trends.google.com/trends/explore?q=air%20fryer,instant%20pot&geo=US&date=today%2012-m. Each link's terms (q), location (geo), time range (date), category (cat) and search type (gprop) are used for that link; a setting missing from the link uses Google's default (worldwide, past 12 months, all categories, web search). Works together with 'Keywords'. Invalid links are skipped and named in the run status.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "geo": {
            "title": "Location",
            "type": "string",
            "description": "Country or sub-region code, e.g. 'US', 'GB', 'US-CA' (California), 'CA-ON' (Ontario). Leave 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"
            ],
            "type": "string",
            "description": "Period to look at, as on the Google Trends page. Past hour to past 7 days give minute or hourly points; longer ranges give daily, weekly or monthly points.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom time range (optional)",
            "type": "string",
            "description": "Exact dates 'YYYY-MM-DD YYYY-MM-DD', e.g. '2024-01-01 2024-12-31'. Overrides 'Time range' when set."
          },
          "category": {
            "title": "Category",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category ID to narrow the search, e.g. 0 = all categories, 71 = Food & Drink, 7 = Finance, 18 = Shopping, 958 = Jobs, 29 = Real Estate.",
            "default": 0
          },
          "property": {
            "title": "Search type",
            "enum": [
              "",
              "youtube",
              "news",
              "images",
              "froogle"
            ],
            "type": "string",
            "description": "Which Google search to measure: web search, YouTube, Google News, Google Images or Google Shopping.",
            "default": ""
          },
          "compareKeywords": {
            "title": "Put all keywords on one scale",
            "type": "boolean",
            "description": "On: keywords are compared with each other (5 per Google comparison, the first keyword repeated in every group as the anchor), so 'pickleball 40' and 'solar panels 20' mean pickleball had twice the searches. Off: each keyword gets its own 0-100 scale, like typing it alone into Google Trends.",
            "default": true
          },
          "includeInterestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "Timeline of search interest (0-100) with average, peak and latest value.",
            "default": true
          },
          "includeInterestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Where each keyword is searched most: countries (worldwide), states/provinces, metro areas or cities.",
            "default": true
          },
          "regionResolution": {
            "title": "Region level",
            "enum": [
              "auto",
              "COUNTRY",
              "REGION",
              "DMA",
              "CITY"
            ],
            "type": "string",
            "description": "Region breakdown level. 'Automatic' is countries for worldwide and sub-regions for a country; worldwide always uses countries. Metro areas exist for the US only; city works for most countries.",
            "default": "auto"
          },
          "includeRelatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Top and rising related searches for each keyword, with growth such as '+250%' or 'Breakout'.",
            "default": true
          },
          "includeRelatedTopics": {
            "title": "Related topics",
            "type": "boolean",
            "description": "Top and rising related topics. Google currently returns an empty topics list to automated visitors; when it does, you get empty lists and are charged nothing extra.",
            "default": false
          },
          "trendingCountries": {
            "title": "Trending searches: countries",
            "type": "array",
            "description": "Also get Google's 'Trending now' searches for these countries, e.g. 'US', 'GB', 'DE'. Leave empty to skip.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "trendingTimeWindow": {
            "title": "Trending searches: time window",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Trending in the past 4 hours (real time), 24 hours (daily), 48 hours or 7 days.",
            "default": "24"
          },
          "maxTrendingPerCountry": {
            "title": "Trending searches: max per country",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Most trending searches to return per country, highest first as Google lists them, e.g. 50.",
            "default": 50
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language for region and topic names, e.g. 'en-US', 'de', 'fr'.",
            "default": "en-US"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Leave as is: the Actor starts on Apify's datacenter proxy and moves to residential only if Google keeps answering 'too many requests'.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}