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

# Fetch an X user profile by handle



## OpenAPI

````yaml /openapi.json post /x/get-user
openapi: 3.1.0
info:
  title: Bridgly API
  description: >-
    Web scraping API for LinkedIn, X (Twitter) and Reddit. Authenticated
    endpoints accept a Bridgly API key (`bgly_…`) via `Authorization: Bearer
    <token>`.
  version: 1.0.0
servers:
  - url: https://api.bridgly.app
    description: Production
security: []
tags:
  - name: LinkedIn
    description: Scrape LinkedIn profiles, companies, posts, and search.
  - name: Reddit
    description: Scrape Reddit posts, subreddits, users, and search.
  - name: X (Twitter)
    description: Scrape tweets and search X.
paths:
  /x/get-user:
    post:
      tags:
        - X (Twitter)
      summary: Fetch an X user profile by handle
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                handle:
                  type: string
                  description: X handle / screen name without the @, e.g. "elonmusk".
              required:
                - handle
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  timeMs:
                    type: number
                    description: >-
                      Wall-clock time the request took to complete, in
                      milliseconds.
                  creditsCost:
                    type: number
                    description: Number of account credits this request consumed.
                  data:
                    type: object
                    properties:
                      userId:
                        type: string
                        description: Numeric user ID (rest_id)
                      username:
                        type: string
                        description: Handle without the @ e.g. "elonmusk"
                      profileUrl:
                        type: string
                        description: Canonical profile URL e.g. "https://x.com/elonmusk"
                      displayName:
                        type: string
                        description: Profile display name
                      bio:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Profile bio / description
                      avatarUrl:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Profile image URL
                      bannerUrl:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Profile banner image URL
                      location:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Self-reported location
                      websiteUrl:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Linked website (expanded URL)
                      bioUrls:
                        type: array
                        items:
                          type: object
                          properties:
                            url:
                              type: string
                              description: >-
                                Expanded destination URL of a link embedded in
                                the bio text
                            displayUrl:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                Shortened display form of the link e.g.
                                "example.com/books"
                          required:
                            - url
                            - displayUrl
                          additionalProperties: false
                        description: >-
                          Expanded links embedded in the bio text; empty when
                          none
                      followerCount:
                        type: number
                        description: Number of followers
                      followingCount:
                        type: number
                        description: Number of accounts followed
                      fastFollowersCount:
                        anyOf:
                          - type: number
                          - type: 'null'
                        description: >-
                          Subset of followers counted as "fast" (spam-ish)
                          followers
                      normalFollowersCount:
                        anyOf:
                          - type: number
                          - type: 'null'
                        description: Followers excluding fast followers
                      tweetCount:
                        type: number
                        description: Number of tweets posted (statuses_count)
                      likeCount:
                        anyOf:
                          - type: number
                          - type: 'null'
                        description: Number of tweets liked (favourites_count)
                      mediaCount:
                        anyOf:
                          - type: number
                          - type: 'null'
                        description: Number of media items posted
                      listedCount:
                        anyOf:
                          - type: number
                          - type: 'null'
                        description: Number of lists the user appears on
                      creatorSubscriptionsCount:
                        anyOf:
                          - type: number
                          - type: 'null'
                        description: Number of paid subscribers to this creator
                      highlightedTweetsCount:
                        anyOf:
                          - type: number
                          - type: 'null'
                        description: Number of tweets pinned to the profile Highlights tab
                      pinnedTweetId:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: >-
                          Numeric ID of the pinned tweet — resolve via the tweet
                          endpoint
                      pinnedTweetUrl:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Canonical URL of the pinned tweet
                      isVerified:
                        type: boolean
                        description: Legacy verified badge
                      isBlueVerified:
                        type: boolean
                        description: X Premium (blue) verified
                      verifiedType:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: >-
                          Org verification tier e.g. "Business" or "Government";
                          null for personal accounts
                      isIdentityVerified:
                        type: boolean
                        description: Whether the account passed X identity verification
                      isProtected:
                        type: boolean
                        description: Whether the account is protected/private
                      canDm:
                        anyOf:
                          - type: boolean
                          - type: 'null'
                        description: >-
                          Whether the viewer can send this account a direct
                          message
                      professionalType:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Professional account type e.g. "Creator" or "Business"
                      professionalId:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Stable id of the linked professional/business profile
                      professionalCategoryId:
                        anyOf:
                          - type: number
                          - type: 'null'
                        description: >-
                          Stable professional category ID e.g. 580 for "Media &
                          News Company"
                      professionalCategoryName:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: >-
                          Professional category label paired with
                          professionalCategoryId
                      affiliate:
                        anyOf:
                          - type: object
                            properties:
                              label:
                                type: string
                                description: >-
                                  Parent org display label e.g. "X" on an @X
                                  affiliate
                              username:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                                description: >-
                                  Parent org handle (without @) — resolve via
                                  the user endpoint
                              profileUrl:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                                description: >-
                                  Canonical URL of the parent account this user
                                  is affiliated to
                              badgeUrl:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                                description: >-
                                  Parent org's badge image shown next to the
                                  affiliate
                            required:
                              - label
                              - username
                              - profileUrl
                              - badgeUrl
                            additionalProperties: false
                          - type: 'null'
                        description: >-
                          Parent org this account is a verified affiliate of,
                          with its profile URL
                      tipJar:
                        anyOf:
                          - type: object
                            properties:
                              isEnabled:
                                type: boolean
                                description: >-
                                  Whether the user has tipping enabled on their
                                  profile
                              bitcoinHandle:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                                description: >-
                                  Bitcoin wallet address the user accepts tips
                                  at
                              ethereumHandle:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                                description: >-
                                  Ethereum wallet address the user accepts tips
                                  at
                              venmoHandle:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                                description: Venmo handle (without @)
                              venmoUrl:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                                description: >-
                                  Canonical Venmo profile URL e.g.
                                  "https://venmo.com/handle"
                              cashAppHandle:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                                description: Cash App cashtag (without $)
                              cashAppUrl:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                                description: >-
                                  Canonical Cash App URL e.g.
                                  "https://cash.app/$handle"
                              patreonHandle:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                                description: Patreon handle (without @)
                              patreonUrl:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                                description: >-
                                  Canonical Patreon URL e.g.
                                  "https://www.patreon.com/handle"
                            required:
                              - isEnabled
                              - bitcoinHandle
                              - ethereumHandle
                              - venmoHandle
                              - venmoUrl
                              - cashAppHandle
                              - cashAppUrl
                              - patreonHandle
                              - patreonUrl
                            additionalProperties: false
                          - type: 'null'
                        description: >-
                          External tip/payment handles (crypto wallets,
                          Venmo/Cash App/Patreon) the user accepts tips at; null
                          when none set
                      createdAt:
                        anyOf:
                          - type: string
                            format: date-time
                          - type: 'null'
                        description: When the account was created
                    required:
                      - userId
                      - username
                      - profileUrl
                      - displayName
                      - bio
                      - avatarUrl
                      - bannerUrl
                      - location
                      - websiteUrl
                      - bioUrls
                      - followerCount
                      - followingCount
                      - fastFollowersCount
                      - normalFollowersCount
                      - tweetCount
                      - likeCount
                      - mediaCount
                      - listedCount
                      - creatorSubscriptionsCount
                      - highlightedTweetsCount
                      - pinnedTweetId
                      - pinnedTweetUrl
                      - isVerified
                      - isBlueVerified
                      - verifiedType
                      - isIdentityVerified
                      - isProtected
                      - canDm
                      - professionalType
                      - professionalId
                      - professionalCategoryId
                      - professionalCategoryName
                      - affiliate
                      - tipJar
                      - createdAt
                    additionalProperties: false
                required:
                  - timeMs
                  - creditsCost
                  - data
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '402':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: typescript
          label: Bridgly SDK
          source: |-
            import { Bridgly } from 'bridgly';

            const client = new Bridgly({ apiKey: process.env.BRIDGLY_API_KEY });

            const res = await client.x.getUser({
              handle: "string",
            });
            if (res.type === 'success') console.log(res.data);
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A Bridgly API key (`bgly_…`). Metered endpoints deduct credits from the
        resolved account.

````