Xproapi Mentions API

Tweets by others that mention a user.

GitHub OpenAPI

Operations 1

GET /twitter/user/mentions Get user mentions #

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-mentions-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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

xproapi-mentions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Xproapi.com Mentions 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: Mentions
  description: Tweets by others that mention a user.
paths:
  /twitter/user/mentions:
    get:
      tags:
      - Mentions
      operationId: mentions
      summary: Get user mentions
      description: 'Tweets by others that mention the user, newest first. Paginated with `cursor` / `next_cursor`.


        Priced per tweet returned: 20 tweets cost 210 credits.'
      externalDocs:
        url: https://xproapi.com/docs/mentions/
      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: sinceTime
        in: query
        required: false
        description: Only tweets on or after this unix time (seconds).
        schema:
          type: integer
          format: int64
          minimum: 0
      - name: untilTime
        in: query
        required: false
        description: Only tweets before this unix time (seconds).
        schema:
          type: integer
          format: int64
          minimum: 0
      - name: cursor
        in: query
        required: false
        description: next_cursor from the previous page. Empty for the first page.
        schema:
          type: string
      responses:
        '200':
          description: 'Success. Priced per tweet returned: 20 tweets cost 210 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:
                  tweets:
                    type: array
                    items:
                      $ref: '#/components/schemas/Tweet'
                  has_next_page:
                    type: boolean
                  next_cursor:
                    type: string
                  status:
                    type: string
                  message:
                    type: string
                required:
                - tweets
                - has_next_page
                - next_cursor
                - status
                - message
              example:
                tweets:
                - type: tweet
                  id: '1846987139428634858'
                  url: https://x.com/elonmusk/status/1846987139428634858
                  text: Starship flight 5 was a success
                  source: Twitter for iPhone
                  retweetCount: 12000
                  replyCount: 8400
                  likeCount: 150000
                  quoteCount: 1300
                  viewCount: 21000000
                  bookmarkCount: 2100
                  createdAt: Thu Oct 17 18:30:00 +0000 2024
                  lang: en
                  isReply: false
                  inReplyToId: null
                  conversationId: '1846987139428634858'
                  displayTextRange:
                  - 0
                  - 31
                  inReplyToUserId: null
                  inReplyToUsername: null
                  author:
                    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
                  entities:
                    hashtags: []
                    urls: []
                    user_mentions: []
                  extendedEntities: {}
                  quoted_tweet: null
                  retweeted_tweet: null
                  isLimitedReply: false
                - type: tweet
                  id: '1846990000000000000'
                  url: https://x.com/elonmusk/status/1846987139428634858
                  text: Starship flight 5 was a success
                  source: Twitter for iPhone
                  retweetCount: 12000
                  replyCount: 8400
                  likeCount: 150000
                  quoteCount: 1300
                  viewCount: 21000000
                  bookmarkCount: 2100
                  createdAt: Thu Oct 17 18:30:00 +0000 2024
                  lang: en
                  isReply: false
                  inReplyToId: null
                  conversationId: '1846987139428634858'
                  displayTextRange:
                  - 0
                  - 31
                  inReplyToUserId: null
                  inReplyToUsername: null
                  author:
                    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
                  entities:
                    hashtags: []
                    urls: []
                    user_mentions: []
                  extendedEntities: {}
                  quoted_tweet: null
                  retweeted_tweet: null
                  isLimitedReply: false
                has_next_page: true
                next_cursor: DAABCgABGc…
                status: success
                message: success
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/InsufficientCredits'
        '403':
          $ref: '#/components/responses/Forbidden'
        '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/mentions?userName=elonmusk\" \\\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.mentions("elonmusk")

          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.mentions(''elonmusk'');

          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->mentions(''elonmusk'');

          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.Mentions(ctx, \"elonmusk\", nil)\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.mentions(\"elonmusk\");\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.MentionsAsync("elonmusk");

          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
    Tweet:
      type: object
      description: A public tweet.
      required:
      - type
      - id
      - url
      - text
      - createdAt
      - author
      properties:
        type:
          type: string
          const: tweet
        id:
          type: string
          pattern: ^[0-9]+$
          description: Tweet id, as a string (64-bit).
          example: '1846987139428634858'
        url:
          type: string
          format: uri
        text:
          type: string
        source:
          type: string
        retweetCount:
          type: integer
          minimum: 0
        replyCount:
          type: integer
          minimum: 0
        likeCount:
          type: integer
          minimum: 0
        quoteCount:
          type: integer
          minimum: 0
        viewCount:
          type: integer
          minimum: 0
        bookmarkCount:
          type: integer
          minimum: 0
        createdAt:
          type: string
          description: X’s date format, e.g. "Thu Oct 17 18:30:00 +0000 2024" (UTC).
        lang:
          type: string
        isReply:
          type: boolean
        inReplyToId:
          type:
          - string
          - 'null'
        conversationId:
          type:
          - string
          - 'null'
        displayTextRange:
          type: array
          items:
            type: integer
          minItems: 2
          maxItems: 2
        inReplyToUserId:
          type:
          - string
          - 'null'
        inReplyToUsername:
          type:
          - string
          - 'null'
        author:
          $ref: '#/components/schemas/User'
        entities:
          type: object
          description: Hashtags, urls and user_mentions as X returns them.
        extendedEntities:
          type: object
          description: Media as X returns it; empty when none.
        quoted_tweet:
          oneOf:
          - $ref: '#/components/schemas/Tweet'
          - type: 'null'
        retweeted_tweet:
          oneOf:
          - $ref: '#/components/schemas/Tweet'
          - type: 'null'
        isLimitedReply:
          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
    Forbidden:
      description: The account can’t use the API (suspended or email not confirmed). Not charged.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: error
            error: 403
            message: This account can’t use the API right now.
            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
  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