{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper",
    "description": "Extract Real-Time Trends, Historical Data, Regional Demand, and Related Queries. Native proxy rotation bypasses rate limits. Pay-per-result pricing.",
    "version": "2.6",
    "x-build-id": "HSaQE30bqPYE77PbN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scraperpro~google-trends-ppe/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scraperpro-google-trends-ppe",
        "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/scraperpro~google-trends-ppe/runs": {
      "post": {
        "operationId": "runs-sync-scraperpro-google-trends-ppe",
        "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/scraperpro~google-trends-ppe/run-sync": {
      "post": {
        "operationId": "run-sync-scraperpro-google-trends-ppe",
        "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": [
          "scrape_type"
        ],
        "properties": {
          "scrape_type": {
            "title": "Scrape Type",
            "enum": [
              "trending_now",
              "interest_over_time",
              "interest_by_region",
              "related_queries",
              "related_topics"
            ],
            "type": "string",
            "description": "What to retrieve from Google Trends.",
            "default": "trending_now"
          },
          "keywords": {
            "title": "Keywords",
            "maxItems": 5,
            "type": "array",
            "description": "Keywords to analyze (Max 5). Required for all types except 'trending_now'. For 'related_*', only the first keyword is used.",
            "default": [
              "Web scraping"
            ],
            "items": {
              "type": "string"
            }
          },
          "timeframe_type": {
            "title": "Timeframe Type",
            "enum": [
              "predefined",
              "custom"
            ],
            "type": "string",
            "description": "Use a predefined timeframe or a custom range.",
            "default": "predefined"
          },
          "predefined_timeframe": {
            "title": "Predefined Timeframe",
            "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": "Common timeframes used by Google Trends.",
            "default": "today 12-m"
          },
          "custom_timeframe": {
            "title": "Custom Timeframe",
            "type": "string",
            "description": "Custom date range (e.g., '2023-01-01 2023-06-30') or hourly."
          },
          "geo_selection_type": {
            "title": "Geographic Selection Type",
            "enum": [
              "Common Countries",
              "Custom Geo Code"
            ],
            "type": "string",
            "description": "Choose between a common country code or a custom geo code.",
            "default": "Common Countries"
          },
          "common_geo": {
            "title": "Common Country (2-letter code)",
            "type": "string",
            "description": "Two-letter country code like 'US', 'GB', 'DE'. Leave empty for global.",
            "default": "US"
          },
          "custom_geo_code": {
            "title": "Custom Geo Code",
            "type": "string",
            "description": "Specific geo code (e.g., 'US-CA' for California).",
            "default": ""
          },
          "gprop": {
            "title": "Search Property (gprop)",
            "enum": [
              "web",
              "images",
              "news",
              "shopping",
              "youtube"
            ],
            "type": "string",
            "description": "Filter by Google service.",
            "default": "web"
          },
          "geo_resolution": {
            "title": "Geographic Resolution (for interest_by_region)",
            "enum": [
              "COUNTRY",
              "REGION",
              "DMA",
              "CITY"
            ],
            "type": "string",
            "description": "Controls the level of geographic detail.",
            "default": "COUNTRY"
          },
          "inc_low_vol": {
            "title": "Include Low Volume Regions",
            "type": "boolean",
            "description": "Include regions with low search volume. (Warning: high event output).",
            "default": false
          },
          "trending_language": {
            "title": "Trending Now: Language",
            "type": "string",
            "description": "Language code for realtime trending (e.g., 'en', 'es').",
            "default": "en"
          },
          "trending_hours": {
            "title": "Trending Now: Hours",
            "minimum": 1,
            "maximum": 191,
            "type": "integer",
            "description": "Time window (1-191 hours) for realtime trending.",
            "default": 24
          },
          "max_events": {
            "title": "Maximum events to output",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Caps the number of items yielded. Default 100 costs ~$0.25. Limit to 10 for a $0.025 test run!",
            "default": 100
          },
          "acknowledge_costs": {
            "title": "Acknowledge High Volume Runs",
            "type": "boolean",
            "description": "Check this box if you plan to extract >1000 items ($2.40+) in a single run.",
            "default": false
          },
          "debug_mode": {
            "title": "Debug Mode",
            "type": "boolean",
            "description": "Enable verbose logging and save raw HTML/responses to Apify Key-Value Store on failure.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy (Residential) is used automatically inside the actor code. Leave default."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}