{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper & API",
    "description": "Google Trends scraper and API in bulk: interest over time, compare up to 5 keywords, daily trending searches, states, metros and cities, rising and Breakout queries. A pytrends alternative that handles 429 errors for you. You pay only for complete results, plus a tiny start fee.",
    "version": "0.2",
    "x-build-id": "McJSwZqBkmNCReWxF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/suslabs~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-suslabs-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/suslabs~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-suslabs-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/suslabs~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-suslabs-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": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "keywords",
              "compare",
              "trending",
              "autocomplete",
              "explore"
            ],
            "type": "string",
            "description": "<b>Keyword trends</b>: one report per keyword (its own 0–100 scale). <b>Compare keywords</b>: up to 5 keywords on one shared scale, like the Trends compare view; longer lists are split into groups of 5 and each complete group is one result event. <b>Daily trending searches</b>: today's trending searches per country (set Country below). <b>Topic suggestions</b>: Google's topic matches for each keyword. <b>Raw explore widgets</b>: Google's widget definitions for developers, without a result event; the platform startup fee still applies.",
            "default": "keywords"
          },
          "searchTerms": {
            "title": "Keywords or topics",
            "type": "array",
            "description": "One keyword per line, any number. You can also use Google topic IDs such as <code>/m/0k8z</code> for topic-level interest. Not needed for daily trending searches.",
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "Country or region",
            "type": "string",
            "description": "Country code (US, IN, GB), a region (US-CA) or a US metro code (US-NY-501). Country names like \"India\" or \"Deutschland\" also work. Leave empty for worldwide.",
            "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 12-m",
              "today 5-y",
              "all",
              ""
            ],
            "type": "string",
            "description": "Explore-based modes (keywords, compare, explore) only. Period to analyze. For exact dates, use Start date / End date below.",
            "default": "today 12-m"
          },
          "sections": {
            "title": "Data to collect",
            "type": "array",
            "description": "Keyword/compare reports only. Fewer panels reduce requests and can reduce infrastructure usage; the per-result price stays the same. Charged only when every selected panel is delivered; otherwise the report is free and marked partial. The first selected panel is fetched first.",
            "items": {
              "type": "string",
              "enum": [
                "interestOverTime",
                "interestByRegion",
                "relatedQueries"
              ],
              "enumTitles": [
                "Interest over time",
                "Interest by region",
                "Related queries (top and rising)"
              ]
            },
            "default": [
              "interestOverTime",
              "interestByRegion",
              "relatedQueries"
            ]
          },
          "geos": {
            "title": "Several countries or regions",
            "type": "array",
            "description": "Run every keyword (or comparison group) in each of these places, e.g. US, GB, IN. Overrides Country or region. Each place is a separate report and adds requests.",
            "items": {
              "type": "string"
            }
          },
          "regionResolution": {
            "title": "Region detail level",
            "enum": [
              "auto",
              "COUNTRY",
              "REGION",
              "DMA",
              "CITY"
            ],
            "type": "string",
            "description": "Keyword/compare reports only. Level of the Interest by region panel. Automatic = Google's default (countries for worldwide, states/provinces for a country). Metro (DMA) is available for the US. No extra requests.",
            "default": "auto"
          },
          "regionLevels": {
            "title": "Additional region levels",
            "type": "array",
            "description": "Keyword/compare reports only. Opt in to several region panels in the same report. Each additional level costs up to one extra widget request per attempt. Requires Interest by region. Availability varies by place.",
            "items": {
              "type": "string",
              "enum": [
                "COUNTRY",
                "REGION",
                "DMA",
                "CITY"
              ]
            },
            "default": []
          },
          "includeSeasonality": {
            "title": "Analyze monthly seasonality",
            "type": "boolean",
            "description": "Keyword/compare reports only. Compute a monthly profile from at least two observed years (for example Past 5 years). Shorter or incomplete histories return null with a reason. Adds no requests.",
            "default": false
          },
          "seasonalityLeadDays": {
            "title": "Seasonal publishing lead (days)",
            "minimum": 0,
            "maximum": 180,
            "type": "integer",
            "description": "With includeSeasonality. Days before the next heuristic peak month to suggest publishing. A planning aid, not a forecast.",
            "default": 30
          },
          "includeLowVolumeRegions": {
            "title": "Include low-volume regions",
            "type": "boolean",
            "description": "Keyword/compare reports only. Also return regions with little search volume, like the checkbox on the Trends website.",
            "default": false
          },
          "includeRegionsWithNoData": {
            "title": "Keep regions without data",
            "type": "boolean",
            "description": "Keyword/compare reports only. Keep regions Google marks as having no data (hasData: false). By default they are dropped and counted in regionsDroppedNoData.",
            "default": false
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "Explore-based modes (keywords, compare, explore) only. Exact start date (YYYY-MM-DD). Overrides Time range. End date defaults to today."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "Explore-based modes (keywords, compare, explore) only. Exact end date (YYYY-MM-DD). Requires Start date."
          },
          "customTimeRange": {
            "title": "Custom range (text)",
            "type": "string",
            "description": "Explore-based modes (keywords, compare, explore) only. Alternative to the date pickers: <code>YYYY-MM-DD YYYY-MM-DD</code>, hourly <code>YYYY-MM-DDTHH YYYY-MM-DDTHH</code> (last 7 days only), or shortcuts like <code>Q1 2025</code>, <code>90d</code>, <code>5y</code>."
          },
          "categoryName": {
            "title": "Category",
            "enum": [
              "All categories",
              "Arts & Entertainment",
              "Autos & Vehicles",
              "Beauty & Fitness",
              "Books & Literature",
              "Business & Industrial",
              "Computers & Electronics",
              "Finance",
              "Food & Drink",
              "Games",
              "Health",
              "Hobbies & Leisure",
              "Home & Garden",
              "Internet & Telecom",
              "Jobs & Education",
              "Law & Government",
              "News",
              "Online Communities",
              "People & Society",
              "Pets & Animals",
              "Real Estate",
              "Reference",
              "Science",
              "Shopping",
              "Sports",
              "Travel"
            ],
            "type": "string",
            "description": "Explore-based modes (keywords, compare, explore) only. Limit results to a Google Trends category, e.g. Finance or Travel. For a sub-category, use Category ID in Advanced."
          },
          "property": {
            "title": "Search type",
            "enum": [
              "",
              "images",
              "news",
              "froogle",
              "youtube"
            ],
            "type": "string",
            "description": "Explore-based modes (keywords, compare, explore) only. Which Google search to analyze.",
            "default": ""
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language for names in the results, e.g. en-US, de, ja.",
            "default": "en-US"
          },
          "tz": {
            "title": "Timezone offset (minutes)",
            "minimum": -840,
            "maximum": 840,
            "type": "integer",
            "description": "Explore-based modes (keywords, compare, explore) only. Shifts hourly and daily buckets. Google's convention: minutes behind UTC, so India (UTC+5:30) is -330 and New York (UTC-5) is 300.",
            "default": 0
          },
          "trendingSource": {
            "title": "Trending feed",
            "enum": [
              "rss",
              "full"
            ],
            "type": "string",
            "description": "Trending mode only. RSS returns a short current list with news and images. Full Trending Now adds hundreds of trends, growth, lifecycle and breakdown terms. Full feed tries direct access first and uses residential only after refusal.",
            "default": "rss"
          },
          "trendingHours": {
            "title": "Trending window (hours)",
            "minimum": 4,
            "maximum": 168,
            "type": "integer",
            "description": "Full feed only: 4, 24, 48 or 168 hours (other values are rounded up). This is a current rolling feed, not historical backfill.",
            "default": 24
          },
          "trendingCategories": {
            "title": "Trending category IDs",
            "type": "array",
            "description": "Full feed only. Filter using Google Trending Now IDs, for example [17] for Sports. These differ from Explore category IDs. Empty = all.",
            "default": []
          },
          "activeOnly": {
            "title": "Only active trends",
            "type": "boolean",
            "description": "Full feed only. Keep searches Google still marks as actively trending.",
            "default": false
          },
          "trendingStatus": {
            "title": "Trend activity",
            "enum": [
              "all",
              "active",
              "ended"
            ],
            "type": "string",
            "description": "Full feed only. Filter by activity; Only active trends also excludes ended searches.",
            "default": "all"
          },
          "trendingSort": {
            "title": "Sort trends",
            "enum": [
              "relevance",
              "volume",
              "newest",
              "alphabetical"
            ],
            "type": "string",
            "description": "Full feed only. Order the returned country feed before applying its item limit.",
            "default": "relevance"
          },
          "maxTrendsPerCountry": {
            "title": "Max trends per country",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Full feed only. Keep up to N matching trends from each country. 0 = all. Google sends a whole country feed; Max results prevents the next country request.",
            "default": 0
          },
          "minSearchVolume": {
            "title": "Minimum trending volume",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Full feed only. Minimum Google volume bucket lower bound. This is approximate volume, not an exact search count.",
            "default": 0
          },
          "trendingLanguage": {
            "title": "Trending feed language",
            "type": "string",
            "description": "Optional full feed language tag, for example en-US or de. Empty inherits Language.",
            "default": ""
          },
          "trendingConcurrency": {
            "title": "Parallel trending countries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Trending mode only. Countries requested simultaneously. A finite result or charge cap serializes country requests so a later country is not fetched unnecessarily.",
            "default": 1
          },
          "chainComparisons": {
            "title": "Compare all keywords through an anchor",
            "type": "boolean",
            "description": "Compare mode only. Link groups with one common anchor for an estimated shared scale. N terms use ceil((N-1)/4) groups; each successful underlying group is one comparison-result event. Adds a free normalized comparison with precision flags.",
            "default": false
          },
          "anchorTerm": {
            "title": "Anchor keyword",
            "type": "string",
            "description": "Chaining only. A searchTerms member common to each group. Empty uses the first keyword. Choose a term with measurable interest close to the other terms.",
            "default": ""
          },
          "bridgeRemeasurement": {
            "title": "Re-measure selected small keywords",
            "type": "boolean",
            "description": "Chaining only. Add preplanned groups comparing Bridge keyword with Keywords to re-measure. Each successful extra group is one comparison event. Use a weaker but measurable bridge to improve rounding precision.",
            "default": false
          },
          "bridgeTerm": {
            "title": "Bridge keyword",
            "type": "string",
            "description": "With bridgeRemeasurement. A non-anchor keyword already included in searchTerms. Its first measurement links the extra groups to the common scale.",
            "default": ""
          },
          "bridgeTerms": {
            "title": "Keywords to re-measure",
            "type": "array",
            "description": "With bridgeRemeasurement. Small members of searchTerms to compare against the bridge. Exclude the anchor and bridge. Four targets per additional group; all requests are planned before work begins.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "compareLocations": {
            "title": "Compare one keyword across places",
            "type": "boolean",
            "description": "Explore-based modes (keywords, compare, explore) only. Put one keyword in 2–5 places (from Several countries or regions) on one shared scale.",
            "default": false
          },
          "comparePeriods": {
            "title": "Compare one keyword across periods",
            "type": "boolean",
            "description": "Explore-based modes (keywords, compare, explore) only. Put one keyword in 2–5 equal-length periods (below) on one shared scale, e.g. this year vs last year.",
            "default": false
          },
          "periods": {
            "title": "Periods to compare",
            "type": "array",
            "description": "With comparePeriods. One period per line, all the same length: <code>2024-01-01 2024-03-31</code>.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Google Trends URLs",
            "type": "array",
            "description": "Explore-based modes (keywords, compare, explore) only. Paste explore URLs from trends.google.com. Keywords, country, dates, category and search type are read from each URL.",
            "items": {
              "type": "string"
            }
          },
          "advancedQueries": {
            "title": "Queries with individual settings",
            "type": "array",
            "description": "Keyword/compare modes only; incompatible with chaining and location/period comparisons. Optional list of {terms, geo, timeRange, property, category}. Each terms array contains 1–5 keywords sharing a scale. Overrides the shared settings per query. Normal report/group pricing and run limits apply.",
            "default": []
          },
          "spreadsheetId": {
            "title": "Google Sheet ID",
            "type": "string",
            "description": "Term-based modes only (keywords, compare, autocomplete, explore). Imports run on Apify. ID of a public Google Sheet. Keywords are read from the first column; the first row is treated as a header."
          },
          "urlsFromFile": {
            "title": "Keyword file URL",
            "type": "string",
            "description": "Term-based modes only (keywords, compare, autocomplete, explore). Imports run on Apify. Public HTTPS link to a .txt or .csv file; keywords are read from the first column."
          },
          "fileHasHeader": {
            "title": "File has a header row",
            "type": "boolean",
            "description": "With urlsFromFile. Skip the first row of the keyword file.",
            "default": false
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "nested",
              "flat",
              "apify-compatible"
            ],
            "type": "string",
            "description": "<b>Nested</b>: one row per keyword report (best for JSON/API). <b>Flat</b>: one row per data point, region and related query plus a report row (best for CSV/Excel). Extra flat rows are never charged.",
            "default": "nested"
          },
          "compactOutput": {
            "title": "Compact output (for AI agents)",
            "type": "boolean",
            "description": "Keep summary stats (average, peak, direction, top regions, breakouts) and drop the long arrays. Smaller and token-cheap.",
            "default": false
          },
          "excludeEmptyFields": {
            "title": "Omit empty fields",
            "type": "boolean",
            "description": "Remove null values and empty lists from results.",
            "default": false
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Stop after this many report tasks, comparison groups or trending items. Attempted failed/unchanged reports also use a slot. Extra flat rows are free and outside the cap. Stable sampling and daily estimates count as one task each but can use several events (N samples, or 1 + delivered windows). 0 = no limit.",
            "default": 0
          },
          "maxQueries": {
            "title": "Max reports to start",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only process the first N planned reports (keywords × places, groups, or trending countries). 0 = all.",
            "default": 0
          },
          "maxRegions": {
            "title": "Max regions per report",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Keyword/compare reports only. Keep only the top N regions. 0 = all.",
            "default": 0
          },
          "maxRelatedItems": {
            "title": "Max related queries per list",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Keyword/compare reports only. Keep only the first N top and rising queries. 0 = all.",
            "default": 0
          },
          "maxRunSeconds": {
            "title": "Run time budget (seconds)",
            "minimum": 0,
            "maximum": 86400,
            "type": "integer",
            "description": "Stop starting requests or new reports after this many seconds; active requests finish. 0 = no limit.",
            "default": 0
          },
          "separateDatasets": {
            "title": "Also save separate datasets per data type",
            "type": "boolean",
            "description": "Copy free timeline, region, related and trending rows to run-scoped unnamed datasets using aliases. Their IDs appear in the summary. They follow account retention for unnamed storages; no permanent global names are created.",
            "default": false
          },
          "monitorMode": {
            "title": "Remember results between runs",
            "type": "boolean",
            "description": "Compare successful results with a named monitor snapshot. NEW and UPDATED results use the normal event; UNCHANGED and EXPIRED rows are free. Schedule this input to monitor changes.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Required with monitoring, up to 100 characters. Use a different name per task (for example per schedule) so tests and production never share state."
          },
          "monitorSensitivity": {
            "title": "Sensitivity to monitoring changes",
            "enum": [
              "low",
              "normal",
              "high"
            ],
            "type": "string",
            "description": "Monitoring only. How big a move has to be before a keyword counts as UPDATED (charged) instead of UNCHANGED (free). Normal ignores moves up to the larger of 12 points or 15%; low 16 points/25%; high 3 points/5%, which also reports ordinary sampling noise. Newly completed periods always count. New rising/Breakout queries count after a second check (normal: at least 1 hour later).",
            "default": "normal"
          },
          "monitorRetentionHours": {
            "title": "Remember trends for hours",
            "minimum": 12,
            "maximum": 168,
            "type": "integer",
            "description": "Monitoring only. Snapshot entries unseen for this many hours expire when their query scope is next checked. Named storage persists under your Apify retention settings; run the monitor again to prune stale entries.",
            "default": 168
          },
          "resetMonitoringState": {
            "title": "Reset this monitor snapshot",
            "type": "boolean",
            "description": "Monitoring only. Treat the scopes in this run as new and overwrite their snapshots. Turn off after a single reset run. Does not delete an Apify store.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new results",
            "type": "boolean",
            "description": "Monitoring only. Suppress previously seen results, including updates. Only newly observed results are delivered and charged.",
            "default": false
          },
          "onlyChanges": {
            "title": "Only changed results",
            "type": "boolean",
            "description": "Monitoring only. Deliver NEW or UPDATED reports and free expiration notices; suppress unchanged reports.",
            "default": false
          },
          "cachedResultOnRefusal": {
            "title": "Use a recent saved result if blocked",
            "type": "boolean",
            "description": "Keyword/compare reports only. Save complete successful reports and, after an upstream refusal, deliver a recent verified snapshot marked CACHED with its age. Cached delivery is always free.",
            "default": false
          },
          "cacheName": {
            "title": "Saved-result collection name",
            "type": "string",
            "description": "Required with saved results, up to 100 characters. Separate from the monitor name; reuse it in later scheduled runs of the same task."
          },
          "cacheMaxAgeHours": {
            "title": "Maximum saved-result age (hours)",
            "minimum": 1,
            "maximum": 24,
            "type": "integer",
            "description": "Up to 24 hours. Short ranges enforce smaller limits: past hour 15 minutes, 4 hours 1 hour, day 6 hours, week 12 hours. Older results never replace a refusal.",
            "default": 24
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Google Trends rate-limits aggressively. Residential proxies (default) are strongly recommended.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "viewedFrom": {
            "title": "Proxy exit country",
            "type": "string",
            "description": "Country the requests come from (e.g. US). Independent of the country being analyzed. Setting it turns off \"Try a direct connection first\", so every request really leaves from this country."
          },
          "useProxy": {
            "title": "Use proxy",
            "type": "boolean",
            "description": "Turn off only for tiny tests. Without a proxy Google blocks quickly.",
            "default": true
          },
          "dailyResolution": {
            "title": "Daily estimates over long ranges",
            "type": "boolean",
            "description": "Opt-in for separate keyword timelines longer than 270 days. Fetches the normal coarse report plus N overlapping 240-day windows (21-day overlap): N+1 underlying reports, at least 3(N+1) HTTP requests for timeline-only and up to N+1 normal keyword-result charges per keyword. Daily windows have more points, so transfer cost need not follow the request-count multiplier. A year needs 2 windows plus baseline; 5 years about 9; 2004–present about 38 (up to 39 charges per keyword). Each usable fitted window is one normal event; failures are free. Full event budget reserved first. Returns dailySeries estimates on the coarse scale, possibly above 100. Requires timeline, no comparisons, sampling, monitors or cache.",
            "default": false
          },
          "sampleCount": {
            "title": "Independent samples per report",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "1 = normal. 2–5 repeat the whole keyword/comparison request on fresh rotating residential connections. Up to N times the requests and normal report/group event charges, one per individually complete sample. Failed or incomplete samples are free. Reserves the full N-event budget before work. Not combined with extra region levels, period comparison or direct-first.",
            "default": 1
          },
          "sampleAggregation": {
            "title": "Combine samples using",
            "enum": [
              "mean",
              "consensus"
            ],
            "type": "string",
            "description": "With sampleCount above 1. Mean averages measured numeric values; consensus chooses the most frequent value (first sample breaks ties). Both include point standard error and agreement. Related lists use the most frequent complete panel.",
            "default": "mean"
          },
          "directFirst": {
            "title": "Try a direct connection first",
            "type": "boolean",
            "description": "Each report first tries Apify's own connection (no proxy cost) and switches to rotating residential proxies if Google refuses. After 3 refusals in a row the run uses residential only. Measured on 5×20 keywords: median $0.17 vs $0.43 per 1,000 keywords, same delivery. Turned off automatically for sampling, a proxy exit country or custom proxies.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Parallel reports",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many reports run at the same time.",
            "default": 5
          },
          "maxRetries": {
            "title": "Retries per report",
            "minimum": 0,
            "maximum": 15,
            "type": "integer",
            "description": "Each retry uses a fresh IP address and cookie.",
            "default": 6
          },
          "retryCooldownSecs": {
            "title": "Cooldown before final retry pass (seconds)",
            "minimum": 0,
            "maximum": 300,
            "type": "integer",
            "description": "Rate-limited reports get one more try at the end of the run after this pause.",
            "default": 15
          },
          "circuitBreakerFailures": {
            "title": "Stop after N failures in a row",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop starting new reports after this many consecutive failures. 0 = never.",
            "default": 0
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout for each HTTP request.",
            "default": 30
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Pause before every request. Usually unnecessary; increases run time.",
            "default": 0
          },
          "rotateAfterRequests": {
            "title": "Rotate identity after N requests",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Start a fresh cookie and token after N data requests (minimum 2). 0 = off.",
            "default": 0
          },
          "categoryId": {
            "title": "Category ID",
            "minimum": 0,
            "type": "integer",
            "description": "Explore-based modes (keywords, compare, explore) only. Numeric Google Trends sub-category, for example 7 = Finance. API clients may also send category as an integer or numeric string. A named category takes precedence.",
            "default": 0
          },
          "failOnErrors": {
            "title": "Fail the run if any report fails",
            "type": "boolean",
            "description": "Useful for scheduled runs with alerts. Results and diagnostics are still saved.",
            "default": false
          },
          "saveDebugPages": {
            "title": "Save raw responses for debugging",
            "type": "boolean",
            "description": "Store redacted raw Google responses in the key-value store (DEBUG-*). No cookies or tokens are saved.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}