{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Bulk API - Search Interest & Related Queries",
    "description": "Google Trends scraper and bulk API for search-interest timelines, trend metrics, and related queries. Export structured JSON for SEO research, content planning, and automation. Pay only for complete keyword results. Beta by AGENT DOJO.",
    "version": "0.1",
    "x-build-id": "2GzetC7euqWwGJbO2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alex_fodo~google-trends-bulk-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alex_fodo-google-trends-bulk-api",
        "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/alex_fodo~google-trends-bulk-api/runs": {
      "post": {
        "operationId": "runs-sync-alex_fodo-google-trends-bulk-api",
        "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/alex_fodo~google-trends-bulk-api/run-sync": {
      "post": {
        "operationId": "run-sync-alex_fodo-google-trends-bulk-api",
        "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",
        "required": [
          "keywords"
        ],
        "properties": {
          "keywords": {
            "title": "Keywords",
            "minItems": 1,
            "maxItems": 300,
            "type": "array",
            "description": "1–300 search terms, up to 120 characters each. Exact duplicates are collected once. Each term is independently scaled; results are not absolute search volumes.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          "geo": {
            "title": "Country",
            "pattern": "^(?:[A-Z]{2})?$",
            "type": "string",
            "description": "Uppercase two-letter country code, such as US, GB or UA. Empty string means worldwide. Unsupported source regions return diagnostics.",
            "default": "US"
          },
          "window": {
            "title": "Time range",
            "enum": [
              "today 12-m",
              "today 3-m",
              "today 1-m",
              "now 7-d"
            ],
            "type": "string",
            "description": "Relative period evaluated by Google at collection time. Timestamp fields use UTC.",
            "default": "today 12-m"
          },
          "includeRelatedQueries": {
            "title": "Include related queries",
            "type": "boolean",
            "description": "Collect top and rising queries. If requested data is unavailable, the result is partial and no keyword-result event is charged. Empty lists returned by the source are valid.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Direct connection or custom proxies. Authenticated proxies require HTTPS; managed Apify Proxy is disabled until encrypted first-hop transport is verified. Direct cloud connections may be rate-limited. Validate reliability and full cost privately.",
            "default": {
              "useApifyProxy": false
            }
          },
          "maxRetries": {
            "title": "Retries per source request",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Bounded retries for transient HTTP/network failures. Retries are not separate billable keyword events.",
            "default": 2
          },
          "requestTimeoutSeconds": {
            "title": "Request timeout (seconds)",
            "minimum": 10,
            "maximum": 60,
            "type": "integer",
            "description": "Timeout of each individual HTTP attempt.",
            "default": 30
          },
          "delayMillis": {
            "title": "Delay between keywords (milliseconds)",
            "minimum": 250,
            "maximum": 10000,
            "type": "integer",
            "description": "Sequential keyword collection with a delay helps reduce source throttling. Failed HTTP requests also use exponential backoff.",
            "default": 1500
          },
          "maxRequests": {
            "title": "Maximum source HTTP attempts",
            "minimum": 1,
            "maximum": 4000,
            "type": "integer",
            "description": "Hard limit for all Google requests, including retries. A complete result typically needs 2 or 3 successful requests. A lower cap can end the batch before every keyword is processed.",
            "default": 1500
          },
          "maxConsecutiveFailures": {
            "title": "Stop after consecutive failed or partial keywords",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Circuit breaker that stops work instead of continuing a batch against an unavailable source. Remaining keywords are reported in the run summary through requested/delivered counts.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}