{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper - Interest, Regions, Queries, $2/1K",
    "description": "Google Trends scraper that does not time out: 100% of runs succeeded in the last 30 days. Interest over time, % change, breakout queries, interest by country, region, city and metro, YouTube and News, Trending now. Up to 1,000 keywords per run. $2 per 1,000 keywords, no start fee.",
    "version": "0.1",
    "x-build-id": "wzmPXUTRiiN9UOxkg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/om_kh~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-om_kh-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/om_kh~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-om_kh-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/om_kh~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-om_kh-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": {
          "searchTerms": {
            "title": "Keywords",
            "type": "array",
            "description": "Keywords or topics to analyse on Google Trends, one per line (up to 1,000 per run).",
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country code (US, FR, GB, DE, IN...). Empty = worldwide.",
            "default": ""
          },
          "timeRange": {
            "title": "Time range",
            "enum": [
              "past_hour",
              "past_4_hours",
              "past_day",
              "past_7_days",
              "past_30_days",
              "past_90_days",
              "past_12_months",
              "past_5_years",
              "since_2004"
            ],
            "type": "string",
            "description": "Period to analyse.",
            "default": "past_12_months"
          },
          "customTimeRange": {
            "title": "Custom time range (optional)",
            "type": "string",
            "description": "Two dates, start then end: 2024-01-01 2024-12-31. Replaces the time range above. For hourly data on a short period: 2026-10-01T00 2026-10-03T00."
          },
          "searchProperty": {
            "title": "Search on",
            "enum": [
              "web",
              "images",
              "news",
              "shopping",
              "youtube"
            ],
            "type": "string",
            "description": "Which Google service the searches were made on.",
            "default": "web"
          },
          "compare": {
            "title": "Compare keywords on the same scale",
            "type": "boolean",
            "description": "Group keywords by 5 so their 0-100 values are directly comparable (like typing them together on Google Trends). Off = each keyword on its own scale.",
            "default": false
          },
          "includeRelated": {
            "title": "Related and breakout queries",
            "type": "boolean",
            "description": "Top and rising (breakout) related queries, plus related topics when Google has them.",
            "default": true
          },
          "includeRegions": {
            "title": "Top regions",
            "type": "boolean",
            "description": "Where the keyword is most searched: countries when the search is worldwide, regions when it is one country.",
            "default": true
          },
          "regionLevels": {
            "title": "More place levels (optional)",
            "type": "array",
            "description": "Extra breakdowns in the same row: interestByCountry, interestBySubregion, interestByCity, interestByMetro. Free.",
            "items": {
              "type": "string",
              "enum": [
                "country",
                "region",
                "city",
                "metro"
              ],
              "enumTitles": [
                "Countries",
                "Regions / states",
                "Cities",
                "Metro areas (US)"
              ]
            }
          },
          "maxRegions": {
            "title": "Max places per level",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "How many places to keep per level, most interested first. 0 = all of them.",
            "default": 15
          },
          "includeLowSearchVolumeRegions": {
            "title": "Include low search volume places",
            "type": "boolean",
            "description": "Also list places Google hides by default because few people search there.",
            "default": false
          },
          "category": {
            "title": "Category ID",
            "type": "integer",
            "description": "Optional Google Trends category ID (0 = all categories).",
            "default": 0
          },
          "startUrls": {
            "title": "Google Trends links (optional)",
            "type": "array",
            "description": "Paste trends.google.com/trends/explore links: terms, country, dates, category and service are read from each link.",
            "items": {
              "type": "string"
            }
          },
          "spreadsheetId": {
            "title": "Google Sheet of search terms (optional)",
            "type": "string",
            "description": "Link or ID of a Google Sheet shared as 'Anyone with the link'. The first column is read, one search term per row, up to 1,000 terms."
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language of topic names, place names and date labels: en-US, fr, es, de, pt-BR, ja...",
            "default": "en-US"
          },
          "viewedFrom": {
            "title": "View Trends from country (optional)",
            "type": "string",
            "description": "Two-letter country the request leaves from (us, gb, fr...). Left empty, or if no proxy exists there, the default route is used."
          },
          "trendingNowCountries": {
            "title": "Trending now (countries)",
            "type": "array",
            "description": "Optional: two-letter country codes to also get the trending searches of each (search volume, growth, start time, categories, related queries, news).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "trendingNowTimeframe": {
            "title": "Trending now: period",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "How far back to list trending searches.",
            "default": "24"
          },
          "trendingNowMaxItems": {
            "title": "Trending now: max per country",
            "minimum": 1,
            "maximum": 2500,
            "type": "integer",
            "description": "Biggest trends first. A country has a few hundred per day and about 2,000 per week.",
            "default": 25
          },
          "trendingNowCategories": {
            "title": "Trending now: categories (optional)",
            "type": "array",
            "description": "Keep only trends of these categories.",
            "items": {
              "type": "string",
              "enum": [
                "Autos and Vehicles",
                "Beauty and Fashion",
                "Business and Finance",
                "Climate",
                "Entertainment",
                "Food and Drink",
                "Games",
                "Health",
                "Hobbies and Leisure",
                "Jobs and Education",
                "Law and Government",
                "Other",
                "Pets and Animals",
                "Politics",
                "Science",
                "Shopping",
                "Sports",
                "Technology",
                "Travel and Transportation"
              ]
            }
          },
          "maxTotalChargeUsd": {
            "title": "Max total charge (USD)",
            "type": "number",
            "description": "Optional hard cap on what this run can cost you."
          },
          "isMultiple": {
            "title": "Comma separates several terms",
            "type": "boolean",
            "description": "When on, an entry like `tea, coffee` is read as two search terms.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum records",
            "minimum": 0,
            "type": "integer",
            "description": "Most records returned by the run. 0 = no limit.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}