{
  "openapi": "3.0.1",
  "info": {
    "title": "Twitter Trends Scraper & Country List Per Trend",
    "description": "Twitter Trends Scraper helps you collect trending topics and hashtags from Twitter in real time. Extract trend names, tweet volume, locations, and related metadata for market research, brand monitoring, content planning, and social media analysis.",
    "version": "0.1",
    "x-build-id": "8H0q8QahQzAtSZQBc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/api-empire~Twitter-Trends-Scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-api-empire-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/api-empire~Twitter-Trends-Scraper/runs": {
      "post": {
        "operationId": "runs-sync-api-empire-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/api-empire~Twitter-Trends-Scraper/run-sync": {
      "post": {
        "operationId": "run-sync-api-empire-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": {
          "footprintMode": {
            "title": "🌐 Footprint depth",
            "enum": [
              "liveOnly",
              "liveAndRecent",
              "off"
            ],
            "type": "string",
            "description": "🔴 Live countries only = the countries the trend is trending in at this moment (fastest, most actionable). 🕰️ Live + previously trended = also returns the countries where it trended earlier, with the timestamp it last trended there. ⛔ Off = board only, no extra requests. Default: Live countries only.",
            "default": "liveOnly"
          },
          "maxTrendsToExpand": {
            "title": "🔢 How many trends to expand",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "⚙️ Caps how many board trends get a footprint lookup — this counts TRENDS (parents), not the location rows they produce, so the location rows are always additional. Each expanded trend costs one extra page request. Example: 10 → the top 10 board trends are expanded, the rest are still returned without a footprint. Set 0 to expand every trend on the board (50 extra requests). Default: 10.",
            "default": 10
          },
          "footprintTopN": {
            "title": "📋 Max locations per trend",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "🌍 Caps how many locations are returned per trend, in the site's own order (most relevant first). Observed range on real trends: 2–18 live countries and up to 34 previously-trended ones. Set 0 for no cap. Default: 25.",
            "default": 25
          },
          "emitFootprintRows": {
            "title": "🧬 Emit one row per trend × country",
            "type": "boolean",
            "description": "✅ On: each location also becomes its own flat row (type = footprintLocation, isChild = true) with parentTrend, its rank in that country, and its last-trended timestamp — ideal for pivoting or a spreadsheet. These child rows are also mirrored to a separate per-run dataset. ❌ Off: the footprint stays only as the nested alsoTrendingIn / recentlyTrendedIn arrays on the trend row. Default: on.",
            "default": true
          },
          "market": {
            "title": "📍 Starting 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": "🗺️ The trending board to read first. Leave on Worldwide to start from the global board. If you pass the legacy `country` key instead, it wins over this field, so existing input files keep working unchanged.",
            "default": ""
          },
          "boardWindows": {
            "title": "🕒 Board snapshots to read",
            "type": "array",
            "description": "⏱️ Which hourly snapshots of the board to scrape. Use \"live\" for the board as it stands now, or an hour number 1–23 for the board as it stood that many hours ago. Example: [\"live\", \"1\", \"6\"] → three boards, each fully footprinted. Legacy boolean keys (live, hour1 … hour23) still work and take priority when present. Default: [\"live\"].",
            "default": [
              "live"
            ],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "🔗 Custom start URLs",
            "type": "array",
            "description": "🧭 Scrape specific getdaytrends URLs directly. Supports the {today}, {yesterday} and {day3} placeholders. Example: https://getdaytrends.com/japan/3/",
            "items": {
              "type": "string"
            }
          },
          "maxRetries": {
            "title": "🔁 Retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "♻️ How many times to retry a failed page fetch before recording an uncharged error row with a typed reason. Default: 3.",
            "default": 3
          },
          "requestTimeoutSecs": {
            "title": "⏳ Request timeout (seconds)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "⌛ Per-request timeout in seconds. Default: 30.",
            "default": 30
          },
          "country": {
            "title": "🌍 Country (legacy key)",
            "type": "string",
            "description": "🧩 Backward-compatible alias for 'Starting market' above. Kept so input files written for the original scraper run unchanged. When both are set, this one wins. Leave empty to use the field above."
          },
          "proxy": {
            "title": "🛡️ Proxy configuration",
            "type": "object",
            "description": "🔌 Defaults to no proxy — getdaytrends serves Apify's datacenter IPs directly, so no proxy is needed or billed. If a configured proxy fails, 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}