{
  "openapi": "3.0.1",
  "info": {
    "title": "X(twitter) User Profile & Tweets Scraper with Follower Lists",
    "description": "Scrapes tweets and profile data from Twitter X, capturing usernames, bios, tweet text, media, timestamps, metrics, follower counts, and profile URLs. Ideal for trend tracking, research, influencer insights, and large-scale Twitter X data extraction",
    "version": "0.1",
    "x-build-id": "HNDacASWEAOn9zYJq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapio~twitter-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapio-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/scrapio~twitter-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapio-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/scrapio~twitter-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapio-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",
        "required": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Target X profiles",
            "type": "array",
            "description": "https://x.com/apify, @apify, apify or 3510729917 - all four forms resolve to the same account. Every target produces one profile row, its posts, and (with cookies) its rosters.",
            "default": [
              "https://x.com/apify"
            ],
            "items": {
              "type": "string"
            }
          },
          "getFollowers": {
            "title": "Collect the follower roster",
            "type": "boolean",
            "description": "Who follows this account. Fetched page by page over X's own bottom cursor; roughly 44-58 accounts arrive per page.",
            "default": true
          },
          "getFollowing": {
            "title": "Collect the following roster",
            "type": "boolean",
            "description": "Who this account follows. Same paging, a separate cap and a separate rate-limit bucket.",
            "default": true
          },
          "maxFollowers": {
            "title": "Follower cap per profile",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Stops after this many accounts that PASS the screens in section 3. 0 turns the follower roster off. Measured ceiling: 2,959 unique followers over 60 consecutive pages with no truncation - X imposes no row ceiling here, the real limit is its rate-limit bucket, so large caps can end early and the profile row says so via followersTruncated.",
            "default": 50
          },
          "maxFollowing": {
            "title": "Following cap per profile",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Same rule for the following roster. A fully enumerated list ends with an empty page, which this actor treats as the end of the list.",
            "default": 50
          },
          "minFollowerCount": {
            "title": "Minimum followers an account must have",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Drops small and empty accounts from both rosters. 0 keeps everyone.",
            "default": 0
          },
          "onlyVerifiedFollowers": {
            "title": "Keep only verified accounts",
            "type": "boolean",
            "description": "Keeps accounts X marks as blue-verified. This is the paid checkmark, not notability - the separate verifiedType column tells you Business / Government where X publishes it.",
            "default": false
          },
          "excludeProtectedAccounts": {
            "title": "Drop protected (locked) accounts",
            "type": "boolean",
            "description": "Removes accounts whose posts are private.",
            "default": false
          },
          "rosterSortBy": {
            "title": "Roster row order",
            "enum": [
              "listOrder",
              "followersDesc",
              "followersAsc",
              "followingDesc",
              "postsDesc"
            ],
            "type": "string",
            "description": "How the roster rows are ordered inside each target. 'listOrder' keeps X's own order, which is roughly most-recent-first.",
            "default": "listOrder"
          },
          "authToken": {
            "title": "auth_token cookie",
            "type": "string",
            "description": "The x.com auth_token cookie. Required for the follower and following rosters."
          },
          "ct0": {
            "title": "ct0 cookie",
            "type": "string",
            "description": "The x.com ct0 cookie. Sent as a cookie and as the x-csrf-token header. Must come from the same session as auth_token."
          },
          "maxTweets": {
            "title": "Maximum posts per profile",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "1-100. X caps a profile timeline read at 100 posts, so this is the true ceiling. This is a hard maximum: the pinned post counts against it, so a profile with a pin still returns exactly this many post rows, never one more. 0 skips posts and returns the profile row plus rosters only.",
            "default": 10
          },
          "sortOrder": {
            "title": "Post order",
            "enum": [
              "newest",
              "oldest",
              "popular"
            ],
            "type": "string",
            "description": "Applied BEFORE the maximum-posts cut, so 'popular' really returns the most-liked posts rather than re-ordering an arbitrary head. The original actor declared this setting and never read it.",
            "default": "newest"
          },
          "withReplies": {
            "title": "Keep the profile's replies",
            "type": "boolean",
            "description": "Turn off to keep only standalone posts and reposts. X's profile timeline already mixes replies in, so this is a filter over what arrives.",
            "default": true
          },
          "includeUserInfo": {
            "title": "Attach the author profile to each post",
            "type": "boolean",
            "description": "Adds the nested user object and the flat author columns (bio, join date, follower counts) to every post row. Roster rows always keep their own account fields - that is what they are.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Residential is the default because X answers datacenter ranges inconsistently. Turn the proxy off only if your own connection reaches x.com reliably.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}