{
  "openapi": "3.0.1",
  "info": {
    "title": "Ultimate X (Twitter) Advanced Search Scraper",
    "description": "🚀 Scrape X (Twitter) Advanced Search without login — filter by keyword, hashtag, user, engagement, media, language & date range, and batch many searches at once. Export 55 fields including media, author stats & more. Fast API, pay per result.",
    "version": "1.0",
    "x-build-id": "LeBJf0ofWFEFQ8Sj2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/delicious_zebu~ultimate-x-twitter-advanced-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-delicious_zebu-ultimate-x-twitter-advanced-search-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/delicious_zebu~ultimate-x-twitter-advanced-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-delicious_zebu-ultimate-x-twitter-advanced-search-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/delicious_zebu~ultimate-x-twitter-advanced-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-delicious_zebu-ultimate-x-twitter-advanced-search-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",
        "required": [
          "splitMode",
          "language"
        ],
        "properties": {
          "searchTerms": {
            "title": "Search terms (one keyword/phrase per line)",
            "type": "array",
            "description": "Batch search — put one keyword or phrase per line. Each line runs as its own search and is automatically combined with the Advanced search fields below. You do NOT need operators like from: or min_faves: here — use the Advanced fields for that. Use Bulk edit to paste many at once. Max items applies to each search.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "X search URLs (one per line)",
            "type": "array",
            "description": "Paste search URLs from x.com (e.g. https://x.com/search?q=...). Each is scraped exactly as-is — including any operators, since/until dates and Top/Latest tab already in the URL. The Advanced fields, Filters, date range and sort below do NOT apply to URLs; only Max items does. A profile URL (x.com/handle) is auto-converted to from:handle. List and single-tweet URLs are not supported.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "All_of_these_words": {
            "title": "All of these words",
            "type": "string",
            "description": "Tweets must contain all of these words (space-separated).",
            "default": ""
          },
          "This_exact_phrase": {
            "title": "This exact phrase",
            "type": "string",
            "description": "Tweets must contain this exact phrase.",
            "default": ""
          },
          "Any_of_these_words": {
            "title": "Any of these words",
            "type": "string",
            "description": "Tweets containing any one of these words (space-separated) will match.",
            "default": ""
          },
          "None_of_these_words": {
            "title": "None of these words",
            "type": "string",
            "description": "Exclude tweets containing any of these words (space-separated).",
            "default": ""
          },
          "These_hashtags": {
            "title": "These hashtags",
            "type": "string",
            "description": "Hashtags without #, space-separated. Example: nasa spacex",
            "default": ""
          },
          "From_these_accounts": {
            "title": "From these accounts",
            "type": "string",
            "description": "Only tweets sent from these accounts. Space-separated handles without @. Example: elonmusk NASA",
            "default": ""
          },
          "To_these_accounts": {
            "title": "To these accounts",
            "type": "string",
            "description": "Only tweets sent as a reply to these accounts. Space-separated handles without @.",
            "default": ""
          },
          "Mentioning_these_accounts": {
            "title": "Mentioning these accounts",
            "type": "string",
            "description": "Only tweets mentioning these accounts. Space-separated handles without @.",
            "default": ""
          },
          "Minimum_replies": {
            "title": "Minimum replies",
            "minimum": 0,
            "type": "integer",
            "description": "Only include tweets with at least this many replies.",
            "default": 0
          },
          "Minimum_likes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Only include tweets with at least this many likes.",
            "default": 0
          },
          "Minimum_reposts": {
            "title": "Minimum reposts",
            "minimum": 0,
            "type": "integer",
            "description": "Only include tweets with at least this many reposts (retweets + quotes).",
            "default": 0
          },
          "startDate": {
            "title": "Start date (optional)",
            "type": "string",
            "description": "Optional start date (inclusive), format YYYY-MM-DD. Leave empty to search all time. Applies to Search terms and the Advanced search, not to Search URLs.",
            "default": ""
          },
          "endDate": {
            "title": "End date (optional)",
            "type": "string",
            "description": "Optional end date (inclusive), format YYYY-MM-DD. Leave empty to search up to now.",
            "default": ""
          },
          "splitMode": {
            "title": "Split mode",
            "enum": [
              "day",
              "week",
              "month"
            ],
            "type": "string",
            "description": "How to split the date range into segments. 'day' is the most thorough (recommended for complete collection); 'week'/'month' are faster for large ranges.",
            "default": "day"
          },
          "sortBy": {
            "title": "Sort by (Top / Latest)",
            "enum": [
              "Top",
              "Latest"
            ],
            "type": "string",
            "description": "'Top' returns the tweets X ranks as most relevant (default — its results are stable, so they're easy to verify against the website). 'Latest' returns the full chronological timeline (more complete, but the newest-first order keeps changing). For Search URLs, the tab in the URL (f=top/f=live) is used instead.",
            "default": "Top"
          },
          "maxItems": {
            "title": "Max items (per search)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of tweets to collect for EACH search (each Search term, each URL, or the Advanced search). 0 means unlimited.",
            "default": 80
          },
          "language": {
            "title": "Language",
            "enum": [
              "any",
              "ar",
              "ar-x-fm",
              "bn",
              "eu",
              "bg",
              "ca",
              "hr",
              "cs",
              "da",
              "nl",
              "en",
              "fi",
              "fr",
              "de",
              "el",
              "gu",
              "he",
              "hi",
              "hu",
              "id",
              "it",
              "ja",
              "kn",
              "ko",
              "mr",
              "no",
              "fa",
              "pl",
              "pt",
              "ro",
              "ru",
              "sr",
              "zh-cn",
              "sk",
              "es",
              "sv",
              "ta",
              "th",
              "zh-tw",
              "tr",
              "uk",
              "ur",
              "vi"
            ],
            "type": "string",
            "description": "Only tweets in this language. Use 'any' to disable. Applies to Search terms and the Advanced search (not to Search URLs).",
            "default": "any"
          },
          "mediaType": {
            "title": "Media type",
            "enum": [
              "any",
              "images",
              "videos",
              "media"
            ],
            "type": "string",
            "description": "Only tweets containing this media type. 'images' = photos only, 'videos' = videos only, 'media' = any image or video, 'any' = no media filter.",
            "default": "any"
          },
          "onlyVerified": {
            "title": "Only verified accounts",
            "type": "boolean",
            "description": "Only include tweets from verified accounts.",
            "default": false
          },
          "excludeReplies": {
            "title": "Exclude replies",
            "type": "boolean",
            "description": "Exclude reply tweets, keeping only standalone posts.",
            "default": false
          },
          "geoNear": {
            "title": "Near this place",
            "type": "string",
            "description": "Only tweets sent near this place. Example: London or \"New York\". Leave empty to disable.",
            "default": ""
          },
          "geoWithin": {
            "title": "Within radius",
            "type": "string",
            "description": "Radius around 'Near this place', e.g. 15mi or 10km. Only used together with 'Near this place'.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}