{
  "openapi": "3.0.1",
  "info": {
    "title": "X (Twitter) Followers Scraper",
    "description": "Export the public followers and following lists of X (Twitter) accounts. One row per relationship with the account's handle, name, bio, location, website, follower counts and verification. No login, no cookies. Pay only for rows saved.",
    "version": "1.0",
    "x-build-id": "pWxc8xBsG7CBd6vke"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coregent~x-followers-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coregent-x-followers-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/coregent~x-followers-scraper/runs": {
      "post": {
        "operationId": "runs-sync-coregent-x-followers-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/coregent~x-followers-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-coregent-x-followers-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": {
          "sourceHandles": {
            "title": "X accounts",
            "maxItems": 100,
            "type": "array",
            "description": "X handles whose followers or following lists you want, one per entry (e.g. <code>nasa</code>, <code>@apify</code>). Profile URLs work here too.",
            "items": {
              "type": "string"
            }
          },
          "sourceProfileUrls": {
            "title": "Profile URLs",
            "maxItems": 100,
            "type": "array",
            "description": "X profile URLs, one per entry (e.g. <code>https://x.com/nasa</code>, <code>twitter.com/apify/followers</code>). Combined with the accounts above; the same account given twice runs once.",
            "items": {
              "type": "string"
            }
          },
          "relationType": {
            "title": "List",
            "enum": [
              "followers",
              "following",
              "both"
            ],
            "type": "string",
            "description": "<b>Followers</b>: accounts that follow each account. <b>Following</b>: accounts each account follows. <b>Both</b>: both lists; each row says which one it came from.",
            "default": "followers"
          },
          "maxResults": {
            "title": "Maximum results (total)",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stops the whole run after this many saved rows, across all accounts and lists.",
            "default": 20
          },
          "maxResultsPerSource": {
            "title": "Maximum results per account and list",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Stops each account's followers (or following) list after this many saved rows. Accounts are read in turns, a page each, so one huge account can't use up the total limit.",
            "default": 1000
          },
          "minFollowers": {
            "title": "Minimum followers",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep listed accounts with at least this many followers. 0 = off.",
            "default": 0
          },
          "maxFollowers": {
            "title": "Maximum followers",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep listed accounts with at most this many followers (e.g. to find smaller creators). 0 = off.",
            "default": 0
          },
          "onlyVerified": {
            "title": "Only verified accounts",
            "type": "boolean",
            "description": "Only keep listed accounts with a verified badge.",
            "default": false
          },
          "onlyWithWebsite": {
            "title": "Only accounts with a website",
            "type": "boolean",
            "description": "Only keep listed accounts that show a website on their profile. Works on the following list only: X gives no website for followers.",
            "default": false
          },
          "excludeProtected": {
            "title": "Exclude protected accounts",
            "type": "boolean",
            "description": "Drop listed accounts whose tweets are protected.",
            "default": false
          },
          "includeFullProfiles": {
            "title": "Include full profiles",
            "type": "boolean",
            "description": "X's followers list only gives each follower's handle, name, follower count, verified badge, location and join date. Turn this on to also get the bio, following count, tweet count and media count, with one extra lookup per follower, billed as a separate profile-enrichment event once per account. The following list already includes these fields, so it needs no extra lookups. X gives no website for followers, even with this on.",
            "default": false
          },
          "skipIds": {
            "title": "Skip these accounts",
            "maxItems": 50000,
            "type": "array",
            "description": "User IDs, handles or profile URLs to leave out, e.g. accounts you already collected in an earlier run. Skipped rows are never charged.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "debug": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Saves the first raw provider pages to the key-value store (DEBUG_RAW_PAGE_1…3) for troubleshooting.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}