{
  "openapi": "3.0.1",
  "info": {
    "title": "Twitter Trends Scraper By City & Multiple Countries",
    "description": "Twitter Trends Scraper fetches real-time trending topics from X (Twitter), including trend names, ranks, tweet volume, and regional or global availability. Ideal for trend monitoring, audience insights, news tracking, research, and automating fast, structured trend data collection at scale.",
    "version": "0.1",
    "x-build-id": "mXHEcrlBvGVPgg2ah"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/simpleapi~getdaytrends-trending-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-simpleapi-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/simpleapi~getdaytrends-trending-scraper/runs": {
      "post": {
        "operationId": "runs-sync-simpleapi-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/simpleapi~getdaytrends-trending-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-simpleapi-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": {
          "locations": {
            "title": "📍 Locations to track (cities, countries, WOEIDs)",
            "type": "array",
            "description": "One run, many markets. Each entry may be a country code (US, GB, JP), a country name (Brazil), a city name or slug (New York, sao-paulo, London), \"City, CC\" to disambiguate (Birmingham, GB), a raw Yahoo WOEID (2459115), or worldwide. Every trend row is stamped with locationName, locationType, countryCode and woeid so multi-market results stay separable. Leave empty to fall back to the legacy single-country board below.",
            "items": {
              "type": "string"
            }
          },
          "maxTrendsPerLocation": {
            "title": "🔢 Trends per location",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Cap the number of trends kept per location, ranked 1 = highest. X publishes 50 per place. Example: 10 locations x 10 trends = 100 rows. Default 50.",
            "default": 50
          },
          "listAvailableLocations": {
            "title": "🗺️ List every available location instead of trends",
            "type": "boolean",
            "description": "Catalogue mode. Returns one row per place X supports (woeid, locationName, locationType, countryName, countryCode, parentWoeid) instead of trend rows — use it to discover the exact city names and WOEIDs to paste into Locations above. Default off.",
            "default": false
          },
          "catalogueTypeFilter": {
            "title": "🧭 Catalogue: which place types",
            "enum": [
              "all",
              "city",
              "country",
              "worldwide"
            ],
            "type": "string",
            "description": "Narrows catalogue mode. Only applies when the catalogue toggle above is on.",
            "default": "all"
          },
          "country": {
            "title": "🏳️ Legacy single country (getdaytrends board)",
            "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 original one-country-per-run input, kept so existing runs and schedules keep working. It drives the getdaytrends.com board together with the time toggles below. Prefer Locations above for anything multi-market.",
            "default": ""
          },
          "live": {
            "title": "🔴 Live board now",
            "type": "boolean",
            "description": "Scrape the current getdaytrends board for the legacy country above (or worldwide when it is empty).",
            "default": false
          },
          "hour1": {
            "title": "🕐 Rewind 1h",
            "type": "boolean",
            "description": "Legacy getdaytrends slice: the board as it stood 1 hour(s) ago (worldwide, or the Legacy country below).",
            "default": false
          },
          "hour2": {
            "title": "🕑 Rewind 2h",
            "type": "boolean",
            "description": "Legacy getdaytrends slice: the board as it stood 2 hour(s) ago (worldwide, or the Legacy country below).",
            "default": false
          },
          "hour3": {
            "title": "🕒 Rewind 3h",
            "type": "boolean",
            "description": "Legacy getdaytrends slice: the board as it stood 3 hour(s) ago (worldwide, or the Legacy country below).",
            "default": false
          },
          "hour4": {
            "title": "🕓 Rewind 4h",
            "type": "boolean",
            "description": "Legacy getdaytrends slice: the board as it stood 4 hour(s) ago (worldwide, or the Legacy country below).",
            "default": false
          },
          "hour5": {
            "title": "🕔 Rewind 5h",
            "type": "boolean",
            "description": "Legacy getdaytrends slice: the board as it stood 5 hour(s) ago (worldwide, or the Legacy country below).",
            "default": false
          },
          "hour6": {
            "title": "🕕 Rewind 6h",
            "type": "boolean",
            "description": "Legacy getdaytrends slice: the board as it stood 6 hour(s) ago (worldwide, or the Legacy country below).",
            "default": false
          },
          "hour7": {
            "title": "🕖 Rewind 7h",
            "type": "boolean",
            "description": "Legacy getdaytrends slice: the board as it stood 7 hour(s) ago (worldwide, or the Legacy country below).",
            "default": false
          },
          "hour8": {
            "title": "🕗 Rewind 8h",
            "type": "boolean",
            "description": "Legacy getdaytrends slice: the board as it stood 8 hour(s) ago (worldwide, or the Legacy country below).",
            "default": false
          },
          "hour9": {
            "title": "🕘 Rewind 9h",
            "type": "boolean",
            "description": "Legacy getdaytrends slice: the board as it stood 9 hour(s) ago (worldwide, or the Legacy country below).",
            "default": false
          },
          "hour10": {
            "title": "🕙 Rewind 10h",
            "type": "boolean",
            "description": "Legacy getdaytrends slice: the board as it stood 10 hour(s) ago (worldwide, or the Legacy country below).",
            "default": false
          },
          "hour11": {
            "title": "🕚 Rewind 11h",
            "type": "boolean",
            "description": "Legacy getdaytrends slice: the board as it stood 11 hour(s) ago (worldwide, or the Legacy country below).",
            "default": false
          },
          "hour12": {
            "title": "🕛 Rewind 12h",
            "type": "boolean",
            "description": "Legacy getdaytrends slice: the board as it stood 12 hour(s) ago (worldwide, or the Legacy country below).",
            "default": false
          },
          "hour13": {
            "title": "🕐 Rewind 13h",
            "type": "boolean",
            "description": "Legacy getdaytrends slice: the board as it stood 13 hour(s) ago (worldwide, or the Legacy country below).",
            "default": false
          },
          "hour14": {
            "title": "🕑 Rewind 14h",
            "type": "boolean",
            "description": "Legacy getdaytrends slice: the board as it stood 14 hour(s) ago (worldwide, or the Legacy country below).",
            "default": false
          },
          "hour15": {
            "title": "🕒 Rewind 15h",
            "type": "boolean",
            "description": "Legacy getdaytrends slice: the board as it stood 15 hour(s) ago (worldwide, or the Legacy country below).",
            "default": false
          },
          "hour16": {
            "title": "🕓 Rewind 16h",
            "type": "boolean",
            "description": "Legacy getdaytrends slice: the board as it stood 16 hour(s) ago (worldwide, or the Legacy country below).",
            "default": false
          },
          "hour17": {
            "title": "🕔 Rewind 17h",
            "type": "boolean",
            "description": "Legacy getdaytrends slice: the board as it stood 17 hour(s) ago (worldwide, or the Legacy country below).",
            "default": false
          },
          "hour18": {
            "title": "🕕 Rewind 18h",
            "type": "boolean",
            "description": "Legacy getdaytrends slice: the board as it stood 18 hour(s) ago (worldwide, or the Legacy country below).",
            "default": false
          },
          "hour19": {
            "title": "🕖 Rewind 19h",
            "type": "boolean",
            "description": "Legacy getdaytrends slice: the board as it stood 19 hour(s) ago (worldwide, or the Legacy country below).",
            "default": false
          },
          "hour20": {
            "title": "🕗 Rewind 20h",
            "type": "boolean",
            "description": "Legacy getdaytrends slice: the board as it stood 20 hour(s) ago (worldwide, or the Legacy country below).",
            "default": false
          },
          "hour21": {
            "title": "🕘 Rewind 21h",
            "type": "boolean",
            "description": "Legacy getdaytrends slice: the board as it stood 21 hour(s) ago (worldwide, or the Legacy country below).",
            "default": false
          },
          "hour22": {
            "title": "🕙 Rewind 22h",
            "type": "boolean",
            "description": "Legacy getdaytrends slice: the board as it stood 22 hour(s) ago (worldwide, or the Legacy country below).",
            "default": false
          },
          "hour23": {
            "title": "🕚 Rewind 23h",
            "type": "boolean",
            "description": "Legacy getdaytrends slice: the board as it stood 23 hour(s) ago (worldwide, or the Legacy country below).",
            "default": false
          },
          "yesterday": {
            "title": "🌙 Yesterday — archive offline",
            "type": "boolean",
            "description": "Accepted for backward compatibility, but getdaytrends' date-archive pages now answer HTTP 520 for every date, so no data exists behind this toggle. Enabling it emits an uncharged accounting row (errorReason=archive_endpoint_gone) rather than silently returning nothing.",
            "default": false
          },
          "day2": {
            "title": "♻️ Day 2 (alias of Yesterday) — archive offline",
            "type": "boolean",
            "description": "Accepted for backward compatibility, but getdaytrends' date-archive pages now answer HTTP 520 for every date, so no data exists behind this toggle. Enabling it emits an uncharged accounting row (errorReason=archive_endpoint_gone) rather than silently returning nothing.",
            "default": false
          },
          "day3": {
            "title": "📚 Two days ago — archive offline",
            "type": "boolean",
            "description": "Accepted for backward compatibility, but getdaytrends' date-archive pages now answer HTTP 520 for every date, so no data exists behind this toggle. Enabling it emits an uncharged accounting row (errorReason=archive_endpoint_gone) rather than silently returning nothing.",
            "default": false
          },
          "weekAgo": {
            "title": "📆 A week ago — archive offline",
            "type": "boolean",
            "description": "Accepted for backward compatibility, but getdaytrends' date-archive pages now answer HTTP 520 for every date, so no data exists behind this toggle. Enabling it emits an uncharged accounting row (errorReason=archive_endpoint_gone) rather than silently returning nothing.",
            "default": false
          },
          "monthAgo": {
            "title": "🗓️ A month ago — archive offline",
            "type": "boolean",
            "description": "Accepted for backward compatibility, but getdaytrends' date-archive pages now answer HTTP 520 for every date, so no data exists behind this toggle. Enabling it emits an uncharged accounting row (errorReason=archive_endpoint_gone) rather than silently returning nothing.",
            "default": false
          },
          "yearAgo": {
            "title": "🎉 A year ago — archive offline",
            "type": "boolean",
            "description": "Accepted for backward compatibility, but getdaytrends' date-archive pages now answer HTTP 520 for every date, so no data exists behind this toggle. Enabling it emits an uncharged accounting row (errorReason=archive_endpoint_gone) rather than silently returning nothing.",
            "default": false
          },
          "startUrls": {
            "title": "🔗 Extra getdaytrends URLs",
            "type": "array",
            "description": "Optional raw getdaytrends URLs to scrape in addition to everything above. Was read by the original code but never declared in its schema. Example: https://getdaytrends.com/japan/3/",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxRetries": {
            "title": "🔁 Retries per page",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retry attempts for a failed getdaytrends page fetch. Was read by the original code but never declared. Default 3.",
            "default": 3
          },
          "requestTimeoutSecs": {
            "title": "⏳ Request timeout (seconds)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Per-request timeout for both engines. Was read by the original code but never declared. Default 30.",
            "default": 30
          },
          "proxy": {
            "title": "🛡️ Proxy",
            "type": "object",
            "description": "Optional. Both the X guest-token engine and getdaytrends answer fine with no proxy from Apify; guest-token quota is handled by token rotation, not by IP rotation."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}