> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xquik.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get following

> Retrieve the accounts one X user follows by username or numeric user ID with cursor pagination for social graph, CRM, warehouse, and agent workflows

<blockquote className="agent-llms-directive">
  For the complete documentation index, see <a href="/llms.txt">llms.txt</a>.
</blockquote>

<Callout icon="coins" color="#5c3327">
  **1 credit per result returned** · [All plans](https://xquik.com/#pricing) from \$0.00012/credit
</Callout>

<Info>
  Get following returns the accounts one X profile follows by username or
  numeric user ID. It is also useful as a Following API, X following API, or
  Twitter following API. The canonical endpoint remains
  `GET /api/v1/x/users/{id}/following`.
</Info>

<CodeGroup>
  ```bash Username theme={null}
  curl "https://xquik.com/api/v1/x/users/xquikcom/following?pageSize=100" \
    -H "x-api-key: xq_YOUR_KEY_HERE" | jq
  ```

  ```bash Numeric user ID theme={null}
  curl "https://xquik.com/api/v1/x/users/44196397/following" \
    -H "x-api-key: xq_YOUR_KEY_HERE" | jq
  ```

  ```bash Resume page theme={null}
  curl -G "https://xquik.com/api/v1/x/users/xquikcom/following" \
    --data-urlencode "cursor=DAACCgACGE..." \
    --data-urlencode "pageSize=200" \
    -H "x-api-key: xq_YOUR_KEY_HERE" | jq
  ```

  ```javascript Node.js theme={null}
  const userIdOrUsername = "44196397";
  let pageCursor = "";

  for (let pageIndex = 0; pageIndex < 3; pageIndex += 1) {
    const params = new URLSearchParams({ pageSize: "200" });
    if (pageCursor !== "") params.set("cursor", pageCursor);

    const response = await fetch(
      `https://xquik.com/api/v1/x/users/${userIdOrUsername}/following?${params}`,
      { headers: { "x-api-key": "xq_YOUR_KEY_HERE" } },
    );
    const page = await response.json();
    if (!response.ok) throw new Error(JSON.stringify(page));

    const audienceRows = page.users.map((user) => ({
      source_user_id_or_username: userIdOrUsername,
      x_user_id: user.id,
      x_username: user.username,
      display_name: user.name,
      bio: user.description ?? null,
      follower_count: user.followers ?? null,
      following_count: user.following ?? null,
      verified: user.verified ?? false,
      profile_image_url: user.profilePicture ?? null,
      page_index: pageIndex,
      page_cursor: pageCursor,
      next_cursor: page.next_cursor,
      has_next_page: page.has_next_page,
    }));
    for (const row of audienceRows) process.stdout.write(`${JSON.stringify(row)}\n`);

    if (!page.has_next_page || page.next_cursor === "") break;
    pageCursor = page.next_cursor;
  }
  ```

  ```python Python theme={null}
  import json
  import requests

  user_id_or_username = "44196397"
  page_cursor = ""

  for page_index in range(3):
      params = {"pageSize": "200"}
      if page_cursor:
          params["cursor"] = page_cursor

      response = requests.get(
          f"https://xquik.com/api/v1/x/users/{user_id_or_username}/following",
          params=params,
          headers={"x-api-key": "xq_YOUR_KEY_HERE"},
      )
      page = response.json()
      if not response.ok:
          raise RuntimeError(page)

      for user in page["users"]:
          audience_row = {
              "source_user_id_or_username": user_id_or_username,
              "x_user_id": user["id"],
              "x_username": user["username"],
              "display_name": user["name"],
              "bio": user.get("description"),
              "follower_count": user.get("followers"),
              "following_count": user.get("following"),
              "verified": user.get("verified", False),
              "profile_image_url": user.get("profilePicture"),
              "page_index": page_index,
              "page_cursor": page_cursor,
              "next_cursor": page["next_cursor"],
              "has_next_page": page["has_next_page"],
          }
          print(json.dumps(audience_row, separators=(",", ":")))

      if not page["has_next_page"] or not page["next_cursor"]:
          break
      page_cursor = page["next_cursor"]
  ```
</CodeGroup>

The Node.js and Python snippets write JSON Lines audience rows instead of raw
following pages. Persist each mapped row and the latest `next_cursor` in your
sync job so it can resume from the last completed page.

## Direct following handoff

Use `GET /x/users/{id}/following` when a CRM, warehouse, audience, or agent workflow needs one paginated JSON page of accounts followed by a user now. The endpoint accepts either a username or numeric user ID and returns followed account profile rows with cursor fields. Use [`following_explorer`](/api-reference/extractions/create) when you need an estimated job, saved extraction, or CSV/JSON/XLSX file export.

<CardGroup cols={2}>
  <Card title="Following rows" icon="list-tree">
    Store `users[]` as the followed account profile rows returned on this page.
  </Card>

  <Card title="Stable upserts" icon="key-round">
    Store `users[].id` as `x_user_id` for CRM, warehouse, audience, and agent dedupe.
  </Card>

  <Card title="Readable labels" icon="badge">
    Store `users[].username` and `users[].name` for handles, labels, segments, and review queues.
  </Card>

  <Card title="Profile enrichment" icon="file-text">
    Store `users[].description`, `location`, `url`, `profilePicture`, and `coverPicture` when returned.
  </Card>

  <Card title="Next page" icon="arrow-right">
    Store `has_next_page` and `next_cursor`; pass `next_cursor` back as `cursor` only when `has_next_page` is true.
  </Card>

  <Card title="Page size" icon="rows-3">
    Set `pageSize` from 20 to 200. Use `cursor`; `after` is a legacy alias.
  </Card>
</CardGroup>

Direct following calls cost 1 credit per user returned. Low credit balances can return fewer users than a full page; zero affordable results return `402 insufficient_credits`. For MPP callers, this endpoint is billed as a session at USD 0.00015 per user returned.

## Path parameters

<ParamField path="id" type="string" required>
  User ID (numeric) or username.
</ParamField>

## Query parameters

<ParamField query="cursor" type="string">
  Pagination cursor from `next_cursor` in a previous response. Omit for the
  first page. Pass a cursor only when `has_next_page` is true.
</ParamField>

<ParamField query="after" type="string">
  Legacy cursor alias. Use `cursor`; when both are present, `cursor` wins.
</ParamField>

<ParamField query="pageSize" type="number">
  Results per page. Range: 20-200. Default: `200`. Remaining credits can reduce
  the returned row count.
</ParamField>

<ParamField query="limit" type="number">
  Legacy page size alias. Use `pageSize`; when both are present, `pageSize` wins.
</ParamField>

## Which following endpoint?

<CardGroup cols={2}>
  <Card title="One user's following" icon="user-plus">
    Use `GET /x/users/{id}/following` for the accounts one profile follows.
  </Card>

  <Card title="One user's followers" icon="users-round">
    Use [`GET /x/users/{id}/followers`](/api-reference/x/followers) for the
    accounts that follow that profile.
  </Card>

  <Card title="Verified followers" icon="badge-check">
    Use [`GET /x/users/{id}/verified-followers`](/api-reference/x/verified-followers)
    when you only need verified followers of the profile.
  </Card>

  <Card title="Saved exports" icon="file-spreadsheet">
    Use [`following_explorer`](/api-reference/extractions/create) for a saved
    following extraction with CSV, JSON, or XLSX download handoff.
  </Card>
</CardGroup>

## Headers

<ParamField header="x-api-key" type="string" required>
  Your API key. Session cookie authentication is also supported.
</ParamField>

## Response

<Tabs>
  <Tab title="200 OK">
    <ResponseField name="users" type="object[]">
      Array of user profiles being followed.

      <Expandable title="User object fields">
        <ResponseField name="id" type="string">X user ID.</ResponseField>
        <ResponseField name="username" type="string">X username.</ResponseField>
        <ResponseField name="name" type="string">Display name.</ResponseField>
        <ResponseField name="description" type="string">Profile bio. Omitted if empty.</ResponseField>
        <ResponseField name="followers" type="number">Follower count.</ResponseField>
        <ResponseField name="following" type="number">Following count.</ResponseField>
        <ResponseField name="verified" type="boolean">Whether the user is verified.</ResponseField>
        <ResponseField name="profilePicture" type="string">Profile picture URL.</ResponseField>
        <ResponseField name="location" type="string">Profile location. Omitted if empty.</ResponseField>
        <ResponseField name="createdAt" type="string">ISO 8601 account creation timestamp.</ResponseField>
        <ResponseField name="statusesCount" type="number">Total number of tweets posted. Omitted if unavailable.</ResponseField>
        <ResponseField name="coverPicture" type="string">Cover/banner image URL. Omitted if unavailable.</ResponseField>
        <ResponseField name="mediaCount" type="number">Total number of media tweets posted. Omitted if unavailable.</ResponseField>
        <ResponseField name="canDm" type="boolean">Whether the user accepts direct messages. Omitted if unavailable.</ResponseField>
        <ResponseField name="url" type="string">Website URL from profile. Omitted if empty.</ResponseField>
        <ResponseField name="favouritesCount" type="number">Total number of tweets liked. Omitted if unavailable.</ResponseField>
        <ResponseField name="hasCustomTimelines" type="boolean">Whether the user has custom timelines. Omitted if unavailable.</ResponseField>
        <ResponseField name="isTranslator" type="boolean">Whether the user is an X translator. Omitted if unavailable.</ResponseField>
        <ResponseField name="withheldInCountries" type="string[]">Country codes where the account is withheld. Omitted if empty.</ResponseField>
        <ResponseField name="possiblySensitive" type="boolean">Whether the account is flagged as possibly sensitive. Omitted if unavailable.</ResponseField>
        <ResponseField name="pinnedTweetIds" type="string[]">IDs of pinned tweets. Omitted if none.</ResponseField>
        <ResponseField name="isAutomated" type="boolean">Whether the account is marked as automated. Omitted if unavailable.</ResponseField>
        <ResponseField name="automatedBy" type="string">Username of the account operator if automated. Omitted if not automated.</ResponseField>
        <ResponseField name="unavailable" type="boolean">Whether the account is unavailable. Omitted if available.</ResponseField>
        <ResponseField name="unavailableReason" type="string">Reason the account is unavailable. Omitted if available.</ResponseField>
        <ResponseField name="verifiedType" type="string">Verification type (e.g. `Business`, `Government`). Omitted if not verified or standard blue check.</ResponseField>
        <ResponseField name="profile_bio" type="object">Structured profile bio with entity annotations. Omitted if unavailable.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="has_next_page" type="boolean">Whether more results are available.</ResponseField>
    <ResponseField name="next_cursor" type="string">Cursor for the next page.</ResponseField>

    ```json theme={null}
    {
      "users": [
        {
          "id": "987654321",
          "username": "xquikcom",
          "name": "Xquik",
          "followers": 10000,
          "verified": true
        }
      ],
      "has_next_page": true,
      "next_cursor": "DAACCgACGE..."
    }
    ```
  </Tab>

  <Tab title="400 Invalid user ID">
    ```json theme={null}
    { "error": "invalid_user_id", "message": "User not found or invalid user ID. Check the username or ID." }
    ```
  </Tab>

  <Tab title="404 User not found">
    ```json theme={null}
    { "error": "user_not_found", "message": "X user not found. Check the username." }
    ```
  </Tab>

  <Tab title="401 Unauthenticated">
    ```json theme={null}
    { "error": "unauthenticated" }
    ```
  </Tab>

  <Tab title="402 Subscription required">
    ```json theme={null}
    { "error": "no_subscription" }
    ```

    No active subscription or insufficient credits. Possible error values: `no_subscription`, `subscription_inactive`, `no_credits`, `insufficient_credits`.
  </Tab>

  <Tab title="502 X API unavailable">
    ```json theme={null}
    { "error": "x_api_unavailable" }
    ```

    The read service returned an error. Retry after a short delay.
  </Tab>

  <Tab title="429 Rate Limit Exceeded">
    ```json theme={null}
    { "error": "rate_limit_exceeded", "retryAfter": 60 }
    ```

    Your tier rate limit was exceeded. Wait for the `Retry-After` header before retrying.
  </Tab>

  <Tab title="424 Dependency Failed">
    ```json theme={null}
    { "error": "x_api_unavailable" }
    ```

    The normalized v1 response contract can return 424 when the read service is unavailable.
  </Tab>
</Tabs>

<Note>
  **Related:** [Get followers](/api-reference/x/followers) · [Get verified followers](/api-reference/x/verified-followers) · [Get followers you know](/api-reference/x/followers-you-know)
</Note>
