Xproapi Following API

Accounts a user follows, newest first.

GitHub OpenAPI

Operations 1

GET /twitter/user/followings Get followings #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/xproapi:xproapi-following-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

xproapi-following-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Xproapi.com Following API
  version: 1.1.0
  summary: 'Public X (Twitter) data as JSON: profiles, followers, followings, tweets, search, replies and articles.'
  description: 'Read public X (Twitter) data with GET requests that return JSON. Send your API key in the `X-API-Key` header on every request; create one at https://xproapi.com/app/api/keys after signing up.


    Calls are paid in credits, charged per result returned and only for successful responses: see pricing and the credits guide. Each key can make 60 requests a minute (rate limits).


    List endpoints use cursor pagination: while `has_next_page` is true, send `next_cursor` back as `cursor` (pagination). Every response carries an `X-Request-Id`; errors repeat it as `request_id` (error handling).'
  termsOfService: https://xproapi.com/terms/
  contact:
    name: Xproapi.com support
    email: xproapisupport@gmail.com
    url: https://xproapi.com/docs/
  x-logo:
    url: https://xproapi.com/apple-touch-icon.png
    altText: Xproapi.com
servers:
- url: https://xproapi.com/api
  description: Production
security:
- ApiKeyAuth: []
tags:
- name: Following
  description: Accounts a user follows, newest first.
paths:
  /twitter/user/followings:
    get:
      tags:
      - Following
      operationId: followings
      summary: Get followings
      description: 'Accounts the user follows, most recent first. Paginated with `cursor` / `next_cursor`.


        Priced per user returned: a full page of 200 costs 140 credits.'
      externalDocs:
        url: https://xproapi.com/docs/followings/
      parameters:
      - name: userName
        in: query
        required: true
        description: X username without the @, e.g. elonmusk. A profile link also works.
        schema:
          type: string
          minLength: 1
        example: elonmusk
      - name: cursor
        in: query
        required: false
        description: next_cursor from the previous page. Empty for the first page.
        schema:
          type: string
      - name: pageSize
        in: query
        required: false
        description: Users per page, 20–200. Default 200.
        schema:
          type: integer
          minimum: 20
          maximum: 200
          default: 200
        example: 200
      responses:
        '200':
          description: 'Success. Priced per user returned: a full page of 200 costs 140 credits.'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
          content:
            application/json:
              schema:
                type: object
                properties:
                  followings:
                    type: array
                    items:
                      $ref: '#/components/schemas/User'
                  has_next_page:
                    type: boolean
                  next_cursor:
                    type: string
                  status:
                    type: string
                  message:
                    type: string
                required:
                - followings
                - has_next_page
                - next_cursor
                - status
                - message
              example:
                followings:
                - type: user
                  id: '44196397'
                  userName: elonmusk
                  name: Elon Musk
                  url: https://x.com/elonmusk
                  description: Read @Grok
                  profilePicture: https://pbs.twimg.com/profile_images/1234567890/avatar_normal.jpg
                  followers: 219000000
                  following: 1100
                  isBlueVerified: true
                  protected: false
                  unavailable: false
                - type: user
                  id: '783214'
                  userName: X
                  name: X
                  url: https://x.com/X
                  description: Read @Grok
                  profilePicture: https://pbs.twimg.com/profile_images/1234567890/avatar_normal.jpg
                  followers: 219000000
                  following: 1100
                  isBlueVerified: true
                  protected: false
                  unavailable: false
                has_next_page: true
                next_cursor: eyJzIjoiZGIiLCJvIjoyMDB9
                status: success
                message: success
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/InsufficientCredits'
        '403':
          $ref: '#/components/responses/ForbiddenOrProtected'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
        '502':
          $ref: '#/components/responses/UpstreamError'
        '503':
          $ref: '#/components/responses/Unavailable'
      x-codeSamples:
      - lang: Shell
        label: cURL
        source: "curl \"https://xproapi.com/api/twitter/user/followings?userName=elonmusk&pageSize=200\" \\\n  -H \"X-API-Key: YOUR_API_KEY\""
      - lang: Python
        label: Python SDK
        source: '# pip install git+https://github.com/Xproapi-LLC/xproapi_python.git

          import os

          from xproapi import Xproapi


          x = Xproapi(os.environ["XPROAPI_KEY"])


          result = x.followings("elonmusk", page_size=200)

          print(result)'
      - lang: JavaScript
        label: Node.js SDK
        source: '// npm install github:Xproapi-LLC/xproapi_node

          import { Xproapi } from ''xproapi'';


          const x = new Xproapi({ apiKey: process.env.XPROAPI_KEY });


          const result = await x.followings(''elonmusk'', { pageSize: 200 });

          console.log(result);'
      - lang: PHP
        label: PHP SDK
        source: '<?php

          // composer config repositories.xproapi vcs https://github.com/Xproapi-LLC/xproapi_php

          // composer require xproapi/xproapi-php:dev-master

          require ''vendor/autoload.php'';


          use Xproapi\Client;


          $x = new Client(getenv(''XPROAPI_KEY''));


          $result = $x->followings(''elonmusk'', pageSize: 200);

          print_r($result);'
      - lang: Go
        label: Go SDK
        source: "// go get github.com/Xproapi-LLC/xproapi_go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\txproapi \"github.com/Xproapi-LLC/xproapi_go\"\n)\n\nfunc main() {\n\tx, err := xproapi.New(os.Getenv(\"XPROAPI_KEY\"))\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tctx := context.Background()\n\n\tresult, err := x.Followings(ctx, \"elonmusk\", xproapi.Params{\"pageSize\": 200})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfmt.Println(result)\n}"
      - lang: Java
        label: Java SDK
        source: "// Build the client first: https://xproapi.com/sdks/java/#install\nimport com.xproapi.Xproapi;\nimport java.util.List;\nimport java.util.Map;\n\npublic class Example {\n    public static void main(String[] args) {\n        Xproapi x = new Xproapi(System.getenv(\"XPROAPI_KEY\"));\n\n        Map<String, Object> result = x.followings(\"elonmusk\", Map.of(\"pageSize\", 200));\n        System.out.println(result);\n    }\n}"
      - lang: C#
        label: C# SDK
        source: '// git clone https://github.com/Xproapi-LLC/xproapi_csharp.git

          // dotnet add reference xproapi_csharp/src/Xproapi.csproj

          using Xproapi;


          var x = new XproapiClient(Environment.GetEnvironmentVariable("XPROAPI_KEY")!);


          var result = await x.FollowingsAsync("elonmusk", pageSize: 200);

          Console.WriteLine(result);'
