{
  "openapi": "3.0.1",
  "info": {
    "title": "Twitter Profile Scraper - X Followers, Bio & Verified Badge",
    "description": "Scrape X (Twitter) profiles in bulk from handles, URLs or ids: followers, following, posts, likes and listed counts, bio, website, location, join date, verified type, pinned post and recent activity. No login or cookies. Monitor mode returns only changed profiles.",
    "version": "0.1",
    "x-build-id": "s4u0dlaJg8zoj4THK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/topapi~x-profile-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-topapi-x-profile-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/topapi~x-profile-scraper/runs": {
      "post": {
        "operationId": "runs-sync-topapi-x-profile-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/topapi~x-profile-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-topapi-x-profile-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": {
          "handles": {
            "title": "👤 Handles, profile URLs or user ids",
            "type": "array",
            "description": "e.g. \"nasa\", \"@elonmusk\", \"https://x.com/apify\", \"twitter.com/jack\", \"id:11348282\". A 16-20 digit number is read as a user id; prefix shorter ids with id:.",
            "items": {
              "type": "string"
            }
          },
          "minFollowers": {
            "title": "📈 Minimum followers",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Keep only accounts with at least this many followers, e.g. 1000. 0 = no minimum.",
            "default": 0
          },
          "maxFollowers": {
            "title": "📉 Maximum followers",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Keep only accounts with at most this many followers, e.g. 50000 for micro-influencers. 0 = no maximum.",
            "default": 0
          },
          "verifiedOnly": {
            "title": "✅ Verified accounts only",
            "type": "boolean",
            "description": "Keep only accounts with a blue, gold (business) or grey (government) check mark.",
            "default": false
          },
          "withWebsiteOnly": {
            "title": "🌐 With a website only",
            "type": "boolean",
            "description": "Keep only accounts that list a website on their profile, e.g. for lead lists.",
            "default": false
          },
          "bioKeywords": {
            "title": "🔤 Bio contains any of",
            "type": "array",
            "description": "Keep only accounts whose bio or display name contains one of these words (case-insensitive), e.g. \"founder\", \"podcast\", \"agency\". Empty = any bio.",
            "items": {
              "type": "string"
            }
          },
          "excludeProtected": {
            "title": "🔒 Skip protected accounts",
            "type": "boolean",
            "description": "Protected (locked) accounts still publish name, bio and counts and are delivered by default. Tick to drop them.",
            "default": false
          },
          "activeWithinDays": {
            "title": "📅 Posted within the last N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Keep only accounts whose latest original post or reply is at most this many days old, e.g. 30. 0 = any activity (also keeps accounts with no visible posts).",
            "default": 0
          },
          "includeLatestTweets": {
            "title": "📝 Include latest posts",
            "type": "boolean",
            "description": "Adds the account's latest original posts and replies (text, date, likes, replies, reposts, quotes, bookmarks, views, media) as latestPosts. Charged as the posts event.",
            "default": false
          },
          "tweetsPerProfile": {
            "title": "🔢 Posts per profile",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many latest posts to attach, 1-5 (the public profile page carries the 5 most recent original posts).",
            "default": 5
          },
          "includePinnedTweet": {
            "title": "📌 Include pinned post",
            "type": "boolean",
            "description": "Adds the full pinned post (text, date, counts, media) as pinnedPost. The pinned post id is always in pinnedTweetId. Charged as the posts event.",
            "default": false
          },
          "includeUnavailable": {
            "title": "🚫 Include unavailable accounts as rows",
            "type": "boolean",
            "description": "Write a status row for handles that do not exist, are suspended, or are not valid input, so a bulk list comes back complete. Off: they appear only in the run summary.",
            "default": false
          },
          "monitorMode": {
            "title": "🔁 Deliver only changed profiles",
            "type": "boolean",
            "description": "Remembers each account's followers, following, posts, likes, bio, name, website, verification and avatar. A re-run delivers an account only when it is new or one of those changed, with previousStats, deltas and changedFields.",
            "default": false
          },
          "monitorStoreName": {
            "title": "🗄️ Monitor memory name",
            "pattern": "^[a-zA-Z0-9-]{1,63}$",
            "type": "string",
            "description": "Name of the key-value store that keeps the per-account memory for monitor mode, e.g. \"competitors-q4\". Give each list its own name. Letters, digits and hyphens.",
            "default": "x-profile-monitor"
          },
          "maxItems": {
            "title": "🔢 Max profiles to deliver",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many delivered profiles (your cost cap; you pay per delivered profile). 0 = every account in the list.",
            "default": 0
          },
          "compact": {
            "title": "🤖 Compact output",
            "type": "boolean",
            "description": "Core fields only (handle, name, bio, website, location, the five counts, join date, verification, last post, engagement): sized for AI agents and MCP clients.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "🌍 Proxy",
            "type": "object",
            "description": "X serves public profile pages without a proxy; the scraper switches to the Apify datacenter and then residential pool on its own if a request is refused. Set a proxy here only to force one.",
            "default": {
              "useApifyProxy": false
            }
          },
          "maxConcurrency": {
            "title": "⚡ Parallel requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many profiles to load at the same time. 8 is the tested default; raise it for lists of thousands.",
            "default": 8
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}