{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper — Reliable, With Rising Queries",
    "description": "Google Trends interest over time, interest by country, region and city, related queries and topics (top and rising) for up to 5 compared terms. Every run reports a clear status per term and only charges for rows with data.",
    "version": "0.1",
    "x-build-id": "fNEhuUABl9P2C54TV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dottti~google-trends-reliable/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dottti-google-trends-reliable",
        "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/dottti~google-trends-reliable/runs": {
      "post": {
        "operationId": "runs-sync-dottti-google-trends-reliable",
        "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/dottti~google-trends-reliable/run-sync": {
      "post": {
        "operationId": "run-sync-dottti-google-trends-reliable",
        "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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Words or phrases to look up. Each term gets its own row with every section you select. Any language works, for example Arabic.",
            "default": [
              "coffee"
            ],
            "items": {
              "type": "string"
            }
          },
          "compareTerms": {
            "title": "Compare terms on one scale",
            "type": "boolean",
            "description": "On: terms are compared in groups of up to 5, like the Compare button on Google Trends. All terms in a group share one 0-100 scale. Off: each term is fetched alone on its own scale.",
            "default": false
          },
          "startUrls": {
            "title": "Google Trends URLs (optional)",
            "type": "array",
            "description": "Paste explore URLs from trends.google.com. Terms, country, date range, category and search type are read from the URL.",
            "items": {
              "type": "string"
            }
          },
          "timeRange": {
            "title": "Time range",
            "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": "Same choices as the Google Trends date picker.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom date range (optional)",
            "type": "string",
            "description": "Overrides the time range. Format: YYYY-MM-DD YYYY-MM-DD, for example 2025-01-01 2025-06-30."
          },
          "geo": {
            "title": "Country or region",
            "type": "string",
            "description": "Leave empty for worldwide. Use a 2-letter country code (US, SA, AE, GB) or a region code (US-CA, SA-01).",
            "default": ""
          },
          "category": {
            "title": "Category ID",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category number. 0 means all categories. Examples: 7 Finance, 45 Health, 71 Food and Drink, 958 Jobs and Education, 5 Computers and Electronics.",
            "default": 0
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "web",
              "news",
              "images",
              "youtube",
              "shopping"
            ],
            "type": "string",
            "description": "Which Google search the data comes from.",
            "default": "web"
          },
          "includeInterestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "The 0-100 time series.",
            "default": true
          },
          "includeInterestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Countries for worldwide searches, sub-regions for a country.",
            "default": true
          },
          "includeRelatedQueries": {
            "title": "Related queries (top and rising)",
            "type": "boolean",
            "description": "Rising lists include a breakout flag.",
            "default": true
          },
          "includeRelatedTopics": {
            "title": "Related topics (top and rising)",
            "type": "boolean",
            "description": "Off by default. In our tests Google returned this list empty for automated requests, and it is never offered when comparing terms. If empty, sectionStatus says so and nothing extra is charged.",
            "default": false
          },
          "includeSummary": {
            "title": "Summary fields",
            "type": "boolean",
            "description": "Peak date, average, last 30 days versus the 30 days before, and breakout flags. Plain arithmetic on the returned series.",
            "default": true
          },
          "regionResolutions": {
            "title": "Region levels",
            "type": "array",
            "description": "auto = Google's default (countries for worldwide, sub-regions for a country). Add CITY for cities, REGION for sub-regions, COUNTRY for countries, DMA for US metro areas. Each extra level is one more request.",
            "default": [
              "auto"
            ],
            "items": {
              "type": "string"
            }
          },
          "includeLowVolumeRegions": {
            "title": "Include low search volume regions",
            "type": "boolean",
            "description": "Same as the checkbox on Google Trends.",
            "default": false
          },
          "trendingNowGeos": {
            "title": "Trending now: countries (optional)",
            "type": "array",
            "description": "2-letter country codes. Adds the current Trending Now searches for each country, with approximate traffic and news links.",
            "items": {
              "type": "string"
            }
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "perTerm",
              "flat"
            ],
            "type": "string",
            "description": "perTerm: one row per search term with every section inside it. flat: one row per data point (one date, one region, one query), easier for spreadsheets but many more rows, and every row is charged.",
            "default": "perTerm"
          },
          "language": {
            "title": "Interface language",
            "type": "string",
            "description": "Language for region and topic names, for example en-US or ar.",
            "default": "en-US"
          },
          "proxyConfiguration": {
            "title": "Proxy (optional)",
            "type": "object",
            "description": "Leave off to use the automatic fallback below. If you set a proxy here, it is used for every request and the fallback is disabled."
          },
          "autoProxyFallback": {
            "title": "Automatic proxy fallback",
            "type": "boolean",
            "description": "Starts without a proxy. If Google keeps answering 429, switches to Apify datacenter proxy, then residential.",
            "default": true
          },
          "allowResidentialFallback": {
            "title": "Allow residential proxy as the last step",
            "type": "boolean",
            "description": "Turn off to never use residential proxy.",
            "default": true
          },
          "requestDelayMs": {
            "title": "Pause between requests (ms)",
            "minimum": 1000,
            "maximum": 30000,
            "type": "integer",
            "description": "Google rate-limits fast callers. A random 0-1.5 s is added on top.",
            "default": 3500
          },
          "maxRetries": {
            "title": "Retries per request",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Retries with growing waits and fresh sessions before a section is marked failed.",
            "default": 6
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}