Piloterr X API

The X API from Piloterr — 2 operation(s) for x.

GitHub OpenAPI

Operations 4

GET /v2/x/profile/info X Profile Info (twitter) #
POST /v2/x/profile/info X Profile Info (twitter) #
GET /v2/x/post/info X Post Info (twitter) #
POST /v2/x/post/info X Post Info (twitter) #

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/piloterr-com:piloterr-com-x-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

piloterr-com-x-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Piloterr API Reference X API
  description: Complete API reference documentation.
  version: 1.0.0
servers:
- url: https://api.piloterr.com
  description: API Server
tags:
- name: X
paths:
  /v2/x/profile/info:
    get:
      summary: X Profile Info (twitter)
      description: 'X Profile Info API: fetch public X/Twitter profile data (bio, followers, verification, avatars) from a username or URL via browser rendering.


        **Credit cost:** 2 credits per call'
      operationId: get-x-profile-info
      security:
      - ApiKeyAuth: []
      parameters:
      - name: query
        in: query
        required: true
        description: 'X profile to look up. Accepts a username, @handle, or profile URL.


          **Examples:**


          ```

          elonmusk

          ```


          ```

          @example-user

          ```


          ```

          https://x.com/example-user

          ```


          **Notes:**

          - Legacy `twitter.com` URLs are supported.

          - **Rejected (400):** search URLs, status/tweet URLs, invalid handles.

          - X Search is not supported by this API.'
        schema:
          type: string
          description: 'X profile to look up. Accepts a username, @handle, or profile URL.


            **Examples:**


            ```

            elonmusk

            ```


            ```

            @example-user

            ```


            ```

            https://x.com/example-user

            ```


            **Notes:**

            - Legacy `twitter.com` URLs are supported.

            - **Rejected (400):** search URLs, status/tweet URLs, invalid handles.

            - X Search is not supported by this API.'
      - name: return_page_source
        in: query
        required: false
        description: 'When `true`, return the raw HTML page source as `{"result": "..."}` instead of structured JSON. Defaults to `false`.'
        schema:
          type: boolean
          description: 'When `true`, return the raw HTML page source as `{"result": "..."}` instead of structured JSON. Defaults to `false`.'
      - $ref: '#/components/parameters/fields'
      - $ref: '#/components/parameters/is_async'
      - $ref: '#/components/parameters/soft_fail'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                  name:
                    type: string
                  user_id:
                    type: string
                  location:
                    nullable: true
                  username:
                    type: string
                  verified:
                    type: boolean
                  created_at:
                    type: string
                  description:
                    type: string
                  tweet_count:
                    type: integer
                  followers_count:
                    type: integer
                  following_count:
                    type: integer
                  profile_image_url:
                    type: string
                  profile_banner_url:
                    type: string
                  profile_image_url_normal:
                    type: string
              examples:
                Profile @example-user on x.com:
                  value:
                    url: https://x.com/example-user
                    name: Alex Martin
                    user_id: '00000000'
                    location: null
                    username: example-user
                    verified: true
                    created_at: '2009-06-02T20:12:29.000Z'
                    description: Example profile.
                    tweet_count: 104989
                    followers_count: 240609640
                    following_count: 1366
                    profile_image_url: https://pbs.twimg.com/placeholder/example-user.jpg
                    profile_banner_url: https://pbs.twimg.com/placeholder/example-user.jpg
                    profile_image_url_normal: https://pbs.twimg.com/placeholder/example-user.jpg
        '400':
          description: Bad Request — missing or invalid parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Bad Request
        '401':
          description: Unauthorized — the API key is missing, invalid, inactive, or expired, or a rate limit was exceeded (`Rate limit exceeded…` message).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalidKey:
                  value:
                    error: Invalid API Key
                planRateLimit:
                  value:
                    error: 'Rate limit exceeded: You''ve exceeded the per second rate limit on your subscription'
                keyQuota:
                  value:
                    error: 'Rate limit exceeded for the API key: quota monthly'
        '402':
          description: Payment Required — your subscription or credit balance is insufficient.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Payment required
        '500':
          description: Internal Server Error — something went wrong on our side.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Internal Error
      tags:
      - X
    post:
      summary: X Profile Info (twitter)
      description: 'X Profile Info API: fetch public X/Twitter profile data (bio, followers, verification, avatars) from a username or URL via browser rendering.


        **Credit cost:** 2 credits per call'
      operationId: post-x-profile-info
      security:
      - ApiKeyAuth: []
      parameters:
      - $ref: '#/components/parameters/fields'
      - $ref: '#/components/parameters/is_async'
      - $ref: '#/components/parameters/soft_fail'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                  description: 'X profile to look up. Accepts a username, @handle, or profile URL.


                    **Examples:**


                    ```

                    elonmusk

                    ```


                    ```

                    @example-user

                    ```


                    ```

                    https://x.com/example-user

                    ```


                    **Notes:**

                    - Legacy `twitter.com` URLs are supported.

                    - **Rejected (400):** search URLs, status/tweet URLs, invalid handles.

                    - X Search is not supported by this API.'
                return_page_source:
                  type: boolean
                  description: 'When `true`, return the raw HTML page source as `{"result": "..."}` instead of structured JSON. Defaults to `false`.'
              required:
              - query
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                  name:
                    type: string
                  user_id:
                    type: string
                  location:
                    nullable: true
                  username:
                    type: string
                  verified:
                    type: boolean
                  created_at:
                    type: string
                  description:
                    type: string
                  tweet_count:
                    type: integer
                  followers_count:
                    type: integer
                  following_count:
                    type: integer
                  profile_image_url:
                    type: string
                  profile_banner_url:
                    type: string
                  profile_image_url_normal:
                    type: string
              examples:
                Profile @example-user on x.com:
                  value:
                    url: https://x.com/example-user
                    name: Alex Martin
                    user_id: '00000000'
                    location: null
                    username: example-user
                    verified: true
                    created_at: '2009-06-02T20:12:29.000Z'
                    description: Example profile.
                    tweet_count: 104989
                    followers_count: 240609640
                    following_count: 1366
                    profile_image_url: https://pbs.twimg.com/placeholder/example-user.jpg
                    profile_banner_url: https://pbs.twimg.com/placeholder/example-user.jpg
                    profile_image_url_normal: https://pbs.twimg.com/placeholder/example-user.jpg
        '400':
          description: Bad Request — missing or invalid parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Bad Request
        '401':
          description: Unauthorized — the API key is missing, invalid, inactive, or expired, or a rate limit was exceeded (`Rate limit exceeded…` message).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalidKey:
                  value:
                    error: Invalid API Key
                planRateLimit:
                  value:
                    error: 'Rate limit exceeded: You''ve exceeded the per second rate limit on your subscription'
                keyQuota:
                  value:
                    error: 'Rate limit exceeded for the API key: quota monthly'
        '402':
          description: Payment Required — your subscription or credit balance is insufficient.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Payment required
        '500':
          description: Internal Server Error — something went wrong on our side.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Internal Error
      tags:
      - X
  /v2/x/post/info:
    get:
      summary: X Post Info (twitter)
      description: 'X Post Info API: fetch public tweet data (text, likes, retweets, views, media) from a status URL or tweet ID via browser rendering.


        **Credit cost:** 2 credits per call'
      operationId: get-x-post-info
      security:
      - ApiKeyAuth: []
      parameters:
      - name: query
        in: query
        required: true
        description: 'X tweet to retrieve. Accepts a full status URL or numeric tweet ID.


          **Examples:**


          ```

          https://x.com/example-user/status/0000000000000000001

          ```


          ```

          2070215849970119090

          ```


          **Notes:**

          - Legacy `twitter.com` status URLs are supported.

          - `created_at` and `name` may be null when not shown on the rendered page.'
        schema:
          type: string
          description: 'X tweet to retrieve. Accepts a full status URL or numeric tweet ID.


            **Examples:**


            ```

            https://x.com/example-user/status/0000000000000000001

            ```


            ```

            2070215849970119090

            ```


            **Notes:**

            - Legacy `twitter.com` status URLs are supported.

            - `created_at` and `name` may be null when not shown on the rendered page.'
      - name: return_page_source
        in: query
        required: false
        description: 'When `true`, return the raw HTML page source as `{"result": "..."}` instead of structured JSON. Defaults to `false`.'
        schema:
          type: boolean
          description: 'When `true`, return the raw HTML page source as `{"result": "..."}` instead of structured JSON. Defaults to `false`.'
      - $ref: '#/components/parameters/fields'
      - $ref: '#/components/parameters/is_async'
      - $ref: '#/components/parameters/soft_fail'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                  name:
                    nullable: true
                  text:
                    type: string
                  media:
                    type: array
                    items:
                      type: string
                  tweet_id:
                    type: string
                  username:
                    type: string
                  verified:
                    type: boolean
                  created_at:
                    nullable: true
                  like_count:
                    type: integer
                  view_count:
                    type: integer
                  reply_count:
                    type: integer
                  retweet_count:
                    type: integer
              examples:
                Post by @example-user on x.com:
                  value:
                    url: https://x.com/example-user/status/0000000000000000001
                    name: null
                    text: Grok Imagine Video has become the clear leader in @vercel AI Gateway, now amounting to ~50% of videos generated by developers 🤯 vercel.com/ai-gateway/lea…
                    media:
                    - https://pbs.twimg.com/media/HLrgznVbwAAG4y8.png
                    tweet_id: '0000000000000000001'
                    username: example-user
                    verified: true
                    created_at: null
                    like_count: 2517
                    view_count: 232
                    reply_count: 279
                    retweet_count: 791
        '400':
          description: Bad Request — missing or invalid parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Bad Request
        '401':
          description: Unauthorized — the API key is missing, invalid, inactive, or expired, or a rate limit was exceeded (`Rate limit exceeded…` message).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalidKey:
                  value:
                    error: Invalid API Key
                planRateLimit:
                  value:
                    error: 'Rate limit exceeded: You''ve exceeded the per second rate limit on your subscription'
                keyQuota:
                  value:
                    error: 'Rate limit exceeded for the API key: quota monthly'
        '402':
          description: Payment Required — your subscription or credit balance is insufficient.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Payment required
        '500':
          description: Internal Server Error — something went wrong on our side.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Internal Error
      tags:
      - X
    post:
      summary: X Post Info (twitter)
      description: 'X Post Info API: fetch public tweet data (text, likes, retweets, views, media) from a status URL or tweet ID via browser rendering.


        **Credit cost:** 2 credits per call'
      operationId: post-x-post-info
      security:
      - ApiKeyAuth: []
      parameters:
      - $ref: '#/components/parameters/fields'
      - $ref: '#/components/parameters/is_async'
      - $ref: '#/components/parameters/soft_fail'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                  description: 'X tweet to retrieve. Accepts a full status URL or numeric tweet ID.


                    **Examples:**


                    ```

                    https://x.com/example-user/status/0000000000000000001

                    ```


                    ```

                    2070215849970119090

                    ```


                    **Notes:**

                    - Legacy `twitter.com` status URLs are supported.

                    - `created_at` and `name` may be null when not shown on the rendered page.'
                return_page_source:
                  type: boolean
                  description: 'When `true`, return the raw HTML page source as `{"result": "..."}` instead of structured JSON. Defaults to `false`.'
              required:
              - query
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                  name:
                    nullable: true
                  text:
                    type: string
                  media:
                    type: array
                    items:
                      type: string
                  tweet_id:
                    type: string
                  username:
                    type: string
                  verified:
                    type: boolean
                  created_at:
                    nullable: true
                  like_count:
                    type: integer
                  view_count:
                    type: integer
                  reply_count:
                    type: integer
                  retweet_count:
                    type: integer
              examples:
                Post by @example-user on x.com:
                  value:
                    url: https://x.com/example-user/status/0000000000000000001
                    name: null
                    text: Grok Imagine Video has become the clear leader in @vercel AI Gateway, now amounting to ~50% of videos generated by developers 🤯 vercel.com/ai-gateway/lea…
                    media:
                    - https://pbs.twimg.com/media/HLrgznVbwAAG4y8.png
                    tweet_id: '0000000000000000001'
                    username: example-user
                    verified: true
                    created_at: null
                    like_count: 2517
                    view_count: 232
                    reply_count: 279
                    retweet_count: 791
        '400':
          description: Bad Request — missing or invalid parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Bad Request
        '401':
          description: Unauthorized — the API key is missing, invalid, inactive, or expired, or a rate limit was exceeded (`Rate limit exceeded…` message).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalidKey:
                  value:
                    error: Invalid API Key
                planRateLimit:
                  value:
                    error: 'Rate limit exceeded: You''ve exceeded the per second rate limit on your subscription'
                keyQuota:
                  value:
                    error: 'Rate limit exceeded for the API key: quota monthly'
        '402':
          description: Payment Required — your subscription or credit balance is insufficient.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Payment required
        '500':
          description: Internal Server Error — something went wrong on our side.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Internal Error
      tags:
      - X
components:
  parameters:
    fields:
      name: fields
      in: query
      required: false
      description: Comma-separated list of response fields to return, with dot notation for nested fields (e.g. `name,location.city`).
      schema:
        type: string
    is_async:
      name: is_async
      in: query
      required: false
      description: 'Run the request as a background job: the API answers `202` with a `job_id` to poll on `GET /v1/jobs/{id}`.'
      schema:
        type: boolean
        default: false
    soft_fail:
      name: soft_fail
      in: query
      required: false
      description: Return HTTP 200 even when the request fails; the error is in the `error` field of the body.
      schema:
        type: boolean
        default: false
  schemas:
    ErrorResponse:
      type: object
      required:
      - error
      properties:
        error:
          type: string
          description: Human-readable error message.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Your API key. Include it in the x-api-key header for every request.