Sand AISand AI MAGI-2MAGI-2 è ora su SandBase: video in 1080p con audio nativoProvalo ora

X (Twitter) User Mentions

Documentazione API
https://api.sandbase.ai/v1/api/twitter/user-mentions

Recent tweets that mention a user by username, with optional time range and cursor pagination.

Prezzo
Da $0.003USD / chiamata
Metodo
POST
Risposta
JSON
Parametri
1 obbligatori · 3 opzionali

Playground

Input
The user screen name to get mentions for.
The cursor to paginate through the results. First page is empty.
On or after a specified unix timestamp in seconds. Provider reference (supplier schema): `{"format":"int64","type":"integer"}`. Intervallo: da 0 a 9223372036854776000.
Before a specified unix timestamp in seconds. Provider reference (supplier schema): `{"format":"int64","type":"integer"}`. Intervallo: da 0 a 9223372036854776000.
OutputPronto

Il tuo output apparirà qui

Completa gli input, poi fai clic su Esegui.

README API

X (Twitter) User Mentions API

Returns recent tweets that mention a given X (Twitter) user. Each tweet includes its text, author, engagement counts, reply context and the users it mentions. The only required input is userName, the screen name without the @ sign.

Use cases

  • Track public replies and mentions of a brand or agency account such as NASA.
  • Collect mention text for sentiment or topic analysis over a chosen time window.
  • Find high-view posts that tag an account so a team can respond to them.
  • Build a feed of links shared in tweets that mention a user, using entities.urls.

Request

curl -X POST "https://api.sandbase.ai/v1/api/twitter/user-mentions" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"userName": "NASA"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
userNamestringYesThe user screen name to get mentions for.
cursorstringNoThe cursor to paginate through the results. First page is empty.
sinceTimeintegerNoOn or after a specified unix timestamp in seconds. Provider reference (supplier schema): {"format":"int64","type":"integer"}.
untilTimeintegerNoBefore a specified unix timestamp in seconds. Provider reference (supplier schema): {"format":"int64","type":"integer"}.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "has_next_page": true,
  "msg": "success",
  "next_cursor": "DAADDAABCgABHWLxy4mbQVkKAAIdYutU-ZuRPQAIAAIAAAACCAADAAAAAAgABAAAAAAKAAUdYvROi0An…",
  "status": "success",
  "tweets": [
    {
      "article": null,
      "author": {
        "affiliatesHighlightedLabel": {},
        "automatedBy": null,
        "canDm": true,
        "canMediaTag": true,
        "coverPicture": "",
        "createdAt": "Sun Oct 03 21:27:35 +0000 2021",
        "description": "",
        "entities": {
          "description": {
            "urls": []
          },
          "url": {}
        }
      },
      "bookmarkCount": 0,
      "card": {
        "binding_values": [
          {
            "key": "photo_image_full_size_large",
            "value": {
              "image_value": {
                "height": 419,
                "url": "https://pbs.twimg.com/card_img/2117520633382965248/Mw80kojC?format=jpg&name=800x…",
                "width": 800
              }
            }
          }
        ],
        "card_platform": {
          "platform": {
            "audience": {
              "name": "production"
            },
            "device": {
              "name": "iPhone",
              "version": "13"
            }
          }
        },
        "name": "summary_large_image",
        "url": "https://t.co/FZqZ4fF9Ta",
        "user_refs_results": []
      },
      "communityInfo": null,
      "conversationId": "2116999144376340883",
      "createdAt": "Tue Nov 03 07:33:54 +0000 2026",
      "displayTextRange": [
        6
      ],
      "entities": {
        "urls": [
          {
            "display_url": "tiktok.com/t/ZPLuYSyTT/",
            "expanded_url": "https://www.tiktok.com/t/ZPLuYSyTT/",
            "indices": [
              6
            ],
            "url": "https://t.co/FZqZ4fF9Ta"
          }
        ],
        "user_mentions": [
          {
            "id_str": "11348282",
            "indices": [
              0
            ],
            "name": "NASA",
            "screen_name": "NASA"
          }
        ]
      },
      "extendedEntities": {},
      "id": "2117520631306862937",
      "inReplyToId": "2117516836212462064"
    }
  ]
}

Response fields

FieldMeaning
tweets[]List of tweets that mention the requested user, newest first in the sample.
tweets[].id / tweets[].url / tweets[].twitterUrlTweet ID and the links to the tweet on x.com and twitter.com.
tweets[].textFull text of the tweet, including the leading @mentions and shortened t.co links.
tweets[].createdAtTime the tweet was posted, as a string like Tue Nov 03 07:33:54 +0000 2026.
tweets[].likeCount / tweets[].replyCount / tweets[].retweetCount / tweets[].quoteCount / tweets[].bookmarkCount / tweets[].viewCountEngagement counts for the tweet.
tweets[].isReply / tweets[].inReplyToId / tweets[].inReplyToUsernameShows whether the tweet is a reply, and gives the ID and username of the tweet or user it answers.
tweets[].conversationIdID of the first tweet in the conversation thread this tweet belongs to.
tweets[].entities.user_mentions[]Users mentioned in the tweet, with id_str, name and screen_name.
tweets[].entities.urls[]Links in the tweet, with the short url, the expanded_url and the display_url.
has_next_page / next_cursorhas_next_page says whether more results exist. next_cursor is the value to send as cursor for the next page.

Notes

  • Pass userName as the plain screen name, for example NASA.
  • For the first page, leave cursor empty. For the next page, send the next_cursor value as cursor while has_next_page is true.
  • Use sinceTime (on or after) and untilTime (before) as unix timestamps in seconds to limit the time range.
  • To read a full conversation for a tweet, pass its id to Twitter Post Comments or X / Twitter Tweet Thread.

Pricing

Billed at the actual cost of each call, about $0.003 for the request above. Failed calls are not charged.

Esplora altro

API correlate

Tutte le API
APIPrezzoRisposta
X (Twitter)Da $0.003 per chiamataJSON
X (Twitter)Da $0.00054 per chiamataJSON
TwitterDa $0.0006 per chiamataJSON asincrono
X (Twitter)Da $0.0001 per chiamataJSON
X (Twitter)Da $0.0036 per chiamataJSON
X (Twitter)Da $0.00045 per chiamataJSON

Guide:X API alternative: pay per call, not per postBest Twitter API in 2026: X API Pricing Compared

Domande

FAQ

Come uso l'API X (Twitter) User Mentions?

Invia una richiesta POST a https://api.sandbase.ai/v1/api/twitter/user-mentions con la tua chiave API di SandBase nell'header Authorization (Bearer) e i parametri nel body JSON. Puoi anche provarla nel Playground di questa pagina senza scrivere codice.

Quanto costa l'API X (Twitter) User Mentions?

A partire da $0.003 per chiamata, addebitato dal tuo saldo SandBase. Paghi solo le chiamate che effettui; non c'è alcun abbonamento.

Quali parametri accetta l'API X (Twitter) User Mentions?

Richiesti: userName (string). Facoltativi: cursor (string), sinceTime (integer) e untilTime (integer). La tabella dei parametri e il Playground di questa pagina elencano tutti i campi.

Cosa restituisce l'API X (Twitter) User Mentions?

Una risposta JSON restituita nella stessa richiesta HTTP (sincrona). Il README di questa pagina include una risposta di esempio.

Mi serve un account sviluppatore o una chiave API X (Twitter)?

No. X (Twitter) User Mentions funziona tramite SandBase, quindi una sola chiave API SandBase copre questo endpoint e tutte le altre API e modelli del catalogo. Non è necessario richiedere separatamente l'accesso alle API X (Twitter).