{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends API & Scraper - No 429 Errors",
    "description": "Google Trends API: interest over time, interest by region (country/state/city/DMA) and top + rising related queries for any keyword. Compare up to 5 terms. Reliable pytrends alternative with automatic retries on 429. $0.003 per term, pay only for results. Works via API and MCP.",
    "version": "1.0",
    "x-build-id": "qUX9lA2i008e1nca1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/signalmine~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-signalmine-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/signalmine~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-signalmine-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/signalmine~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-signalmine-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",
        "required": [
          "searchTerms"
        ],
        "properties": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords or topics to look up. Each term becomes one result (or groups of up to 5 when 'Compare terms' is on).",
            "items": {
              "type": "string"
            }
          },
          "compareTerms": {
            "title": "Compare terms against each other",
            "type": "boolean",
            "description": "Group terms in batches of up to 5 so values are relative to each other (like the comparison view on trends.google.com).",
            "default": false
          },
          "geo": {
            "title": "Location (geo code)",
            "type": "string",
            "description": "Country or region code, e.g. US, GB, ES, US-CA, AU-NSW. Leave empty for worldwide.",
            "default": ""
          },
          "timeRange": {
            "title": "Time range",
            "enum": [
              "past_hour",
              "past_4_hours",
              "past_day",
              "past_7_days",
              "past_30_days",
              "past_90_days",
              "past_12_months",
              "past_5_years",
              "all_time"
            ],
            "type": "string",
            "description": "Period to analyse. Ignored when a custom start date is set.",
            "default": "past_12_months"
          },
          "customStartDate": {
            "title": "Custom start date",
            "type": "string",
            "description": "Optional YYYY-MM-DD. Overrides 'Time range'."
          },
          "customEndDate": {
            "title": "Custom end date",
            "type": "string",
            "description": "Optional YYYY-MM-DD. Defaults to today."
          },
          "category": {
            "title": "Category ID",
            "type": "integer",
            "description": "Google Trends category ID (0 = all categories).",
            "default": 0
          },
          "searchProperty": {
            "title": "Search type",
            "enum": [
              "",
              "images",
              "news",
              "froogle",
              "youtube"
            ],
            "type": "string",
            "description": "Which Google search product the interest refers to.",
            "default": ""
          },
          "includeInterestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "Timeline of search interest (0-100).",
            "default": true
          },
          "includeInterestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Search interest per country, region, city or metro.",
            "default": true
          },
          "regionResolution": {
            "title": "Region resolution",
            "enum": [
              "",
              "COUNTRY",
              "REGION",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "Granularity for interest by region. Leave empty for Google's default.",
            "default": ""
          },
          "includeLowVolumeRegions": {
            "title": "Include regions with no data",
            "type": "boolean",
            "description": "Keep regions where Google reports not enough data (value null).",
            "default": false
          },
          "includeRelatedQueries": {
            "title": "Related queries (top + rising)",
            "type": "boolean",
            "description": "Top and rising related search queries, including Breakout terms.",
            "default": true
          },
          "language": {
            "title": "Interface language",
            "type": "string",
            "description": "Language for topic names and dates, e.g. en-US, es-ES, de-DE.",
            "default": "en-US"
          },
          "maxConcurrency": {
            "title": "Parallel sessions",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many independent sessions run in parallel.",
            "default": 3
          },
          "maxRetries": {
            "title": "Max retries per term",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many fresh sessions to try per term before giving up (failed terms are not charged).",
            "default": 8
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Residential proxies give the highest success rate against Google's rate limits.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}