{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper - Trending Searches & Keyword API",
    "description": "Fast Google Trends Scraper & Real-Time Trending Searches API. Extract interest over time, regional breakdown, breakout queries, and real-time trending searches across 125 countries. No residential proxy needed; works with Apify MCP, n8n & Make.",
    "version": "1.0",
    "x-build-id": "X4kBfY8PM8YJwxebW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/church_of_loujess~google-trends-fast-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-church_of_loujess-google-trends-fast-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/church_of_loujess~google-trends-fast-scraper/runs": {
      "post": {
        "operationId": "runs-sync-church_of_loujess-google-trends-fast-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/church_of_loujess~google-trends-fast-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-church_of_loujess-google-trends-fast-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "trending",
              "keyword"
            ],
            "type": "string",
            "description": "Select 'trending' for real-time Trending Searches by country, or 'keyword' for Keyword Analysis (interest over time, momentum score, related queries, and regional breakdown).",
            "default": "trending"
          },
          "keyword": {
            "title": "Search Term (Single Keyword)",
            "type": "string",
            "description": "The keyword to analyze in Google Trends when mode = 'keyword' (e.g., 'bitcoin', 'AI agents').",
            "default": "bitcoin"
          },
          "keywords": {
            "title": "Batch Search Terms (Optional Multiple Keywords)",
            "type": "array",
            "description": "Optional list of multiple keywords to analyze in a single run when mode = 'keyword'.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "predefinedTimeframe": {
            "title": "Time Period",
            "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 time period for the keyword analysis.",
            "default": "today 12-m"
          },
          "geo": {
            "title": "Country Code (Keyword Analysis)",
            "type": "string",
            "description": "ISO 2-letter country code for keyword trends (e.g., 'US', 'GB', 'DE', 'CA', 'AU'). Leave empty for Worldwide data.",
            "default": ""
          },
          "fetchRegionalData": {
            "title": "Fetch Regional Breakdown",
            "type": "boolean",
            "description": "Enable to retrieve interest by subregion/country alongside timeline data.",
            "default": false
          },
          "trendingSearchesCountry": {
            "title": "Country for Trending Searches",
            "type": "string",
            "description": "ISO 2-letter country code for real-time trending searches (e.g., 'US', 'GB', 'DE', 'FR', 'CA', 'AU', 'IN', 'BR', 'JP').",
            "default": "US"
          },
          "trendingSearchesTimeframe": {
            "title": "Time Period for Trending Searches (Hours)",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Time window for trending searches: '4' (Past 4 hours), '24' (Past 24 hours), '48' (Past 48 hours), or '168' (Past 7 days).",
            "default": "24"
          },
          "trendingSearchesCategories": {
            "title": "Categories Filter (Optional)",
            "type": "array",
            "description": "Filter trending searches by category IDs (1=Autos, 2=Beauty, 3=Business, 4=Entertainment, 5=Food, 6=Games, 7=Health, 8=Hobbies, 9=Jobs, 10=Law, 13=Pets, 14=Politics, 15=Science, 16=Shopping, 17=Sports, 18=Technology, 19=Travel, 20=Climate).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "trendingSearchesMaxItems": {
            "title": "Max Trending Items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of trending search results to return (default 50, up to 500).",
            "default": 50
          },
          "enableTrendingSearches": {
            "title": "Legacy Trending Mode Toggle (API Backward Compatibility)",
            "type": "boolean",
            "description": "Optional legacy parameter for drop-in compatibility. If set to true, runs Trending Searches mode; if false, runs Keyword Analysis mode."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}