{
  "openapi": "3.0.1",
  "info": {
    "title": "Twitter/X Scraper: Tweets, Profiles & Search",
    "description": "Twitter/X Scraper: Tweets, Profiles & Search extracts public X (Twitter) posts and profiles from handles, post URLs, ids and search terms: text, likes, reposts, replies, views, media, threads and full author profiles.",
    "version": "1.0",
    "x-build-id": "g6gh8v65vqIoTWIRA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neuro-scraper~twitter-x-scraper-tweets-profiles-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neuro-scraper-twitter-x-scraper-tweets-profiles-search",
        "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/neuro-scraper~twitter-x-scraper-tweets-profiles-search/runs": {
      "post": {
        "operationId": "runs-sync-neuro-scraper-twitter-x-scraper-tweets-profiles-search",
        "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/neuro-scraper~twitter-x-scraper-tweets-profiles-search/run-sync": {
      "post": {
        "operationId": "run-sync-neuro-scraper-twitter-x-scraper-tweets-profiles-search",
        "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": {
          "twitterHandles": {
            "title": "X handles",
            "type": "array",
            "description": "Accounts whose newest posts you want, one per line: NASA, @NASA or https://x.com/NASA.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Post or profile URLs",
            "type": "array",
            "description": "X post URLs (https://x.com/NASA/status/2121280846183137564), post ids or profile URLs, one per line.",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords, hashtags or phrases, one per line (e.g. artemis moon, #AI). Public posts that match are found and read one by one.",
            "items": {
              "type": "string"
            }
          },
          "maxTweetsPerQuery": {
            "title": "Max posts per handle / search term",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Limit per handle and per search term (per input: 20 x 2 terms = up to 40 rows). Logged-out X shows the 5 newest original posts of a profile - a handle gives at most those.",
            "default": 20
          },
          "maxRepliesPerPost": {
            "title": "Replies per post URL",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "For post URLs: also return the replies X shows under the post (0 = only the post).",
            "default": 0
          },
          "includeAuthorProfile": {
            "title": "Full author profile",
            "type": "boolean",
            "description": "Add the author's full public profile to every post (bio, location, join date, media count, banner, verification reason ...): one profile read per new author. Switch off for a faster run.",
            "default": true
          },
          "maxSearchPages": {
            "title": "Search depth (pages per term)",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many result pages to look through per search term (about 10 posts each).",
            "default": 5
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Keep posts with at least this many likes (min_faves). 0 = off.",
            "default": 0
          },
          "minRetweets": {
            "title": "Minimum retweets",
            "minimum": 0,
            "type": "integer",
            "description": "Keep posts with at least this many reposts (min_retweets). 0 = off.",
            "default": 0
          },
          "minReplies": {
            "title": "Minimum replies",
            "minimum": 0,
            "type": "integer",
            "description": "Keep posts with at least this many replies (min_replies). 0 = off.",
            "default": 0
          },
          "mediaFilter": {
            "title": "Media",
            "enum": [
              "any",
              "media",
              "images",
              "videos",
              "none"
            ],
            "type": "string",
            "description": "Filter posts by attached media (filter:media / filter:images / filter:videos).",
            "default": "any"
          },
          "replyFilter": {
            "title": "Replies",
            "enum": [
              "include",
              "exclude",
              "only"
            ],
            "type": "string",
            "description": "Keep, drop or only keep replies (filter:replies).",
            "default": "include"
          },
          "quoteFilter": {
            "title": "Quote posts",
            "enum": [
              "include",
              "exclude",
              "only"
            ],
            "type": "string",
            "description": "Keep, drop or only keep quote posts (filter:quote).",
            "default": "include"
          },
          "onlyWithLinks": {
            "title": "Only posts with links",
            "type": "boolean",
            "description": "filter:links",
            "default": false
          },
          "onlyWithHashtags": {
            "title": "Only posts with hashtags",
            "type": "boolean",
            "description": "filter:hashtags",
            "default": false
          },
          "onlyWithMentions": {
            "title": "Only posts with mentions",
            "type": "boolean",
            "description": "filter:mentions",
            "default": false
          },
          "onlyVerifiedAuthors": {
            "title": "Only verified authors",
            "type": "boolean",
            "description": "filter:blue_verified",
            "default": false
          },
          "lang": {
            "title": "Language",
            "type": "string",
            "description": "Keep posts in this language only (two-letter code, e.g. en, es, ja). Empty = all."
          },
          "start": {
            "title": "Posted on or after",
            "type": "string",
            "description": "Keep posts from this date (since), e.g. 2026-11-01."
          },
          "end": {
            "title": "Posted on or before",
            "type": "string",
            "description": "Keep posts up to this date (until)."
          },
          "includeProfiles": {
            "title": "Add a profile row per handle",
            "type": "boolean",
            "description": "Writes one full profile row for every handle, before its posts.",
            "default": true
          },
          "conversationIds": {
            "title": "Conversation ids",
            "type": "array",
            "description": "Ids of conversations (thread roots) to read, one per line.",
            "items": {
              "type": "string"
            }
          },
          "tweetIDs": {
            "title": "Post ids",
            "type": "array",
            "description": "Post ids to read, one per line (the number at the end of a post link).",
            "items": {
              "type": "string"
            }
          },
          "twitterContent": {
            "title": "Search query (alternative field)",
            "type": "string",
            "description": "One search query, the same as one line of `searchTerms`."
          },
          "sort": {
            "title": "Order of search results",
            "enum": [
              "Top",
              "Latest"
            ],
            "type": "string",
            "description": "Top keeps the relevance order of the results; Latest reads the newest found posts first.",
            "default": "Top"
          },
          "queryType": {
            "title": "Order (alternative field)",
            "enum": [
              "Top",
              "Latest"
            ],
            "type": "string",
            "description": "Same as `sort` - Top or Latest.",
            "default": "Top"
          },
          "includeSearchTerms": {
            "title": "Keep the search term in each row",
            "type": "boolean",
            "description": "Writes the search term that found a post into its `searchTerm` column.",
            "default": true
          },
          "from": {
            "title": "Posts by account",
            "type": "array",
            "description": "Keeps only posts written by these accounts (handles); the accounts' own newest posts are read too.",
            "items": {
              "type": "string"
            }
          },
          "author": {
            "title": "Posts by account (alternative field)",
            "type": "array",
            "description": "Same as `from`: keeps only posts by these accounts.",
            "items": {
              "type": "string"
            }
          },
          "to": {
            "title": "Replies to account",
            "type": "array",
            "description": "Keeps only replies written to these accounts.",
            "items": {
              "type": "string"
            }
          },
          "inReplyTo": {
            "title": "Replies to account (alternative field)",
            "type": "array",
            "description": "Same as `to`: keeps only replies to these accounts.",
            "items": {
              "type": "string"
            }
          },
          "mentioning": {
            "title": "Posts mentioning account",
            "type": "array",
            "description": "Keeps only posts that @mention one of these accounts.",
            "items": {
              "type": "string"
            }
          },
          "minimumFavorites": {
            "title": "Minimum likes (alternative field)",
            "minimum": 0,
            "type": "integer",
            "description": "Same as `minLikes`: keeps posts with at least this many likes."
          },
          "minimumRetweets": {
            "title": "Minimum reposts (alternative field)",
            "minimum": 0,
            "type": "integer",
            "description": "Same as `minRetweets`: keeps posts with at least this many reposts."
          },
          "minimumReplies": {
            "title": "Minimum replies (alternative field)",
            "minimum": 0,
            "type": "integer",
            "description": "Same as `minReplies`: keeps posts with at least this many replies."
          },
          "tweetLanguage": {
            "title": "Language (alternative field)",
            "type": "string",
            "description": "Same as `lang`: keeps posts in this language (two-letter code)."
          },
          "onlyVerifiedUsers": {
            "title": "Only verified authors (alternative field)",
            "type": "boolean",
            "description": "Same as `onlyVerifiedAuthors`: keeps posts by authors with a checkmark.",
            "default": false
          },
          "onlyTwitterBlue": {
            "title": "Only checkmark authors",
            "type": "boolean",
            "description": "Keeps posts whose author has a checkmark (blue, gold or grey).",
            "default": false
          },
          "onlyImage": {
            "title": "Only posts with images",
            "type": "boolean",
            "description": "Keeps only posts that carry a photo.",
            "default": false
          },
          "onlyVideo": {
            "title": "Only posts with video",
            "type": "boolean",
            "description": "Keeps only posts that carry a video or GIF.",
            "default": false
          },
          "onlyQuote": {
            "title": "Only quote posts",
            "type": "boolean",
            "description": "Keeps only quote posts.",
            "default": false
          },
          "sinceDate": {
            "title": "Posted on or after (alternative field)",
            "type": "string",
            "description": "Same as `start`: keeps posts from this date on."
          },
          "since_time": {
            "title": "Posted after (unix time)",
            "minimum": 0,
            "type": "integer",
            "description": "Keeps posts published after this moment, given as unix seconds."
          },
          "until_time": {
            "title": "Posted before (unix time)",
            "minimum": 0,
            "type": "integer",
            "description": "Keeps posts published before this moment, given as unix seconds."
          },
          "within_time": {
            "title": "Posted within the last",
            "type": "string",
            "description": "Keeps posts from the last minutes, hours or days, e.g. 30m, 12h or 3d."
          },
          "since_id": {
            "title": "Newer than post id",
            "minimum": 0,
            "type": "integer",
            "description": "Keeps posts whose id is greater than this id (posted later)."
          },
          "max_id": {
            "title": "Up to post id",
            "minimum": 0,
            "type": "integer",
            "description": "Keeps posts whose id is at most this id (posted earlier or the same)."
          },
          "filterNativeretweets": {
            "title": "Only reposts",
            "type": "boolean",
            "description": "Keeps only reposts (native retweets).",
            "default": false
          },
          "includeNativeretweets": {
            "title": "Include reposts",
            "type": "boolean",
            "description": "Lets reposts stay in the results.",
            "default": true
          },
          "filterReplies": {
            "title": "Only replies",
            "type": "boolean",
            "description": "Keeps only posts that are replies.",
            "default": false
          },
          "filterQuote": {
            "title": "Only quote posts (operator)",
            "type": "boolean",
            "description": "Keeps only quote posts.",
            "default": false
          },
          "conversation_id": {
            "title": "Only this conversation",
            "type": "string",
            "description": "Keeps only posts that belong to the thread with this id."
          },
          "quoted_tweet_id": {
            "title": "Only quotes of post id",
            "type": "string",
            "description": "Keeps only posts that quote the post with this id."
          },
          "quoted_user_id": {
            "title": "Only quotes of account",
            "type": "string",
            "description": "Keeps only posts that quote a post of this account (handle)."
          },
          "card_name": {
            "title": "Card type",
            "type": "string",
            "description": "Keeps only posts whose link card is of this type, e.g. summary_large_image, player or poll2choice_text_only."
          },
          "filterHasEngagement": {
            "title": "Only posts with engagement",
            "type": "boolean",
            "description": "Keeps only posts with at least one like, repost, reply or quote.",
            "default": false
          },
          "filterMedia": {
            "title": "Only posts with media",
            "type": "boolean",
            "description": "Keeps only posts with a photo, video or GIF.",
            "default": false
          },
          "filterTwimg": {
            "title": "Only posts with uploaded images",
            "type": "boolean",
            "description": "Keeps only posts with an image uploaded to X.",
            "default": false
          },
          "filterImages": {
            "title": "Only posts with images (operator)",
            "type": "boolean",
            "description": "Keeps only posts with a photo.",
            "default": false
          },
          "filterVideos": {
            "title": "Only posts with videos (operator)",
            "type": "boolean",
            "description": "Keeps only posts with a video or GIF.",
            "default": false
          },
          "filterNativeVideo": {
            "title": "Only posts with uploaded video",
            "type": "boolean",
            "description": "Keeps only posts with a video uploaded to X.",
            "default": false
          },
          "filterConsumerVideo": {
            "title": "Only posts with user video",
            "type": "boolean",
            "description": "Keeps only posts with a video.",
            "default": false
          },
          "filterProVideo": {
            "title": "Only posts with pro video",
            "type": "boolean",
            "description": "Keeps only posts with a video.",
            "default": false
          },
          "filterVine": {
            "title": "Only posts with short video",
            "type": "boolean",
            "description": "Keeps only posts with a video.",
            "default": false
          },
          "filterSpaces": {
            "title": "Only Spaces",
            "type": "boolean",
            "description": "Keeps only posts that share an X Space.",
            "default": false
          },
          "filterLinks": {
            "title": "Only posts with links (operator)",
            "type": "boolean",
            "description": "Keeps only posts with a link.",
            "default": false
          },
          "filterMentions": {
            "title": "Only posts with mentions (operator)",
            "type": "boolean",
            "description": "Keeps only posts that mention an account.",
            "default": false
          },
          "filterNews": {
            "title": "Only news links",
            "type": "boolean",
            "description": "Keeps only posts that share a link with a preview card (articles).",
            "default": false
          },
          "filterSafe": {
            "title": "Only safe posts",
            "type": "boolean",
            "description": "Leaves out posts X marks as possibly sensitive.",
            "default": false
          },
          "filterHashtags": {
            "title": "Only posts with hashtags (operator)",
            "type": "boolean",
            "description": "Keeps only posts with a hashtag.",
            "default": false
          },
          "filterVerified": {
            "title": "Only verified authors (operator)",
            "type": "boolean",
            "description": "Keeps only posts by authors with a checkmark.",
            "default": false
          },
          "filterBlueVerified": {
            "title": "Only blue-check authors (operator)",
            "type": "boolean",
            "description": "Keeps only posts by authors with a checkmark.",
            "default": false
          },
          "near": {
            "title": "Near place",
            "type": "string",
            "description": "Keeps only posts tagged with a place whose name contains this text, e.g. London."
          },
          "geotaggedNear": {
            "title": "Near place (alternative field)",
            "type": "string",
            "description": "Same as `near`: keeps posts tagged with a matching place."
          },
          "placeObjectId": {
            "title": "Place id",
            "type": "string",
            "description": "Keeps only posts tagged with the place that has this X place id."
          },
          "maxResults": {
            "title": "Max results (alternative field)",
            "minimum": 0,
            "type": "integer",
            "description": "Same as `maxItems`: a cap on the rows of the whole run."
          },
          "includeRaw": {
            "title": "Include the raw post record",
            "type": "boolean",
            "description": "Adds the complete original post record (raw column). Off = smaller rows.",
            "default": true
          },
          "includeOriginalTweet": {
            "title": "Include the original of a repost",
            "type": "boolean",
            "description": "For reposts, adds the original post (retweeted_tweet: id, link, text, date, author, likes).",
            "default": true
          },
          "includeArticles": {
            "title": "Include X Articles",
            "type": "boolean",
            "description": "Adds the article block (title, preview) when a post is a long-form X Article.",
            "default": true
          },
          "fieldStyle": {
            "title": "Column name style",
            "enum": [
              "camelCase",
              "snake_case"
            ],
            "type": "string",
            "description": "camelCase keeps the column names as documented; snake_case writes like_count, created_at ...",
            "default": "camelCase"
          },
          "outputPreset": {
            "title": "Row layout",
            "enum": [
              "nested",
              "flat"
            ],
            "type": "string",
            "description": "Flat turns every object column into separate columns (author_userName ...) - handy for spreadsheets.",
            "default": "nested"
          },
          "embedTheme": {
            "title": "Embed code theme",
            "enum": [
              "",
              "light",
              "dark"
            ],
            "type": "string",
            "description": "Theme of the embed code in the embed column.",
            "default": ""
          },
          "embedHideMedia": {
            "title": "Embed code: hide media",
            "type": "boolean",
            "description": "The embed code shows the post without photos, videos and link cards.",
            "default": false
          },
          "embedHideThread": {
            "title": "Embed code: hide the parent post",
            "type": "boolean",
            "description": "For replies, the embed code shows only the reply, not the post it answers.",
            "default": false
          },
          "embedOmitScript": {
            "title": "Embed code without script tag",
            "type": "boolean",
            "description": "Leaves the widgets script tag out of the embed code (when your page loads it once already).",
            "default": false
          },
          "maxItems": {
            "title": "Max posts in total",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Optional cap for the whole run. 0 = no total cap.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxies are recommended.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}