{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper: Interest, Related Queries, Trending",
    "description": "Google Trends interest over time, by region, related queries and topics for keywords, links or a country; $2.70 per 1,000 rows. Trending now lists, 12+ keywords on one scale, monitoring mode that returns only changes. Input names of the Apify-made scraper accepted, free error rows.",
    "version": "0.1",
    "x-build-id": "zCGGTz9SW3h5RqBbI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/arcadium~google-trends/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-arcadium-google-trends",
        "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/arcadium~google-trends/runs": {
      "post": {
        "operationId": "runs-sync-arcadium-google-trends",
        "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/arcadium~google-trends/run-sync": {
      "post": {
        "operationId": "run-sync-arcadium-google-trends",
        "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": "Keywords to look up, one result row per keyword. Example: [\"electric car\", \"solar panels\"]. Leave empty if you use Trends links, a Google Sheet or Trending now.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Google Trends links",
            "type": "array",
            "description": "Links copied from trends.google.com/trends/explore. Keywords, location, period and category are read from the link and win over the fields below. Several keywords in one link (q=a,b) are compared on one shared scale. Example: https://trends.google.com/trends/explore?q=nike,adidas&geo=US&date=today+3-m",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "geo": {
            "title": "Location",
            "type": "string",
            "description": "Where to measure interest: a two-letter country code (US, GB, DE) or a region code (US-CA, GB-ENG). Empty means worldwide. Example: US",
            "default": ""
          },
          "timeRange": {
            "title": "Time range",
            "enum": [
              "",
              "now 1-H",
              "now 4-H",
              "now 1-d",
              "now 7-d",
              "today 1-m",
              "today 3-m",
              "today 5-y",
              "all"
            ],
            "type": "string",
            "description": "Period to measure. The default is the past 12 months. Short ranges give finer points: 'now 1-H' gives one point per minute, 'now 7-d' one per hour, 'today 12-m' one per week, 'all' one per month since 2004.",
            "default": ""
          },
          "customTimeRange": {
            "title": "Custom time range",
            "type": "string",
            "description": "Exact period as 'YYYY-MM-DD YYYY-MM-DD' (start, then end). Overrides Time range. Example: 2024-01-01 2024-12-31"
          },
          "category": {
            "title": "Category",
            "enum": [
              "",
              "3",
              "47",
              "44",
              "22",
              "12",
              "5",
              "7",
              "71",
              "8",
              "45",
              "65",
              "11",
              "13",
              "958",
              "19",
              "16",
              "299",
              "14",
              "66",
              "29",
              "533",
              "174",
              "18",
              "20",
              "67"
            ],
            "type": "string",
            "description": "Restrict to one Google Trends category, for example Finance or Travel. Empty means all categories.",
            "default": ""
          },
          "property": {
            "title": "Search type",
            "enum": [
              "",
              "images",
              "news",
              "youtube",
              "froogle"
            ],
            "type": "string",
            "description": "Which Google search to measure: web search (default), image, news, YouTube or shopping search.",
            "default": ""
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language of labels such as region names and date text, for example en-US or de-DE. It does not change the numbers.",
            "default": "en-US"
          },
          "compareKeywords": {
            "title": "Compare keywords on one scale",
            "type": "boolean",
            "description": "Off: every keyword has its own 0-100 scale (like the leader). On: all search terms share one scale, so 50 for one keyword is half as popular as a 100 for another. Up to 5 keywords are exact (one Google request); more than 5 are chained through an anchor keyword (see below).",
            "default": false
          },
          "anchorKeyword": {
            "title": "Anchor keyword (more than 5 compared keywords)",
            "type": "string",
            "description": "Only used when comparing more than 5 keywords. This keyword is repeated in every batch of 5 and links the batches to one scale. Pick one with steady, medium search volume that is in your list. Empty means the first keyword. Example: coffee"
          },
          "isMultiple": {
            "title": "Comma separates several terms",
            "type": "boolean",
            "description": "When on, a search term like 'nike, adidas' is split at commas and the parts are compared on one shared scale.",
            "default": false
          },
          "includeRelatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Adds the top and rising related search queries of every keyword (one extra request per keyword).",
            "default": true
          },
          "includeRelatedTopics": {
            "title": "Related topics",
            "type": "boolean",
            "description": "Adds the top and rising related topics of every keyword (one extra request per keyword). Often empty for rare keywords.",
            "default": true
          },
          "includeGeo": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Adds interest by country (worldwide search), by subregion or by city (country search). Turn off to save requests.",
            "default": true
          },
          "onlyChanges": {
            "title": "Only changes since the last run",
            "type": "boolean",
            "description": "Monitoring mode. The first run returns every keyword once as the baseline. Later runs return only keywords with a new rising query or a move of the latest value by at least the threshold below; unchanged keywords are not returned and not charged. Run it on a schedule.",
            "default": false
          },
          "changeThreshold": {
            "title": "Change threshold (index points)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "In only-changes mode: the latest weekly (or daily) value must move by at least this many index points (0-100 scale) since the last run to count as a change.",
            "default": 15
          },
          "stateName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of the saved state for only-changes mode. Use different names for different monitors, for example brands-us and brands-de. Letters, digits, - and _ only.",
            "default": "default"
          },
          "trendingGeos": {
            "title": "Trending now: countries",
            "type": "array",
            "description": "Country codes whose live 'Trending now' list you want, one row per trending search. Example: [\"US\", \"GB\"]. Leave empty to skip.",
            "items": {
              "type": "string"
            }
          },
          "trendingHours": {
            "title": "Trending now: window",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "How far back the Trending now list looks: 4, 24, 48 or 168 hours.",
            "default": "24"
          },
          "spreadsheetId": {
            "title": "Google Sheet ID",
            "type": "string",
            "description": "Optional. ID of a public Google Sheet (shared with 'Anyone with the link') whose first column lists search terms; row 1 is a header. Example: 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms"
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 0,
            "type": "integer",
            "description": "Stops after this many result rows. 0 means no limit.",
            "default": 0
          },
          "includeErrorRows": {
            "title": "Add a row for inputs that failed",
            "type": "boolean",
            "description": "Adds a free, machine-readable row (code and message) for every keyword or link that could not be read, so a failure is never silent. Codes: invalid_input, no_match, blocked, unavailable, filter_unsupported.",
            "default": true
          },
          "maxRetries": {
            "title": "Retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How often a request is retried, each time on a fresh connection, after Google answers too many requests. Higher is slower but fails less."
          },
          "proxyCountry": {
            "title": "Proxy country",
            "type": "string",
            "description": "Two-letter country of the connection used to ask Google, for example US or DE (default US). 'viewedFrom' is accepted too. The numbers do not depend on it."
          },
          "proxyConfiguration": {
            "title": "Proxy (advanced)",
            "type": "object",
            "description": "Leave empty. The actor picks the cheapest connection that works. Your own proxy URLs are used if you set them."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}