{
  "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.2",
    "x-build-id": "pBfacwM8QU41ccnsd"
  },
  "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": "Enter 1 keyword, or up to 5 keywords to compare. Autocomplete requires exactly 1. Trending Now ignores this field.",
            "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 runs once per country, except autocomplete, which is language-based and uses no country filter.",
            "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 by Analyze keywords and Advanced Explore. Trending Now and autocomplete ignore this setting.",
            "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": "Optional numeric Google Trends category. Keep 0 to search all categories.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Requests start directly and only fall back to the selected Apify Proxy when Google blocks them.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "jobs": {
            "title": "Advanced jobs",
            "type": "array",
            "description": "Optional operation-specific jobs. When this list is not empty, it replaces the simple fields above.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "operation",
                "geo"
              ],
              "properties": {
                "id": {
                  "title": "Job ID",
                  "type": "string",
                  "description": "Optional ID used to identify this job in OUTPUT.",
                  "editor": "textfield"
                },
                "operation": {
                  "title": "Operation",
                  "type": "string",
                  "description": "Data operation for this job.",
                  "editor": "select",
                  "enum": [
                    "analyze",
                    "trendingNow",
                    "autocomplete",
                    "explore"
                  ],
                  "enumTitles": [
                    "Analyze keywords",
                    "Trending Now",
                    "Find topics",
                    "Explore widgets"
                  ]
                },
                "keywords": {
                  "title": "Keywords",
                  "type": "array",
                  "description": "Up to 5 keywords. Trending Now ignores this list.",
                  "editor": "stringList",
                  "maxItems": 5,
                  "items": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "geo": {
                  "title": "Country",
                  "type": "string",
                  "description": "Two-letter ISO country code.",
                  "editor": "textfield",
                  "pattern": "^[A-Za-z]{2}$",
                  "default": "US"
                },
                "timeRange": {
                  "title": "Time range",
                  "type": "string",
                  "description": "Google Trends time range.",
                  "editor": "select",
                  "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"
                  ],
                  "enumTitles": [
                    "Past hour",
                    "Past 4 hours",
                    "Past day",
                    "Past 7 days",
                    "Past 30 days",
                    "Past 90 days",
                    "Past 12 months",
                    "Past 5 years",
                    "Since 2004"
                  ],
                  "default": "today 12-m"
                },
                "sections": {
                  "title": "Analyze data",
                  "type": "array",
                  "description": "Sections returned by Analyze. Empty means all sections.",
                  "editor": "select",
                  "items": {
                    "type": "string",
                    "enum": [
                      "interestOverTime",
                      "interestByRegion",
                      "relatedQueries",
                      "relatedTopics"
                    ],
                    "enumTitles": [
                      "Interest over time",
                      "Interest by region",
                      "Related queries",
                      "Related topics"
                    ]
                  }
                },
                "property": {
                  "title": "Google property",
                  "type": "string",
                  "description": "Search surface for Analyze and Explore.",
                  "editor": "select",
                  "enum": [
                    "web",
                    "images",
                    "news",
                    "youtube",
                    "shopping"
                  ],
                  "enumTitles": [
                    "Web Search",
                    "Image Search",
                    "News Search",
                    "YouTube Search",
                    "Google Shopping"
                  ],
                  "default": "web"
                },
                "resolution": {
                  "title": "Regional detail",
                  "type": "string",
                  "description": "Location detail for Interest by region.",
                  "editor": "select",
                  "enum": [
                    "country",
                    "region",
                    "city",
                    "dma"
                  ],
                  "enumTitles": [
                    "Country",
                    "Region",
                    "City",
                    "DMA"
                  ],
                  "default": "region"
                },
                "language": {
                  "title": "Language",
                  "type": "string",
                  "description": "Google Trends interface language.",
                  "editor": "select",
                  "enumSuggestedValues": [
                    "en-US",
                    "es-ES",
                    "en-GB",
                    "de-DE",
                    "fr-FR",
                    "it-IT",
                    "pt-BR",
                    "ja-JP",
                    "hi-IN"
                  ],
                  "enumTitles": [
                    "English (US)",
                    "Spanish (Spain)",
                    "English (UK)",
                    "German",
                    "French",
                    "Italian",
                    "Portuguese (Brazil)",
                    "Japanese",
                    "Hindi"
                  ],
                  "default": "en-US"
                },
                "category": {
                  "title": "Category ID",
                  "type": "integer",
                  "description": "0 searches all categories.",
                  "editor": "number",
                  "minimum": 0,
                  "default": 0
                },
                "timezone": {
                  "title": "Timezone offset",
                  "type": "integer",
                  "description": "Offset in minutes.",
                  "editor": "number",
                  "minimum": -840,
                  "maximum": 840,
                  "default": 0
                },
                "trendingHours": {
                  "title": "Trending period",
                  "type": "integer",
                  "description": "Allowed values: 4, 24, 48, or 168 hours.",
                  "editor": "number",
                  "minimum": 4,
                  "maximum": 168,
                  "default": 24
                }
              }
            },
            "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": "Store private response payloads in separate RAW-* key-value records. Raw payloads are not written to the paid Dataset.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}