{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Batch Scraper - Rising Queries & YouTube Trends",
    "description": "Analyze up to 1,000 keywords in one run with no start fee. Interest over time, 5-term comparisons, rising related queries & topics, interest by region, YouTube/News/Shopping search trends and real-time trending searches.",
    "version": "0.1",
    "x-build-id": "dxcugKJ3rFmGffVVK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/criatolabs~google-trends-batch-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-criatolabs-google-trends-batch-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/criatolabs~google-trends-batch-scraper/runs": {
      "post": {
        "operationId": "runs-sync-criatolabs-google-trends-batch-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/criatolabs~google-trends-batch-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-criatolabs-google-trends-batch-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 (one per line)",
            "type": "array",
            "description": "Each keyword is analyzed on its own 0-100 scale. Up to 1,000 terms per run, all in a single run.",
            "items": {
              "type": "string"
            }
          },
          "comparisons": {
            "title": "Comparisons (up to 5 terms each, comma-separated)",
            "type": "array",
            "description": "Each line is compared on a shared 0-100 scale, exactly like the Google Trends website. Example: 'iphone, samsung galaxy, pixel'.",
            "items": {
              "type": "string"
            }
          },
          "trendingCountries": {
            "title": "Trending searches: countries",
            "type": "array",
            "description": "Two-letter country codes (US, BR, GB, IN...). Returns the top trending searches right now in each country (up to 10 per country), with approximate traffic and related news.",
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "Location",
            "type": "string",
            "description": "Country (US, BR) or subregion (US-CA, BR-SP) for keywords and comparisons. Leave empty for worldwide.",
            "default": ""
          },
          "timeframe": {
            "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": "Period for keywords and comparisons.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom date range (overrides Time range)",
            "type": "string",
            "description": "Format: 'YYYY-MM-DD YYYY-MM-DD', e.g. '2025-01-01 2025-06-30'."
          },
          "searchProperty": {
            "title": "Search type",
            "enum": [
              "web",
              "youtube",
              "news",
              "images",
              "shopping"
            ],
            "type": "string",
            "description": "Which Google search to measure. 'YouTube Search' shows what people search for on YouTube.",
            "default": "web"
          },
          "category": {
            "title": "Category ID",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category (0 = all categories). Examples: 3 = Arts & Entertainment, 5 = Computers & Electronics, 7 = Finance, 45 = Health, 71 = Food & Drink.",
            "default": 0
          },
          "includeRelated": {
            "title": "Include related & rising queries and topics",
            "type": "boolean",
            "description": "Adds the 'Top' and 'Rising' related queries and topics for each term (the breakout searches SEO teams look for).",
            "default": true
          },
          "maxRelatedPerList": {
            "title": "Max related items per list",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Limit for each of the top/rising lists.",
            "default": 25
          },
          "includeRegions": {
            "title": "Include interest by region",
            "type": "boolean",
            "description": "Adds interest by country/state/city (free, no extra charge).",
            "default": false
          },
          "regionResolution": {
            "title": "Region resolution",
            "enum": [
              "AUTO",
              "COUNTRY",
              "REGION",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "Granularity for 'Include interest by region'. Automatic picks country (worldwide), state (country) or city (subregion).",
            "default": "AUTO"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language for topic names and labels, e.g. en-US, pt-BR, es-ES.",
            "default": "en-US"
          },
          "maxTrendingPerCountry": {
            "title": "Max trending searches per country",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Google's real-time trending feed lists up to 10 current trends per country.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Google limits each IP to a handful of Trends queries. Residential proxy is the default (tested: 500 keywords, 0 failures). The Actor rotates IPs automatically.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "maxConcurrency": {
            "title": "Parallel workers",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many queries run in parallel, each on its own IP.",
            "default": 8
          },
          "maxRequestsPerIp": {
            "title": "Requests per IP before rotating",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Google starts blocking an IP after roughly 10-15 queries.",
            "default": 8
          },
          "maxRetries": {
            "title": "Retries per request",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many times a blocked request is retried on a fresh IP before the term is marked as failed (failures are free).",
            "default": 8
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}