{
  "openapi": "3.0.1",
  "info": {
    "title": "X (Twitter) Scraper — Tweets, Profiles & Lists",
    "description": "Search X (Twitter) Tweets, profiles, and Lists for market research and audience discovery. Export followers, following, replies, retweeters, quotes, List members, and subscribers with available author details, metrics, and media links. Download JSON, CSV, or Excel. No X login or API key required.",
    "version": "0.1",
    "x-build-id": "jOR8pc4qNF9TLtQez"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/arjun_code~x-twitter-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-arjun_code-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/arjun_code~x-twitter-scraper/runs": {
      "post": {
        "operationId": "runs-sync-arjun_code-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/arjun_code~x-twitter-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-arjun_code-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": {
          "operation": {
            "title": "🚀 What do you want to collect?",
            "enum": [
              "search_tweets",
              "tweet_details",
              "search_users",
              "user_profiles",
              "followers",
              "following",
              "replies",
              "retweeters",
              "quotes",
              "search_lists",
              "owned_lists",
              "subscribed_lists",
              "list_memberships",
              "list_members",
              "list_subscribers"
            ],
            "type": "string",
            "description": "<strong>Start here.</strong> Choose one task per run. You can enter multiple items for that task. A List search returns Lists and their owners; choose Get List members or Get List subscribers to export the people in a known List. Get user profiles includes available account-background information: the region and app/source reported by X, plus username-change counts and the latest change time.",
            "default": "search_tweets"
          },
          "searchQueries": {
            "title": "🔎 Search keywords",
            "type": "array",
            "description": "<strong>Use for Search Tweets, Search people, or Search Lists.</strong> Enter up to 25 unique searches, one per line, such as AI agents or venture capital. Each line is searched separately. Blank lines and repeated identical searches are ignored. For Search Tweets, you can leave this empty when using Tweets from accounts or Tweets mentioning accounts. <a href=\"https://apify.com/arjun_code/x-twitter-people-search-scraper\" target=\"_blank\">People Search</a> offers more profile filters.",
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "👤 X usernames or profile links",
            "type": "array",
            "description": "<strong>Use for user profiles, followers, following, or account Lists.</strong> Enter apify, @apify, or https://x.com/apify, one account per line. You can also use the X user IDs field below. Combined limit across both fields: <strong>100</strong> account inputs for profiles, <strong>25</strong> for followers/following, or <strong>50</strong> for account Lists. Equivalent usernames are processed once; a username and ID resolving to the same account produce one export. For Get user profiles, the Actor combines account-background and detailed profile data; no keyword search is performed.",
            "items": {
              "type": "string"
            }
          },
          "userIds": {
            "title": "🔢 X user IDs",
            "type": "array",
            "description": "<strong>Optional alternative to usernames for account tasks.</strong> Enter numeric account IDs, one per line, such as 3510729917. In JSON, put each ID in quotes. You can use usernames and IDs together within the combined account limit above. These are account IDs, not Tweet or List IDs. Get user profiles combines the detailed profile with available account-background information for the same account.",
            "items": {
              "type": "string"
            }
          },
          "tweets": {
            "title": "🔗 Tweet links or IDs",
            "type": "array",
            "description": "<strong>Use for Tweet details, replies, retweeters, or quote Tweets.</strong> Enter one Tweet link or ID per line, such as https://x.com/OpenAI/status/2107909792945832070. Up to <strong>100 unique Tweets</strong> for details, or <strong>50</strong> for the other three tasks. Equivalent links and IDs are processed once. For downloadable images and videos, use <a href=\"https://apify.com/arjun_code/x-twitter-media-downloader\" target=\"_blank\">Media Downloader</a>.",
            "items": {
              "type": "string"
            }
          },
          "listIds": {
            "title": "📋 List links or IDs",
            "type": "array",
            "description": "<strong>Use only for Get List members or Get List subscribers.</strong> Enter up to <strong>50 unique Lists</strong>, one per line, such as https://x.com/i/lists/1455191294725312517 or 1455191294725312517. Members appear in the List; subscribers follow it. To find Lists created by, followed by, or containing an account, use its username or user ID instead. For dedicated List workflows, try <a href=\"https://apify.com/arjun_code/x-twitter-lists-scraper\" target=\"_blank\">Lists Scraper</a>.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxResultsPerInput": {
            "title": "📊 Results per input",
            "minimum": 0,
            "type": "integer",
            "description": "<strong>The limit applies separately to every search, account, Tweet, or List.</strong> For example, 2 accounts × 100 can save up to 200 follower profiles. Enter <strong>0 for all results X makes available</strong>. ⚠️ <strong>Search people and Search Lists require 1–1,000</strong>; 0 is not supported for these two tasks. User profiles and Tweet details check every input once, regardless of this setting. Default: 100.",
            "default": 100
          },
          "searchMode": {
            "title": "Sort search results",
            "enum": [
              "Latest",
              "Top"
            ],
            "type": "string",
            "description": "<strong>Search Tweets only.</strong> Latest first finds recent Tweets. Top results uses X relevance ranking. If you want a time period, set the date fields below.",
            "default": "Latest"
          },
          "postType": {
            "title": "Tweet type",
            "enum": [
              "any",
              "exclude_retweets",
              "originals",
              "replies",
              "quotes",
              "retweets"
            ],
            "type": "string",
            "description": "<strong>Search Tweets only.</strong> All Tweet types includes original Tweets, replies, quotes, and retweets. Exclude retweets keeps the first three. Original Tweets only excludes replies, quotes, and retweets. Choose Replies, Quote Tweets, or Retweets to request just that type.",
            "default": "any"
          },
          "mediaType": {
            "title": "Media or links",
            "enum": [
              "any",
              "media",
              "images",
              "videos",
              "links"
            ],
            "type": "string",
            "description": "<strong>Search Tweets only.</strong> Choose images, videos, or links, or keep No requirement to also allow text-only Tweets. This selects matching Tweets and returns available media links. To save media files with quality choices, use <a href=\"https://apify.com/arjun_code/x-twitter-media-downloader\" target=\"_blank\">Media Downloader</a>.",
            "default": "any"
          },
          "language": {
            "title": "Tweet language",
            "enum": [
              "",
              "ar",
              "bn",
              "bg",
              "ca",
              "zh",
              "cs",
              "da",
              "nl",
              "en",
              "fi",
              "fr",
              "de",
              "el",
              "gu",
              "he",
              "hi",
              "hu",
              "id",
              "it",
              "ja",
              "kn",
              "ko",
              "ms",
              "mr",
              "no",
              "fa",
              "pl",
              "pt",
              "ro",
              "ru",
              "sr",
              "sk",
              "es",
              "sv",
              "ta",
              "th",
              "tr",
              "uk",
              "ur",
              "vi"
            ],
            "type": "string",
            "description": "<strong>Search Tweets only.</strong> Choose a language or Any language. This selects Tweets in that language; it does not translate them.",
            "default": ""
          },
          "startDate": {
            "title": "Posted on or after",
            "type": "string",
            "description": "<strong>Search Tweets only.</strong> Include this entire date and later dates, using UTC. Select a date or enter YYYY-MM-DD in JSON. Leave empty for no starting date. It must be on or before Posted on or before."
          },
          "endDate": {
            "title": "Posted on or before",
            "type": "string",
            "description": "<strong>Search Tweets only.</strong> Include Tweets through the end of this entire date, using UTC. Leave empty for no ending date. Use the same date in both fields to search one day."
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "<strong>Search Tweets only.</strong> Keep Tweets with at least this many likes. Enter 20 for 20 or more likes, or 0 for no minimum. All selected engagement minimums apply together.",
            "default": 0
          },
          "minRetweets": {
            "title": "Minimum retweets",
            "minimum": 0,
            "type": "integer",
            "description": "<strong>Search Tweets only.</strong> Keep Tweets retweeted at least this many times. Enter 10 for 10 or more retweets, or 0 for no minimum. This checks popularity; it does not select retweet-type Tweets or export retweeter profiles.",
            "default": 0
          },
          "minReplies": {
            "title": "Minimum replies",
            "minimum": 0,
            "type": "integer",
            "description": "<strong>Search Tweets only.</strong> Keep Tweets with at least this many replies. Enter 5 for 5 or more replies, or 0 for no minimum. This checks popularity; choose Get replies to collect the replies themselves.",
            "default": 0
          },
          "excludeWords": {
            "title": "Words or phrases to exclude",
            "type": "array",
            "description": "<strong>Search Tweets only.</strong> Enter one word or phrase per line, such as giveaway or free trial. Matching Tweets are excluded; a multi-word entry is treated as a phrase. Avoid excluding the same words you are searching for. Leave empty to exclude nothing.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "fromUsers": {
            "title": "Tweets from accounts",
            "type": "array",
            "description": "<strong>Search Tweets only.</strong> Enter usernames, @handles, or profile links, such as OpenAI or @AnthropicAI. Tweets can come from any listed author. Leave Search keywords empty for one combined account search, or add keywords to narrow each separate search. The result limit applies to the combined account search, not separately to every author. Duplicate accounts are ignored.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "mentionUsers": {
            "title": "Tweets mentioning accounts",
            "type": "array",
            "description": "<strong>Search Tweets only.</strong> Enter usernames, @handles, or profile links, such as @OpenAI. Tweets must mention at least one listed account. Works alone or with keywords. If Tweets from accounts is also filled in, Tweets must come from a selected author <strong>and</strong> mention a selected account. Multiple accounts in either field mean any of those accounts.",
            "items": {
              "type": "string"
            },
            "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}