{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper 💎",
    "description": "Fastest and Cheapest Google Trends Scraper: All in one, 🔥real time trending searches, interest over time, interest by region, and Related queries and topics, and more",
    "version": "0.1",
    "x-build-id": "a38fxkQjygGEXShQY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scraperpro~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scraperpro-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/scraperpro~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scraperpro-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/scraperpro~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scraperpro-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",
        "properties": {
          "scrape_type": {
            "title": "Scrape Type",
            "enum": [
              "trending_now",
              "interest_over_time",
              "interest_by_region",
              "related_queries",
              "related_topics",
              "trending_searches"
            ],
            "type": "string",
            "description": "Select the type of data to retrieve. 'Trending now' ignores keywords.",
            "default": "trending_now"
          },
          "keywords": {
            "title": "Search Terms / Keywords",
            "type": "array",
            "description": "Enter the terms you want to analyze. REQUIRED for all types EXCEPT 'Trending now'.",
            "items": {
              "type": "string"
            }
          },
          "gprop": {
            "title": "Google Property (Filter)",
            "enum": [
              "web",
              "images",
              "news",
              "froogle",
              "youtube"
            ],
            "type": "string",
            "description": "Filter results by specific Google properties (e.g., specific to YouTube searches).",
            "default": "web"
          },
          "timeframe_type": {
            "title": "Timeframe Selection",
            "enum": [
              "predefined",
              "custom"
            ],
            "type": "string",
            "description": "Choose between a predefined range (easier) or a custom specific 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": "Select a standard time window.",
            "default": "today 12-m"
          },
          "custom_timeframe": {
            "title": "Custom Timeframe (Advanced)",
            "type": "string",
            "description": "Format: 'YYYY-MM-DD YYYY-MM-DD'. Example: '2023-01-01 2023-12-31'. Leave empty if using Predefined."
          },
          "geo_selection_type": {
            "title": "Location Selection",
            "enum": [
              "Common Countries",
              "Custom Geo Code"
            ],
            "type": "string",
            "description": "Choose how to specify the location.",
            "default": "Common Countries"
          },
          "common_geo": {
            "title": "Country",
            "type": "string",
            "description": "Select the country code.",
            "default": "US"
          },
          "custom_geo_code": {
            "title": "Custom Geo Code (Region/City)",
            "type": "string",
            "description": "Specific code like 'US-NY' (New York) or 'US-CA' (California).",
            "default": ""
          },
          "geo_resolution": {
            "title": "Geographic Resolution",
            "enum": [
              "COUNTRY",
              "REGION",
              "DMA",
              "CITY"
            ],
            "type": "string",
            "description": "Level of detail for 'Interest by region'.",
            "default": "COUNTRY"
          },
          "inc_low_vol": {
            "title": "Include Low Volume Regions",
            "type": "boolean",
            "description": "Get data even for regions with low search volume (slower).",
            "default": false
          },
          "trending_language": {
            "title": "Trending Language",
            "type": "string",
            "description": "Language for 'Trending now' scrape type.",
            "default": "en"
          },
          "trending_hours": {
            "title": "Trending Hours",
            "minimum": 1,
            "maximum": 191,
            "type": "integer",
            "description": "Hours back for 'Trending now' (Max 191).",
            "default": 24
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Crucial for avoiding Google blocks. Use Apify Proxy (Residential) for best results."
          },
          "max_events": {
            "title": "Maximum events",
            "type": "integer",
            "description": "Internal limit for backward compatibility",
            "default": 10000
          },
          "acknowledge_costs": {
            "title": "Acknowledge costs",
            "type": "boolean",
            "description": "Internal flag for backward compatibility",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}