{
  "openapi": "3.0.1",
  "info": {
    "title": "Keyword Trends - Google Trends Scraper, $2.50/1k, 17s Runs",
    "description": "Keyword trends from Google Trends: interest over time, by region, related queries and topics, many keywords on one scale. $2.50 per 1000 results, no start fee, typical run 17 s. Same input and output as apify/google-trends-scraper. Failed keywords are never charged.",
    "version": "0.1",
    "x-build-id": "UBoHXR9kp5rc4cFPk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/martin10291~google-trends-explorer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-martin10291-google-trends-explorer",
        "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/martin10291~google-trends-explorer/runs": {
      "post": {
        "operationId": "runs-sync-martin10291-google-trends-explorer",
        "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/martin10291~google-trends-explorer/run-sync": {
      "post": {
        "operationId": "run-sync-martin10291-google-trends-explorer",
        "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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search terms to analyze, one per line. Any number of keywords; they can also be compared on one common scale.",
            "items": {
              "type": "string"
            }
          },
          "geos": {
            "title": "Locations",
            "type": "array",
            "description": "Country or region codes such as US, GB, DE or US-CA. Leave empty for worldwide. Each keyword is analyzed for every location.",
            "items": {
              "type": "string"
            }
          },
          "timeframe": {
            "title": "Time range",
            "enum": [
              "past_hour",
              "past_4_hours",
              "past_day",
              "past_7_days",
              "past_30_days",
              "past_90_days",
              "past_12_months",
              "past_5_years",
              "since_2004"
            ],
            "type": "string",
            "description": "Period to analyze.",
            "default": "past_12_months"
          },
          "customTimeframe": {
            "title": "Custom time range (optional)",
            "type": "string",
            "description": "Overrides the time range. Format: YYYY-MM-DD YYYY-MM-DD, e.g. 2024-01-01 2024-12-31."
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "web",
              "images",
              "news",
              "youtube",
              "shopping"
            ],
            "type": "string",
            "description": "Which Google search to analyze.",
            "default": "web"
          },
          "category": {
            "title": "Category ID",
            "type": "string",
            "description": "Google Trends category ID as text, e.g. 7 for Finance. 0 or empty = all categories. Numbers are accepted by the code, the field itself is text so it matches apify/google-trends-scraper.",
            "default": "0"
          },
          "includeRegions": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Add interest by country, region or city.",
            "default": true
          },
          "regionResolution": {
            "title": "Region level",
            "enum": [
              "auto",
              "COUNTRY",
              "REGION",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "Detail of the regional breakdown. Auto uses countries for worldwide and regions for a country.",
            "default": "auto"
          },
          "includeRelated": {
            "title": "Related queries and topics",
            "type": "boolean",
            "description": "Add top and rising related queries and topics.",
            "default": true
          },
          "maxRelatedItems": {
            "title": "Max related items",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many related queries and topics to keep in each list.",
            "default": 25
          },
          "compareKeywords": {
            "title": "Compare keywords on one scale",
            "type": "boolean",
            "description": "Adds comparedInterest (0-100) so all keywords are comparable, even more than Google's limit of 5.",
            "default": true
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Interface language for names of regions and topics, e.g. en-US, de, es.",
            "default": "en-US"
          },
          "maxItems": {
            "title": "Max keyword reports",
            "minimum": 0,
            "type": "integer",
            "description": "Hard limit on rows saved (and paid for). 0 = no limit.",
            "default": 500
          },
          "maxConcurrency": {
            "title": "Parallel keywords",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Keywords processed at the same time (capped at 5 to be gentle on Google; higher values from apify/google-trends-scraper inputs are accepted and capped). Lower is more reliable.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy is recommended.",
            "default": {
              "useApifyProxy": true
            }
          },
          "residentialFallback": {
            "title": "Retry blocked requests via residential proxy",
            "type": "boolean",
            "description": "When Google rate-limits a request (HTTP 429), retry it through Apify residential proxy.",
            "default": true
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Same as 'Keywords': search terms to analyze, one per line. Use either field or both.",
            "items": {
              "type": "string"
            }
          },
          "isMultiple": {
            "title": "Multiple terms",
            "type": "boolean",
            "description": "If checked, a comma inside one search term separates up to 5 terms that are compared in one Google Trends query.",
            "default": false
          },
          "timeRange": {
            "title": "Time range (Google code)",
            "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": "Predefined time range as Google code. Empty = use 'Time range' above (past 12 months by default). Overridden by a custom time range.",
            "default": ""
          },
          "customTimeRange": {
            "title": "Custom time range",
            "type": "string",
            "description": "Custom range, takes precedence over the time range. Format: YYYY-MM-DD YYYY-MM-DD, e.g. 2024-01-01 2024-12-31."
          },
          "geo": {
            "title": "Geo area",
            "type": "string",
            "description": "Single country or region code such as US, GB or US-CA. Empty = worldwide. Ignored when 'Locations' above is filled in, and overridden by the geo in a start URL."
          },
          "startUrls": {
            "title": "Google Trends URLs",
            "type": "array",
            "description": "Google Trends explore URLs copied from your browser. The search terms (q), location (geo), time range (date), category (cat) and search type (gprop) are read from each URL.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "viewedFrom": {
            "title": "Viewed from (country)",
            "type": "string",
            "description": "Two-letter country code used for the residential proxy fallback, e.g. US or DE. Empty = US."
          },
          "skipDebugScreen": {
            "title": "Skip debug screen",
            "type": "boolean",
            "description": "Accepted for compatibility. This Actor does not save page snapshots, so it has no effect.",
            "default": false
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many times a failed request is retried with a fresh session (1-10). Only successful reports are charged.",
            "default": 6
          },
          "pageLoadTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 1,
            "type": "integer",
            "description": "How long to wait for one Google response before retrying (15-60 seconds are used).",
            "default": 30
          },
          "spreadsheetId": {
            "title": "Google Sheet ID",
            "type": "string",
            "description": "Accepted for compatibility but not supported: it is ignored with a log warning. Put your terms into 'Search terms' instead."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}