components:
  schemas:
    Error:
      type: object
      required:
      - status
      - error
      - message
      - request_id
      properties:
        status:
          type: string
          const: error
        error:
          type: integer
          description: The HTTP status code.
        message:
          type: string
          description: What went wrong, in plain English.
        request_id:
          type: string
          description: Same as the X-Request-Id header.
    User:
      type: object
      description: A public X account.
      required:
      - type
      - id
      - userName
      - name
      - url
      - description
      - profilePicture
      - followers
      - following
      - isBlueVerified
      - protected
      - unavailable
      properties:
        type:
          type: string
          const: user
        id:
          type: string
          pattern: ^[0-9]+$
          description: Numeric user id, as a string. It never changes; store this rather than the username.
          example: '44196397'
        userName:
          type: string
          description: Username without the @. Can change.
          example: elonmusk
        name:
          type: string
        url:
          type: string
          format: uri
        description:
          type: string
          description: Bio; empty when none.
        profilePicture:
          type:
          - string
          - 'null'
          format: uri
        followers:
          type: integer
          minimum: 0
        following:
          type: integer
          minimum: 0
        isBlueVerified:
          type: boolean
        protected:
          type: boolean
          description: Protected accounts’ tweets, followers and following can’t be read.
        unavailable:
          type: boolean
  responses:
    RateLimited:
      description: Over this key’s per-minute limit, or X is rate limiting. Wait Retry-After seconds. Not charged.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: error
            error: 429
            message: Rate limit reached (60 requests a minute). Retry in 30 seconds.
            request_id: req_01jc3v8k2m4n6p8q0r2s4t6v8w
    Unauthorized:
      description: Missing, invalid or revoked API key. Not charged.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: error
            error: 401
            message: Missing or invalid API key. Send it in the X-API-Key header.
            request_id: req_01jc3v8k2m4n6p8q0r2s4t6v8w
    Unavailable:
      description: Live data or this endpoint is temporarily unavailable. Retry later. Not charged.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: error
            error: 503
            message: Live data is temporarily unavailable. Try again later.
            request_id: req_01jc3v8k2m4n6p8q0r2s4t6v8w
    UpstreamError:
      description: X couldn’t be reached. Retry with backoff. Not charged.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: error
            error: 502
            message: Couldn’t reach X right now. Try again in a moment.
            request_id: req_01jc3v8k2m4n6p8q0r2s4t6v8w
    BadRequest:
      description: A missing or invalid parameter, or a cursor that can’t be used. Not charged.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: error
            error: 400
            message: userName is required.
            request_id: req_01jc3v8k2m4n6p8q0r2s4t6v8w
    ServerError:
      description: Unexpected error on our side. Quote the request id to support. Not charged.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: error
            error: 500
            message: Something went wrong on our side. Quote the request ID if you contact support.
            request_id: req_01jc3v8k2m4n6p8q0r2s4t6v8w
    InsufficientCredits:
      description: Not enough credits for this request. Not charged.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: error
            error: 402
            message: Not enough credits. Top up in your panel.
            request_id: req_01jc3v8k2m4n6p8q0r2s4t6v8w
    NotFound:
      description: The user, tweet or article doesn’t exist, or was suspended or deleted. Not charged.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: error
            error: 404
            message: User not found. Check the userName, or the account may be suspended.
            request_id: req_01jc3v8k2m4n6p8q0r2s4t6v8w
    ForbiddenOrProtected:
      description: The requested X account is protected, or your account can’t use the API. Not charged.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: error
            error: 403
            message: '@example is protected, so its followers can’t be read.'
            request_id: req_01jc3v8k2m4n6p8q0r2s4t6v8w
  headers:
    RetryAfter:
      description: Seconds to wait before retrying.
      schema:
        type: integer
    RateLimitRemaining:
      description: Requests left in the current minute for this API key.
      schema:
        type: integer
    RateLimitLimit:
      description: Requests allowed per minute for this API key.
      schema:
        type: integer
    RequestId:
      description: Unique id of this call. Quote it when contacting support.
      schema:
        type: string
        example: req_01jc3v8k2m4n6p8q0r2s4t6v8w
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your API key, from https://xproapi.com/app/api/keys. Keys start with xp_.
externalDocs:
  description: API documentation and guides
  url: https://xproapi.com/docs/
x-apisguru-categories:
- developer_tools
- social