{
  "openapi": "3.0.1",
  "info": {
    "title": "Twitter Trends Scraper With Rank History & Staying Power",
    "description": "Track and analyze Twitter trends with the Twitter Trends Scraper. Extract trending hashtags, topics, tweet volumes, and timestamps from any location. Ideal for social media monitoring, market research, and content strategy. Fast, reliable, and scalable for global or local trend tracking.",
    "version": "0.1",
    "x-build-id": "9RIY6cVGIGvEwpNP3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapier~getdaytrends-trending-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapier-getdaytrends-trending-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/scrapier~getdaytrends-trending-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapier-getdaytrends-trending-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/scrapier~getdaytrends-trending-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapier-getdaytrends-trending-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": {
          "lookbackHours": {
            "title": "⏱️ Lookback window (hours)",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Trims BOTH the hourly rankHistory (max 8h, read from the board sparkline) and the staying-power timeline (max 25h). Example: lookbackHours=3 returns rankHistory with the 3 most recent hourly positions and measures hoursOnBoard over the last 3 hours only. Default is 8.",
            "default": 8
          },
          "movementFilter": {
            "title": "📈 Keep only trends that are…",
            "enum": [
              "all",
              "new",
              "rising",
              "falling",
              "steady"
            ],
            "type": "string",
            "description": "Filters rows on the derived movement value. rising = climbed the board vs 1 hour ago, falling = dropped, steady = same rank, new = the sparkline only begins within the last 2 hours. Default keeps every row.",
            "default": "all"
          },
          "minHoursOnBoard": {
            "title": "⏳ Minimum hours on the board",
            "minimum": 0,
            "maximum": 25,
            "type": "integer",
            "description": "Drops trends that have been trending for fewer than this many hours, measured across the snapshot timeline. Example: minHoursOnBoard=4 keeps durable stories and removes one-hour spikes. 0 disables the filter. Needs the staying-power timeline enabled.",
            "default": 0
          },
          "includeStayingPower": {
            "title": "🧬 Compute staying-power metrics",
            "type": "boolean",
            "description": "Adds one extra request per run to build the snapshot timeline, which fills hoursOnBoard, firstSeenUtc, lastSeenUtc, bestRankInWindow, snapshotsObserved and isNewInWindow. Turn OFF for the fastest board-only run. Default is ON.",
            "default": true
          },
          "market": {
            "title": "🌍 Trending board market",
            "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": "Country whose Twitter/X trending board is scraped. Worldwide reads the global board. The legacy base key `country` is still accepted and takes precedence when supplied.",
            "default": ""
          },
          "boardPanels": {
            "title": "📋 Rows to return",
            "enum": [
              "board-and-panels",
              "board-only"
            ],
            "type": "string",
            "description": "board-only returns just the clean 50-row trending board. board-and-panels also returns the two sidebar panels (top by score, longest trending), each row labelled with sourcePanel. Default matches the base actor's row set.",
            "default": "board-and-panels"
          },
          "maxTrendsPerRun": {
            "title": "🔢 Max rows per run",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on charged result rows. Example: maxTrendsPerRun=20 stops after 20 rows. 0 means no cap. Default is 0.",
            "default": 0
          },
          "live": {
            "title": "🔴 Scrape the live board",
            "type": "boolean",
            "description": "Reads the current live trending board. Enabled by default, and also enabled automatically when no hourly slice is selected.",
            "default": true
          },
          "hourSlices": {
            "title": "🕐 Extra hourly slices",
            "type": "array",
            "description": "Additional past-hour boards to scrape, as hour numbers 1-23. Example: [\"1\",\"6\",\"12\"] adds the 1-, 6- and 12-hours-ago boards. The base's individual hour1 … hour23 booleans are still accepted and merged in.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "🔗 Custom board URLs",
            "type": "array",
            "description": "Optional explicit getdaytrends board URLs to scrape in addition to the selections above.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "requestTimeoutSecs": {
            "title": "⏲️ Request timeout (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Per-request timeout in seconds. Default is 30.",
            "default": 30
          },
          "maxRetries": {
            "title": "🔁 Max retries per URL",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries on a transient network error or non-200 status. Deterministic upstream failures (520 / 404 / 410) are not retried. Default is 3.",
            "default": 3
          },
          "proxy": {
            "title": "🛡️ Proxy configuration",
            "type": "object",
            "description": "Both source sites respond without a proxy from Apify, so no proxy is the default. If a selected proxy fails its preflight check, the actor falls back to Apify RESIDENTIAL."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}