{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trending Searches - Trending Now by Country & Alerts",
    "description": "What people are searching for on Google right now, per country or region: query, approximate searches, start time and the news stories behind each trend. Change tracking reports only new trends on scheduled runs. Trending-now only, no interest over time. Not affiliated with Google.",
    "version": "1.0",
    "x-build-id": "HEkAbSnpKrYYvZoN6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cedarfetch~google-trending-searches/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cedarfetch-google-trending-searches",
        "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/cedarfetch~google-trending-searches/runs": {
      "post": {
        "operationId": "runs-sync-cedarfetch-google-trending-searches",
        "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/cedarfetch~google-trending-searches/run-sync": {
      "post": {
        "operationId": "run-sync-cedarfetch-google-trending-searches",
        "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": [
          "geos"
        ],
        "properties": {
          "geos": {
            "title": "Countries or regions",
            "type": "array",
            "description": "One per line. ISO country codes (US United States, GB United Kingdom, CA Canada, AU Australia, IN India, DE Germany, FR France, ES Spain, IT Italy, NL Netherlands, BR Brazil, MX Mexico, JP Japan, KR South Korea, ...), country names (\"Germany\"), or sub-regions as ISO 3166-2 codes: US states (US-CA California, US-NY New York, US-TX Texas), UK nations (GB-ENG, GB-SCT, GB-WLS, GB-NIR), Canadian provinces (CA-ON), Australian states (AU-NSW), German states (DE-BY). The full list with names is in the README. Invalid codes are reported in the run summary and the rest still run.",
            "default": [
              "US"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxTrendsPerGeo": {
            "title": "Max trends per geo",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Deliver at most this many trends per geo. Google's trending feed holds the 10 most recently started trends, so 10 is the maximum.",
            "default": 10
          },
          "includeNews": {
            "title": "Include news stories",
            "type": "boolean",
            "description": "Add the news articles Google links to each trend (headline, URL, publisher, image; usually 1-3 per trend). Turn off for smaller rows.",
            "default": true
          },
          "language": {
            "title": "News language",
            "type": "string",
            "description": "Optional language code (hl) such as \"en\", \"de\" or \"pt-BR\". In tests it changed which news articles are attached, not which trends are listed. Leave empty for Google's default for the geo."
          },
          "sortBy": {
            "title": "Order",
            "enum": [
              "feed",
              "traffic"
            ],
            "type": "string",
            "description": "\"feed\": Google's order, the most recently started trend first. \"traffic\": highest approximate search volume first (ties keep feed order). Applied before \"Max trends per geo\".",
            "default": "feed"
          },
          "minApproxTraffic": {
            "title": "Minimum approximate searches",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only trends whose approximate search count is at least this number, for example 1000 keeps \"1000+\" and above and drops \"200+\" and \"500+\". 0 keeps everything.",
            "default": 0
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep trends that mention any of these words (case- and accent-insensitive, whole words; add * for a prefix, \"election*\"; phrases work). Words in Chinese, Japanese, Korean or Thai match anywhere in the text.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop trends that mention any of these words (same matching rules).",
            "items": {
              "type": "string"
            }
          },
          "keywordScope": {
            "title": "Match keywords in",
            "enum": [
              "query_and_news",
              "query"
            ],
            "type": "string",
            "description": "\"query_and_news\": the trending query and the headlines of its news stories. \"query\": the query only.",
            "default": "query_and_news"
          },
          "dedupeAcrossGeos": {
            "title": "One row per trend across geos",
            "type": "boolean",
            "description": "When the same query trends in several geos, deliver one row with the list of geos (each with its rank and traffic) instead of one row per geo. Useful for monitoring a market across countries.",
            "default": false
          },
          "trackChanges": {
            "title": "Track changes between runs",
            "type": "boolean",
            "description": "Compare with the previous run and label every row new, still_trending or dropped (left the feed), with firstSeenAt, lastSeenAt, peak traffic and how long it has been trending. The snapshot is kept in a named key-value store in your account, so it survives between runs. Schedule the Actor every 15-30 minutes for a trend alert feed.",
            "default": false
          },
          "changesOnly": {
            "title": "Output only new (and dropped) trends",
            "type": "boolean",
            "description": "Requires change tracking. Deliver (and pay for) only trends that are new since the previous run, plus dropped ones if \"Report dropped trends\" is on. The first tracked run labels every trend new.",
            "default": false
          },
          "includeDropped": {
            "title": "Report dropped trends",
            "type": "boolean",
            "description": "With change tracking: add a row for each trend that was in the previous run's feed and is not in this one (changeType \"dropped\"). The feed only holds the 10 most recent trends, so a drop usually means newer trends pushed it out, not that interest ended.",
            "default": true
          },
          "snapshotStoreName": {
            "title": "Snapshot store name",
            "type": "string",
            "description": "Name of the key-value store that holds the change-tracking snapshots (one small record per geo). Use a different name to run independent alert feeds on the same geos. Lowercase letters, digits and hyphens.",
            "default": "google-trending-searches-snapshots"
          },
          "maxRequests": {
            "title": "Max requests per run",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on requests to Google in one run, retries included (one request per geo when nothing goes wrong). Geos beyond the cap are reported as skipped.",
            "default": 100
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "How many feeds are fetched at the same time.",
            "default": 2
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 100,
            "maximum": 60000,
            "type": "integer",
            "description": "Pause after each request, with small random jitter. Minimum 100 ms.",
            "default": 500
          },
          "requestTimeoutSecs": {
            "title": "Request timeout",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Give up on a single request after this many seconds (it is then retried).",
            "default": 30
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 6,
            "type": "integer",
            "description": "Retries for rate-limit (429), server-error (5xx) and network failures, with jittered exponential backoff that honours Retry-After. If two geos in a row stay rate-limited, the run stops requesting the rest.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}