{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper: No Login Needed",
    "description": "Extract Google Trends data without logging in: interest over time, interest by region, related queries and topics for up to 25 search terms, plus the daily trending searches feed for any country.",
    "version": "0.1",
    "x-build-id": "RbVb5iMsHh4HhcP5O"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bibian~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bibian-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/bibian~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-bibian-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/bibian~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-bibian-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": "1 to 25 terms to compare on Google Trends. Terms are compared 5 at a time (Google's own limit); more than 5 are split into separate batches that do not share a scale with each other.",
            "default": [
              "ChatGPT"
            ],
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "Region (geo)",
            "type": "string",
            "description": "Where to measure interest: empty for worldwide, a country code (\"US\", \"FR\"), or a sub-region (\"US-CA\", \"GB-LON\").",
            "default": ""
          },
          "compareGeos": {
            "title": "Compare one term across regions",
            "type": "array",
            "description": "2 to 5 region codes to compare a single search term across, on the same 0-100 scale in one call (Google's own \"compare across regions\" mode). Requires exactly one entry in \"Search terms\" and is not compatible with \"Interest by region\". \"Region (geo)\" above is ignored when this is set.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "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": "A Google Trends time range. For a precise range, use \"Custom time range\" below.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom time range (optional)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2}(T\\d{2})? \\d{4}-\\d{2}-\\d{2}(T\\d{2})?)?$",
            "type": "string",
            "description": "A precise range instead of the menu above: two dates such as \"2024-01-01 2024-06-30\", or to the hour for ranges under a week, such as \"2024-01-01T00 2024-01-07T23\". Leave empty to use \"Time range\"."
          },
          "category": {
            "title": "Category",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category ID. 0 means every category.",
            "default": 0
          },
          "property": {
            "title": "Property",
            "enum": [
              "web",
              "images",
              "news",
              "youtube",
              "froogle"
            ],
            "type": "string",
            "description": "Which Google property to measure search interest on.",
            "default": "web"
          },
          "hl": {
            "title": "Interface language",
            "type": "string",
            "description": "Language tag used for region and topic names in the response, such as \"en-US\" or \"fr\".",
            "default": "en-US"
          },
          "interestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "One row per date per search term, with the relative search-interest value (0-100) and whether the latest point is still partial.",
            "default": true
          },
          "interestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "One row per region per search term, with the relative search-interest value (0-100) in that region.",
            "default": false
          },
          "regionResolution": {
            "title": "Interest by region: resolution",
            "enum": [
              "COUNTRY",
              "REGION",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "Level of detail for \"Interest by region\". Leave empty for Google's default (countries worldwide, sub-regions inside a country). COUNTRY needs a worldwide search, REGION and CITY work worldwide or inside a country, DMA (US metro areas) needs \"US\" or worldwide."
          },
          "includeLowVolumeRegions": {
            "title": "Interest by region: include low-volume regions",
            "type": "boolean",
            "description": "Also return regions with a low search volume, which Google hides by default.",
            "default": false
          },
          "relatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "The top and rising search queries related to each search term.",
            "default": false
          },
          "relatedTopics": {
            "title": "Related topics",
            "type": "boolean",
            "description": "The top and rising topics related to each search term.",
            "default": false
          },
          "trendingNow": {
            "title": "Trending now (separate mode)",
            "type": "boolean",
            "description": "Also fetch today's trending searches for one country from Google's public trending-searches feed. Works on its own: it does not need \"searchTerms\".",
            "default": false
          },
          "trendingGeo": {
            "title": "Trending now: country",
            "type": "string",
            "description": "Two-letter country code for \"Trending now\" (for example \"US\", \"FR\", \"GB\", \"IN\", \"JP\").",
            "default": "US"
          },
          "compact": {
            "title": "Compact output (one item per term and data type)",
            "type": "boolean",
            "description": "Return one dataset item per search term and data type, with the whole series nested inside (points, regions, top and rising lists), instead of one row per date, region or related entry. Same data, far fewer items, so it costs much less. Not compatible with \"Only new results\".",
            "default": false
          },
          "onlyNew": {
            "title": "Only new results",
            "type": "boolean",
            "description": "For scheduled runs. Skip the results that an earlier run of this same search already delivered, so each run returns, and charges, only what is new. The memory is kept in a key-value store of your account named \"only-new-memory-bibian-\" followed by the ID of this Actor.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}