{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper & API: Bulk Trend Summaries",
    "description": "Bulk Google Trends API and pytrends alternative. Each keyword lookup returns interest over time, interest by region, rising related searches and a plain-English summary: rising or falling, year on year, peak, seasonality. $5 per 1,000 keyword lookups; failed lookups are free.",
    "version": "1.0",
    "x-build-id": "H77lIUAk8NrTHIzRU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/meridianlabs~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-meridianlabs-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/meridianlabs~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-meridianlabs-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/meridianlabs~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-meridianlabs-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. Each keyword is one keyword lookup ($0.005; failed lookups are free). Duplicates are removed. Optional if you give Google Trends URLs below.",
            "items": {
              "type": "string"
            }
          },
          "trendsUrls": {
            "title": "Google Trends URLs (optional)",
            "type": "array",
            "description": "Paste Google Trends explore URLs, e.g. https://trends.google.com/trends/explore?q=air%20fryer&geo=US&date=today%205-y. Each URL keeps its own terms (up to 5 compared), location, time range, category and search type; the settings below don't apply to URLs.",
            "items": {
              "type": "string"
            }
          },
          "compareKeywords": {
            "title": "Compare keywords on one scale",
            "type": "boolean",
            "description": "Off: each keyword gets its own 0–100 scale (100 = its own peak). On: keywords are compared in groups of up to 5 (Google's limit) so their numbers are directly comparable. Still charged per keyword.",
            "default": false
          },
          "geo": {
            "title": "Location",
            "type": "string",
            "description": "Country code, or country-region code, as used by Google Trends: e.g. US, GB, AU, US-CA, AU-NSW. Leave empty for worldwide."
          },
          "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_time",
              "custom"
            ],
            "type": "string",
            "description": "How far back to look. Google picks the data resolution from the range (e.g. daily for 90 days, weekly for 5 years, monthly for 2004 to present). Seasonality and year-on-year change need weekly data spanning more than a year: use Past 5 years.",
            "default": "past_12_months"
          },
          "customTimeRange": {
            "title": "Custom time range",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2} \\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Only used when Time range is Custom. Format: YYYY-MM-DD YYYY-MM-DD, e.g. 2024-01-01 2025-06-30."
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "web",
              "youtube",
              "news",
              "images",
              "shopping"
            ],
            "type": "string",
            "description": "Which Google search to measure: web search, YouTube, News, Image search or Google Shopping (the same choice as the search-type menu on trends.google.com).",
            "default": "web"
          },
          "category": {
            "title": "Category ID",
            "minimum": 0,
            "type": "integer",
            "description": "Optional Google Trends category ID to narrow ambiguous keywords (0 = all categories). Example: 71 = Food & Drink. You'll find it after cat= in a Google Trends URL.",
            "default": 0
          },
          "includeRegions": {
            "title": "Include interest by region",
            "type": "boolean",
            "description": "Adds interest by region: which countries (worldwide lookups), states/regions (country lookups) or US metro areas search the keyword most, 0–100, highest first. Included in the keyword lookup price.",
            "default": true
          },
          "regionResolution": {
            "title": "Region level",
            "enum": [
              "auto",
              "COUNTRY",
              "REGION",
              "DMA"
            ],
            "type": "string",
            "description": "Level for interest by region. Google's default: countries for worldwide lookups, states/regions for a country. City-level data is not available (Google withholds it from automated lookups), so for a state such as AU-NSW, where Google defaults to cities, the row comes back partial without regions.",
            "default": "auto"
          },
          "includeRelatedQueries": {
            "title": "Include rising related searches",
            "type": "boolean",
            "description": "Adds Google's top and rising related searches (\"related queries\"), with growth such as +350% or Breakout. Each is flagged with whether it shares a word with your keyword, because Google's rising list sometimes contains unrelated noise. Included in the keyword lookup price.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Parallel lookups",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many keywords to look up at once. Higher is faster; the price is the same.",
            "default": 5
          },
          "failOnErrors": {
            "title": "Fail the run if any lookup fails",
            "type": "boolean",
            "description": "Useful for schedules and monitoring: the run is marked failed (so Apify can alert you) if any keyword errors. Failed keywords are still not charged.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}