{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper - Interest, Regions, Related & Trending",
    "description": "Use this to get Google Trends data for keywords. Input: search terms (up to 5 comma-separated on one line to compare), country code, time range. One result = one keyword or comparison: interest over time (0-100), interest by region, top and rising related queries and topics. $2.50 per 1,000 results.",
    "version": "1.0",
    "x-build-id": "dLMPxtm5455OCkCeR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rel8ble~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rel8ble-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/rel8ble~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rel8ble-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/rel8ble~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rel8ble-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": "List of Google Trends searches; each string = one result. Single keyword: \"bitcoin\". Compare up to 5 terms on one 0-100 scale: comma-separate them in one string, e.g. \"iphone, samsung galaxy\". Topic IDs like \"/m/05p0rrx\" work. Give searchTerms, exploreUrls or trendingNowGeos.",
            "items": {
              "type": "string"
            }
          },
          "exploreUrls": {
            "title": "Google Trends explore URLs",
            "type": "array",
            "description": "Optional. List of trends.google.com/trends/explore URLs, e.g. [\"https://trends.google.com/trends/explore?q=bitcoin&geo=US\"]. Keywords, country, time range, category and search type are read from each URL.",
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "Country / region",
            "type": "string",
            "description": "Optional. Where to measure interest: \"\" = Worldwide (default), a 2-letter uppercase country code (\"US\", \"GB\", \"DE\", \"IN\") or a sub-region code (\"US-CA\", \"GB-ENG\").",
            "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": "Optional. Period to measure. One of: \"now 1-H\" (past hour), \"now 4-H\", \"now 1-d\", \"now 7-d\", \"today 1-m\" (30 days), \"today 3-m\", \"today 12-m\" (default), \"today 5-y\", \"all\" (2004-present). Ignored when customTimeRange is set.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom date range",
            "type": "string",
            "description": "Optional. Exact date range that overrides timeRange, format \"YYYY-MM-DD YYYY-MM-DD\" (start, space, end), e.g. \"2024-01-01 2024-12-31\"."
          },
          "category": {
            "title": "Category ID",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Google Trends category ID, integer >= 0. Default 0 = all categories. Examples: 7 Finance, 5 Computers & Electronics, 71 Food & Drink, 47 Autos & Vehicles, 18 Shopping.",
            "default": 0
          },
          "searchProperty": {
            "title": "Search type",
            "enum": [
              "web",
              "images",
              "news",
              "youtube",
              "shopping"
            ],
            "type": "string",
            "description": "Optional. Which Google search to measure: \"web\" (default), \"images\", \"news\", \"youtube\" or \"shopping\".",
            "default": "web"
          },
          "includeInterestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "Optional boolean. true = include the 0-100 interest timeline plus average, peak and change per keyword. Default true.",
            "default": true
          },
          "includeInterestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Optional boolean. true = include 0-100 interest per country (Worldwide) or per region/city (inside a country). Default true.",
            "default": true
          },
          "regionResolution": {
            "title": "Region resolution",
            "enum": [
              "AUTO",
              "COUNTRY",
              "REGION",
              "DMA",
              "CITY"
            ],
            "type": "string",
            "description": "Optional. Level for interest by region: \"AUTO\" (default: countries for Worldwide, sub-regions inside a country), \"COUNTRY\", \"REGION\" (state/province), \"DMA\" (US metro) or \"CITY\". DMA and CITY need geo set to a country.",
            "default": "AUTO"
          },
          "includeLowSearchVolumeRegions": {
            "title": "Include low-volume regions",
            "type": "boolean",
            "description": "Optional boolean. true = also return regions Google marks as low search volume. Default false.",
            "default": false
          },
          "includeRelatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Optional boolean. true = include top and rising related searches (rising includes \"Breakout\" terms). Default true.",
            "default": true
          },
          "includeRelatedTopics": {
            "title": "Related topics",
            "type": "boolean",
            "description": "Optional boolean. true = include top and rising related topics with Knowledge Graph IDs. Default true.",
            "default": true
          },
          "trendingNowGeos": {
            "title": "Trending now (countries)",
            "type": "array",
            "description": "Optional. List of 2-letter uppercase country codes, e.g. [\"US\", \"GB\"]. Adds Google's current \"Trending now\" searches for each country (about 10 each) with approximate volume and news links; one result per trending search.",
            "items": {
              "type": "string"
            }
          },
          "language": {
            "title": "Language (hl)",
            "type": "string",
            "description": "Optional. Google interface language code, e.g. \"en-US\", \"de\", \"fr\". Affects region and topic names. Default \"en-US\".",
            "default": "en-US"
          },
          "timezoneOffset": {
            "title": "Time zone offset (minutes)",
            "type": "integer",
            "description": "Optional. Minutes behind UTC using Google's sign convention, integer: 300 = UTC-5 (New York winter), -60 = UTC+1. Affects hourly and daily buckets. Default 0 (UTC).",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Optional, advanced. Searches processed in parallel, integer 1-10. Default 3 (Google Trends rate-limits hard). Leave unset.",
            "default": 3
          },
          "maxRequestRetries": {
            "title": "Max retries per search",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Optional, advanced. Retries per failed or blocked request, integer 0-20; each retry uses a new proxy session. Default 8. Leave unset.",
            "default": 8
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional, advanced. Apify Proxy settings object, e.g. {\"useApifyProxy\": true}. Default: Apify Proxy on (datacenter). Leave unset; switch to {\"useApifyProxy\": true, \"apifyProxyGroups\": [\"RESIDENTIAL\"]} only if the run log shows repeated blocks.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}