{
  "openapi": "3.0.1",
  "info": {
    "title": "Twitter Trends Scraper",
    "description": "Twitter Trends Scraper extracts trending topics from Twitter worldwide or by region. Get trend names, tweet volumes, and links. Ideal for social listening, content strategy, and research. Export data in JSON, CSV, or Excel.",
    "version": "0.3",
    "x-build-id": "pCHgoIYrtlo2Qs25X"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scraper-engine~twitter-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scraper-engine-twitter-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/scraper-engine~twitter-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scraper-engine-twitter-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/scraper-engine~twitter-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scraper-engine-twitter-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": {
          "country": {
            "title": "🌍 Country",
            "enum": [
              "",
              "DZ",
              "AR",
              "AU",
              "AT",
              "BH",
              "BY",
              "BE",
              "BR",
              "CA",
              "CL",
              "CO",
              "DK",
              "DO",
              "EC",
              "EG",
              "FR",
              "DE",
              "GH",
              "GR",
              "GT",
              "IN",
              "ID",
              "IE",
              "IL",
              "IT",
              "JP",
              "JO",
              "KE",
              "KR",
              "KW",
              "LV",
              "LB",
              "MY",
              "MX",
              "NL",
              "NZ",
              "NG",
              "NO",
              "OM",
              "PK",
              "PA",
              "PE",
              "PH",
              "PL",
              "PT",
              "PR",
              "QA",
              "RU",
              "SA",
              "SG",
              "ZA",
              "ES",
              "SE",
              "CH",
              "TH",
              "TR",
              "UA",
              "AE",
              "GB",
              "US",
              "VE",
              "VN"
            ],
            "type": "string",
            "description": "Market to pull the Twitter/X trend board for. Leave empty for worldwide trends. All 62 codes below are verified live on the source; this actor scrapes ONE market per run.",
            "default": ""
          },
          "live": {
            "title": "🔴 Live now",
            "type": "boolean",
            "description": "Scrape the trend board as it stands right now (ranks 1-50). If no time slice at all is selected, this one is used.",
            "default": true
          },
          "includeTopPanels": {
            "title": "🏆 Also include the two side panels",
            "type": "boolean",
            "description": "The page carries two extra sidebar panels next to the 50-trend board: 'top by score' and 'longest trending' (10 rows each). Their trends repeat board trends with different meaning, so they are OFF by default. Turn on to add 20 labelled rows (sourcePanel = top_by_score / longest_trending) carrying panelDetail such as '564 score' or '14 hours'.",
            "default": false
          },
          "hour1": {
            "title": "🕐 1 hour ago",
            "type": "boolean",
            "description": "Scrape the trend board as it stood 1 hour ago."
          },
          "hour2": {
            "title": "🕑 2 hours ago",
            "type": "boolean",
            "description": "Scrape the trend board as it stood 2 hours ago."
          },
          "hour3": {
            "title": "🕒 3 hours ago",
            "type": "boolean",
            "description": "Scrape the trend board as it stood 3 hours ago."
          },
          "hour4": {
            "title": "🕓 4 hours ago",
            "type": "boolean",
            "description": "Scrape the trend board as it stood 4 hours ago."
          },
          "hour5": {
            "title": "🕔 5 hours ago",
            "type": "boolean",
            "description": "Scrape the trend board as it stood 5 hours ago."
          },
          "hour6": {
            "title": "🕕 6 hours ago",
            "type": "boolean",
            "description": "Scrape the trend board as it stood 6 hours ago."
          },
          "hour7": {
            "title": "🕖 7 hours ago",
            "type": "boolean",
            "description": "Scrape the trend board as it stood 7 hours ago."
          },
          "hour8": {
            "title": "🕗 8 hours ago",
            "type": "boolean",
            "description": "Scrape the trend board as it stood 8 hours ago."
          },
          "hour9": {
            "title": "🕘 9 hours ago",
            "type": "boolean",
            "description": "Scrape the trend board as it stood 9 hours ago."
          },
          "hour10": {
            "title": "🕙 10 hours ago",
            "type": "boolean",
            "description": "Scrape the trend board as it stood 10 hours ago."
          },
          "hour11": {
            "title": "🕚 11 hours ago",
            "type": "boolean",
            "description": "Scrape the trend board as it stood 11 hours ago."
          },
          "hour12": {
            "title": "🕛 12 hours ago",
            "type": "boolean",
            "description": "Scrape the trend board as it stood 12 hours ago."
          },
          "hour13": {
            "title": "🕐 13 hours ago",
            "type": "boolean",
            "description": "Scrape the trend board as it stood 13 hours ago."
          },
          "hour14": {
            "title": "🕑 14 hours ago",
            "type": "boolean",
            "description": "Scrape the trend board as it stood 14 hours ago."
          },
          "hour15": {
            "title": "🕒 15 hours ago",
            "type": "boolean",
            "description": "Scrape the trend board as it stood 15 hours ago."
          },
          "hour16": {
            "title": "🕓 16 hours ago",
            "type": "boolean",
            "description": "Scrape the trend board as it stood 16 hours ago."
          },
          "hour17": {
            "title": "🕔 17 hours ago",
            "type": "boolean",
            "description": "Scrape the trend board as it stood 17 hours ago."
          },
          "hour18": {
            "title": "🕕 18 hours ago",
            "type": "boolean",
            "description": "Scrape the trend board as it stood 18 hours ago."
          },
          "hour19": {
            "title": "🕖 19 hours ago",
            "type": "boolean",
            "description": "Scrape the trend board as it stood 19 hours ago."
          },
          "hour20": {
            "title": "🕗 20 hours ago",
            "type": "boolean",
            "description": "Scrape the trend board as it stood 20 hours ago."
          },
          "hour21": {
            "title": "🕘 21 hours ago",
            "type": "boolean",
            "description": "Scrape the trend board as it stood 21 hours ago."
          },
          "hour22": {
            "title": "🕙 22 hours ago",
            "type": "boolean",
            "description": "Scrape the trend board as it stood 22 hours ago."
          },
          "hour23": {
            "title": "🕚 23 hours ago",
            "type": "boolean",
            "description": "Scrape the trend board as it stood 23 hours ago."
          },
          "startUrls": {
            "title": "🔗 Extra getdaytrends URLs",
            "type": "array",
            "description": "Optional. Scrape additional getdaytrends country or hourly pages directly, on top of the toggles above. Rows from these are labelled timePeriod = 'Custom'. Example: https://getdaytrends.com/japan/5/",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxRetries": {
            "title": "🔁 Max retries per URL",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many times to retry a page that fails or comes back without a trend table, with exponential backoff. Default is 3.",
            "default": 3
          },
          "requestTimeoutSecs": {
            "title": "⏳ Request timeout (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Per-request HTTP timeout. Default is 30.",
            "default": 30
          },
          "proxy": {
            "title": "🛡️ Proxy configuration",
            "type": "object",
            "description": "Defaults to no proxy, which is what the source expects. If a selected proxy is unreachable the actor falls back to Apify RESIDENTIAL, then to a direct connection."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}