{
  "openapi": "3.0.1",
  "info": {
    "title": "Give Me Trends: Extract Keywords & Trending Now",
    "description": "Compare keywords, discover related searches, track regional interest, and monitor Trending Now data from Google Trends.",
    "version": "0.1",
    "x-build-id": "W30cg9oQOo1qLVpa0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/abrahan_dev~give-me-trends/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-abrahan_dev-give-me-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/abrahan_dev~give-me-trends/runs": {
      "post": {
        "operationId": "runs-sync-abrahan_dev-give-me-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/abrahan_dev~give-me-trends/run-sync": {
      "post": {
        "operationId": "run-sync-abrahan_dev-give-me-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": {
          "operation": {
            "title": "What do you want to extract?",
            "enum": [
              "analyze",
              "trendingNow",
              "autocomplete",
              "explore"
            ],
            "type": "string",
            "description": "Analyze keywords, monitor Trending Now, find Google Trends topics, or retrieve advanced Explore widgets.",
            "default": "analyze"
          },
          "keywords": {
            "title": "Keywords",
            "minItems": 0,
            "maxItems": 5,
            "type": "array",
            "description": "Add one keyword for autocomplete or up to 5 keywords to compare. Trending Now ignores keywords and returns all current trends for each selected country.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "geos": {
            "title": "Countries",
            "minItems": 1,
            "maxItems": 50,
            "type": "array",
            "description": "Add ISO country codes such as US, ES, GB, DE, or FR. The Actor creates one result for every country.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            },
            "default": [
              "US"
            ]
          },
          "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": "Period used by keyword analysis and Explore.",
            "default": "today 12-m"
          },
          "interestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "Return normalized timeline values and keyword comparisons.",
            "default": true
          },
          "interestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Return relative keyword interest by geographic area.",
            "default": true
          },
          "relatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Return top and rising searches related to each keyword.",
            "default": true
          },
          "relatedTopics": {
            "title": "Related topics",
            "type": "boolean",
            "description": "Return top and rising topics related to each keyword.",
            "default": true
          },
          "property": {
            "title": "Google property",
            "enum": [
              "web",
              "images",
              "news",
              "youtube",
              "shopping"
            ],
            "type": "string",
            "description": "Google search surface used for keyword analysis.",
            "default": "web"
          },
          "resolution": {
            "title": "Regional detail",
            "enum": [
              "country",
              "region",
              "city",
              "dma"
            ],
            "type": "string",
            "description": "Geographic detail returned by Interest by region.",
            "default": "region"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language used by Google Trends, for example en-US or es-ES.",
            "default": "en-US"
          },
          "trendingWindow": {
            "title": "Trending Now period",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Lookback window used by Trending Now.",
            "default": "24"
          },
          "category": {
            "title": "Google Trends category ID",
            "minimum": 0,
            "type": "integer",
            "description": "Use 0 for all categories or enter a Google Trends numeric category ID.",
            "default": 0
          },
          "proxy": {
            "title": "Residential proxy fallback",
            "required": [
              "mode",
              "countryCode"
            ],
            "type": "object",
            "description": "Adaptive mode starts without proxy and switches to Apify Residential Proxy only when Google blocks the session.",
            "properties": {
              "mode": {
                "title": "Proxy mode",
                "type": "string",
                "description": "Choose when Residential Proxy should be used.",
                "editor": "select",
                "enum": [
                  "adaptive",
                  "always",
                  "direct"
                ],
                "enumTitles": [
                  "Adaptive fallback (recommended)",
                  "Always use Residential Proxy",
                  "Direct only"
                ],
                "default": "adaptive"
              },
              "countryCode": {
                "title": "Proxy country",
                "type": "string",
                "description": "Country used when Residential Proxy is activated.",
                "editor": "select",
                "enumSuggestedValues": [
                  "US",
                  "GB",
                  "ES",
                  "DE",
                  "FR",
                  "IT",
                  "CA",
                  "AU",
                  "BR",
                  "MX",
                  "IN",
                  "JP"
                ],
                "enumTitles": [
                  "United States",
                  "United Kingdom",
                  "Spain",
                  "Germany",
                  "France",
                  "Italy",
                  "Canada",
                  "Australia",
                  "Brazil",
                  "Mexico",
                  "India",
                  "Japan"
                ],
                "default": "US"
              }
            },
            "default": {
              "mode": "adaptive",
              "countryCode": "US"
            },
            "additionalProperties": false
          },
          "jobs": {
            "title": "Advanced jobs",
            "type": "array",
            "description": "Optional explicit jobs for API users. When provided, these jobs replace the simple fields above.",
            "items": {
              "type": "object"
            },
            "default": []
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 64,
            "type": "integer",
            "description": "Maximum active jobs. The Actor automatically reduces concurrency if Google slows down or blocks requests.",
            "default": 8
          },
          "includeRaw": {
            "title": "Include raw Google payloads",
            "type": "boolean",
            "description": "Include private response payloads for debugging and advanced processing.",
            "default": false
          },
          "timezone": {
            "title": "Timezone offset in minutes",
            "minimum": -840,
            "maximum": 840,
            "type": "integer",
            "description": "Google Trends timezone offset. Keep 0 unless your integration requires another offset.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}