{
  "openapi": "3.0.1",
  "info": {
    "title": "X (Twitter) Scraper: Tweets, Profiles & Data, No API Key",
    "description": "Scrape X (Twitter) tweets, profiles and posts by handle, tweet ID or URL. No API key or login. Get full text, likes, retweets, replies, quotes, bookmarks, views, media, hashtags, mentions and author data. Filter by date, language, media and engagement. Export to JSON, CSV or Excel.",
    "version": "0.2",
    "x-build-id": "ecKk3w5fCnPcNeMkX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapers_lat~x-twitter-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapers_lat-x-twitter-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/scrapers_lat~x-twitter-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapers_lat-x-twitter-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/scrapers_lat~x-twitter-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapers_lat-x-twitter-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": {
          "maxPosts": {
            "title": "Max posts",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of posts (tweets) to collect across all inputs. Optional."
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "userTweets",
              "userProfile",
              "tweet",
              "search"
            ],
            "type": "string",
            "description": "What to scrape. 'User Tweets' pulls a public account's recent posts. 'User Profile' pulls profile details (bio, followers, etc). 'Tweet by ID/URL' fetches specific tweets. Keyword 'Search' is shown but NOT available without a logged-in account — X requires authentication for search, so it returns a clear error instead of fake data.",
            "default": "userTweets"
          },
          "handles": {
            "title": "Handles (for User Tweets / User Profile)",
            "type": "array",
            "description": "Public X (Twitter) handles for the 'User Tweets' and 'User Profile' modes. Accepts @name, name, or a profile URL such as https://x.com/nasa. Add one or more.",
            "items": {
              "type": "string"
            }
          },
          "tweetsLimit": {
            "title": "Tweets per user",
            "minimum": 1,
            "maximum": 3200,
            "type": "integer",
            "description": "For 'User Tweets' mode: maximum number of tweets to collect per handle (paginated). Default 100."
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "For 'User Tweets' mode: also include the account's replies (uses the tweets-and-replies timeline).",
            "default": false
          },
          "tweetIds": {
            "title": "Tweet IDs or URLs (for Tweet mode)",
            "type": "array",
            "description": "For 'Tweet by ID/URL' mode: numeric tweet IDs (for example 20) or full status URLs such as https://x.com/jack/status/20. One record per tweet.",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search query (NOT available)",
            "type": "string",
            "description": "Keyword/query for 'Search' mode. NOTE: X disabled logged-out search, so this mode returns a clear error explaining the limitation rather than results. Use 'User Tweets' instead."
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "Top",
              "Latest"
            ],
            "type": "string",
            "description": "Top or Latest for 'Search' mode. Not used — search is login-gated by X.",
            "default": "Top"
          },
          "startUrls": {
            "title": "Start URLs (profiles or tweets)",
            "type": "array",
            "description": "X (Twitter) URLs to scrape. In User modes, profile or status URLs contribute the account handle; in Tweet mode, status URLs contribute the tweet ID. Accepts plain URL strings.",
            "items": {
              "type": "string"
            }
          },
          "twitterHandles": {
            "title": "Twitter handles (alias of Handles)",
            "type": "array",
            "description": "Alternative name for the Handles input, merged with it. Accepts @name, name, or a profile URL.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max items (alias of Max posts)",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Alternative name for Max posts. Caps the total number of records across the whole run."
          },
          "tweetLanguage": {
            "title": "Tweet language",
            "type": "string",
            "description": "Keep only tweets whose language code equals this two-letter value (for example en, es, pt). Applied to the tweets collected."
          },
          "onlyVerifiedUsers": {
            "title": "Only verified authors",
            "type": "boolean",
            "description": "Keep only tweets whose author is verified (X Blue / verified).",
            "default": false
          },
          "onlyImage": {
            "title": "Only tweets with images",
            "type": "boolean",
            "description": "Keep only tweets that include at least one photo.",
            "default": false
          },
          "onlyVideo": {
            "title": "Only tweets with video",
            "type": "boolean",
            "description": "Keep only tweets that include a video or animated GIF.",
            "default": false
          },
          "onlyQuote": {
            "title": "Only quote tweets",
            "type": "boolean",
            "description": "Keep only tweets that quote another tweet.",
            "default": false
          },
          "minimumRetweets": {
            "title": "Minimum retweets",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only tweets with at least this many retweets."
          },
          "minimumFavorites": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only tweets with at least this many likes (favorites)."
          },
          "minimumReplies": {
            "title": "Minimum replies",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only tweets with at least this many replies."
          },
          "start": {
            "title": "Start date",
            "type": "string",
            "description": "Keep only tweets posted on or after this date/time (ISO 8601, for example 2026-01-01)."
          },
          "end": {
            "title": "End date",
            "type": "string",
            "description": "Keep only tweets posted on or before this date/time (ISO 8601, for example 2026-12-31)."
          },
          "author": {
            "title": "Author filter",
            "type": "string",
            "description": "Keep only tweets whose author handle matches this value (useful when a timeline mixes retweets from other accounts)."
          },
          "mentioning": {
            "title": "Mentioning handle",
            "type": "string",
            "description": "Keep only tweets that mention this handle."
          },
          "lang": {
            "title": "Language",
            "type": "string",
            "description": "Two-letter UI language hint sent to X for localized fields. Defaults to English.",
            "default": "en"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}