{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper | Compare 1,000 Terms, Daily Data",
    "description": "Google Trends data without a browser: interest over time for up to 1,000 terms on one comparable scale, daily points over years, interest by region, top and rising related queries, and Trending now by country with search volumes.",
    "version": "0.1",
    "x-build-id": "cstE971Mv1F12uTl7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alexmorain~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alexmorain-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/alexmorain~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alexmorain-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/alexmorain~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alexmorain-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": "Search terms",
            "type": "array",
            "description": "Keywords or phrases, one per line. A Google Knowledge Graph topic ID such as <code>/m/05p0rrx</code> (Bitcoin, the topic) also works. Duplicates are removed, case insensitive.",
            "items": {
              "type": "string"
            }
          },
          "compareTerms": {
            "title": "Compare terms on one scale",
            "type": "boolean",
            "description": "On: all terms share one 0-100 scale, so a 50 for one term means half the searches of a 100 for another. Off: each term is read on its own, its own peak is 100, and values do <b>not</b> compare between terms.",
            "default": true
          },
          "anchorTerm": {
            "title": "Anchor term (more than 5 terms)",
            "type": "string",
            "description": "Google compares at most 5 terms per request. With more, every request includes this term and the results are rescaled through it, then the whole set is brought back to 100 at its highest point. Pick a term with steady, mid-to-high search volume. Empty: the first search term."
          },
          "geo": {
            "title": "Location",
            "type": "string",
            "description": "Empty for worldwide, or a Google Trends location code: a country (<code>US</code>, <code>FR</code>, <code>DE</code>), a region (<code>US-CA</code>, <code>GB-ENG</code>, <code>FR-J</code>) or a US metro area (<code>US-NY-501</code>).",
            "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",
              "all",
              "custom"
            ],
            "type": "string",
            "description": "Google picks the point spacing from the range: by the minute up to 4 hours, by the hour up to 7 days, by the day up to 269 days, by the week up to 5 years, by the month beyond. Turn on <b>Daily points</b> to get one point per day on long ranges.",
            "default": "past-12-months"
          },
          "startDate": {
            "title": "Start date (custom range)",
            "type": "string",
            "description": "First day of a custom range, from 2004-01-01. Used only when Time range is Custom dates."
          },
          "endDate": {
            "title": "End date (custom range)",
            "type": "string",
            "description": "Last day of a custom range. Used only when Time range is Custom dates."
          },
          "dailyResolution": {
            "title": "Daily points on long ranges",
            "type": "boolean",
            "description": "Past 269 days, Google only gives weekly or monthly points. On: the range is read in 269-day windows and each window is calibrated on the weekly or monthly series of the whole range, so you get one comparable point per day, up to 10 years. Costs no extra event, takes a few more seconds per term.",
            "default": false
          },
          "category": {
            "title": "Category",
            "minimum": 0,
            "type": "integer",
            "description": "Narrow the searches to a Google Trends category, by its number: 0 all categories, 3 Arts and Entertainment, 5 Computers and Electronics, 7 Finance, 8 Games, 12 Business and Industrial, 16 News, 18 Shopping, 20 Sports, 45 Health, 47 Autos and Vehicles, 67 Travel, 71 Food and Drink, 958 Jobs and Education. The number is the <code>cat=</code> value of a Google Trends link.",
            "default": 0
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "web",
              "youtube",
              "news",
              "images",
              "shopping"
            ],
            "type": "string",
            "description": "Which Google search the interest comes from.",
            "default": "web"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language of region names, such as <code>en-US</code>, <code>fr</code>, <code>de</code>, <code>es</code>. It does not filter the searches; Location does.",
            "default": "en-US"
          },
          "includeRegions": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Where each term is searched the most, 100 being the region with the highest share of searches.",
            "default": true
          },
          "regionResolution": {
            "title": "Region level",
            "enum": [
              "auto",
              "COUNTRY",
              "REGION",
              "DMA",
              "CITY"
            ],
            "type": "string",
            "description": "Auto: countries for a worldwide search, regions inside a country. Metro areas (DMA) need a US location. Cities work best inside a region such as <code>US-CA</code>.",
            "default": "auto"
          },
          "includeRelatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Top related queries (up to 25, 100 being the most searched) and rising ones (growth in %, or Breakout above 5000%).",
            "default": true
          },
          "trendingCountries": {
            "title": "Countries",
            "type": "array",
            "description": "Country codes (<code>US</code>, <code>GB</code>, <code>FR</code>, <code>IN</code>...). For each country you get every trend Google lists right now in Trending now: often several hundred over 24 hours.",
            "items": {
              "type": "string"
            }
          },
          "trendingTimeWindow": {
            "title": "Trending over the past",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Trends started in this window.",
            "default": "24"
          },
          "trendingCategories": {
            "title": "Trend categories",
            "type": "array",
            "description": "Keep only trends in these categories. Empty: all 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"
              ]
            }
          },
          "trendingActiveOnly": {
            "title": "Active trends only",
            "type": "boolean",
            "description": "Skip trends Google marks as ended.",
            "default": false
          },
          "maxTrendsPerCountry": {
            "title": "Max trends per country",
            "minimum": 0,
            "type": "integer",
            "description": "Keep the N trends with the highest search volume in each country. 0 keeps them all.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many requests run at once, each on its own proxy session. 5 is a good balance between speed and Google's rate limits.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify datacenter proxy works for Google Trends. If Google keeps refusing it, new sessions switch to residential proxy automatically when your account has access.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}