Sand AISand AI MAGI-2MAGI-2 est maintenant sur SandBase : vidéo 1080p avec audio natifEssayer maintenant

X (Twitter) User Mentions

Docs 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.

Prix
À partir de $0.003USD / appel
Méthode
POST
Réponse
JSON
Paramètres
1 obligatoires · 3 facultatifs

Bac à sable

Entrée
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"}`. Plage : de 0 à 9223372036854776000.
Before a specified unix timestamp in seconds. Provider reference (supplier schema): `{"format":"int64","type":"integer"}`. Plage : de 0 à 9223372036854776000.
SortiePrêt

Votre sortie apparaîtra ici

Complétez les entrées, puis cliquez sur Exécuter.

README de l'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.

Explorer plus

APIs associées

Toutes les APIs
APIPrixRéponse
X (Twitter)À partir de $0.003 par appelJSON
X (Twitter)À partir de $0.00054 par appelJSON
TwitterÀ partir de $0.0006 par appelJSON asynchrone
X (Twitter)À partir de $0.0001 par appelJSON
X (Twitter)À partir de $0.0036 par appelJSON
X (Twitter)À partir de $0.00045 par appelJSON

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

Questions

FAQ

Comment utiliser l’API X (Twitter) User Mentions ?

Envoyez une requête POST à https://api.sandbase.ai/v1/api/twitter/user-mentions avec votre clé API SandBase dans l’en-tête Authorization (Bearer) et les paramètres dans un corps JSON. Vous pouvez aussi l’essayer dans le Playground sur cette page sans écrire de code.

Combien coûte l’API X (Twitter) User Mentions ?

À partir de $0.003 par appel, facturé depuis votre solde SandBase. Vous ne payez que les appels que vous effectuez ; aucun abonnement.

Quels paramètres l’API X (Twitter) User Mentions accepte-t-elle ?

Obligatoire : userName (string). Facultatif : cursor (string), sinceTime (integer) et untilTime (integer). Le tableau des paramètres et le Playground sur cette page listent tous les champs.

Que renvoie l’API X (Twitter) User Mentions ?

Une réponse JSON renvoyée dans la même requête HTTP (synchrone). Le README sur cette page inclut un exemple de réponse.

Ai-je besoin d’un compte développeur ou d’une clé API X (Twitter) ?

Non. X (Twitter) User Mentions fonctionne via SandBase, donc une seule clé API SandBase couvre ce point de terminaison ainsi que toutes les autres API et tous les modèles du catalogue. Vous n’avez pas besoin de demander un accès API X (Twitter) séparément.