{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Radar — Batch Keywords & Trending Now",
    "description": "Batch Google Trends scraper: interest over time, interest by region, related queries & topics for hundreds of keywords per run, plus real-time trending searches with volume. Smart backoff + session rotation for reliability. Pay per result.",
    "version": "0.1",
    "x-build-id": "ofWKDJ0EOCteGZjhE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/primevision~google-trends-radar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-primevision-google-trends-radar",
        "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/primevision~google-trends-radar/runs": {
      "post": {
        "operationId": "runs-sync-primevision-google-trends-radar",
        "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/primevision~google-trends-radar/run-sync": {
      "post": {
        "operationId": "run-sync-primevision-google-trends-radar",
        "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 (batch)",
            "type": "array",
            "description": "Any number of search terms — the actor works through the whole list with smart pacing and retries. Not needed if you only want trending searches.",
            "items": {
              "type": "string"
            }
          },
          "dataTypes": {
            "title": "Data to fetch",
            "uniqueItems": true,
            "type": "array",
            "description": "Which Google Trends datasets to fetch for each keyword. 'Trending now' ignores keywords and returns what is trending right now in the selected country.",
            "items": {
              "type": "string",
              "enum": [
                "interest_over_time",
                "interest_by_region",
                "related_queries",
                "related_topics",
                "trending_now"
              ],
              "enumTitles": [
                "Interest over time",
                "Interest by region",
                "Related queries",
                "Related topics",
                "Trending now (real-time)"
              ]
            },
            "default": [
              "interest_over_time"
            ]
          },
          "timeframes": {
            "title": "Timeframes",
            "type": "array",
            "description": "One or more Google Trends time ranges — each keyword is fetched for every timeframe listed. Supported: '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', or a custom range 'YYYY-MM-DD YYYY-MM-DD'.",
            "default": [
              "today 12-m"
            ],
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "Location (geo)",
            "type": "string",
            "description": "Two-letter country code (e.g. 'US', 'GB', 'DE'), region code (e.g. 'US-NY'), or empty for worldwide. Note: 'Trending now' has no worldwide mode — with empty geo it falls back to US.",
            "default": ""
          },
          "category": {
            "title": "Category ID",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category to filter by (0 = all categories). Examples: 7 Finance, 8 Games, 12 Business & Industrial, 13 Internet & Telecom, 16 News, 18 Shopping, 20 Sports, 45 Health, 71 Food & Drink. Full list: https://github.com/pat310/google-trends-api/wiki/Google-Trends-Categories",
            "default": 0
          },
          "searchProperty": {
            "title": "Search property",
            "enum": [
              "",
              "images",
              "news",
              "youtube",
              "froogle"
            ],
            "type": "string",
            "description": "Which Google property to measure search interest on.",
            "default": ""
          },
          "compareKeywords": {
            "title": "Compare keywords against each other",
            "type": "boolean",
            "description": "OFF (default): every keyword is scaled independently 0-100 — best for batch keyword research. ON: keywords are compared in groups of 5 on a shared scale, like the compare feature on the Google Trends website.",
            "default": false
          },
          "regionResolution": {
            "title": "Region breakdown level",
            "enum": [
              "AUTO",
              "COUNTRY",
              "REGION",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "Granularity for 'Interest by region'. AUTO = regions for a country, countries for worldwide.",
            "default": "AUTO"
          },
          "trendingHours": {
            "title": "Trending window (hours)",
            "minimum": 1,
            "maximum": 168,
            "type": "integer",
            "description": "For 'Trending now': how far back the trend may have started. Use 4, 24, 48 or 168 (7 days).",
            "default": 24
          },
          "maxTrendingItems": {
            "title": "Max trending items",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on 'Trending now' rows returned (Google typically has 300-500 active trends).",
            "default": 50
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language hint for trending searches (e.g. 'en', 'de', 'pl').",
            "default": "en"
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Parallel workers, each with its own proxy session. Keep low — Google rate-limits aggressively; 2 is a good balance of speed and reliability.",
            "default": 2
          },
          "maxRetriesPerRequest": {
            "title": "Max retries per request",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many times a single API call is retried with a fresh session and exponential backoff before the item is reported as failed.",
            "default": 5
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Google throttles datacenter IPs heavily — residential proxy strongly recommended, especially for related queries.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}