Sand AISand AI MAGI-2MAGI-2 ya está en SandBase: video en 1080p con audio nativoPruébalo ahora

X (Twitter) User Mentions

Documentación de la 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.

Precio
Desde $0.003USD / llamada
Método
POST
Respuesta
JSON
Parámetros
1 obligatorios · 3 opcionales

Entorno de pruebas

Entrada
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"}`. Rango: de 0 a 9223372036854776000.
Before a specified unix timestamp in seconds. Provider reference (supplier schema): `{"format":"int64","type":"integer"}`. Rango: de 0 a 9223372036854776000.
SalidaListo

Su salida aparecerá aquí

Complete las entradas y luego haga clic en Ejecutar.

README de la 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.

Explorar más

APIs relacionadas

Todas las APIs
APIPrecioRespuesta
X (Twitter)Desde $0.003 por llamadaJSON
X (Twitter)Desde $0.00054 por llamadaJSON
TwitterDesde $0.0006 por llamadaJSON asíncrono
X (Twitter)Desde $0.0001 por llamadaJSON
X (Twitter)Desde $0.0036 por llamadaJSON
X (Twitter)Desde $0.00045 por llamadaJSON

Guías:X API alternative: pay per call, not per postBest Twitter API in 2026: X API Pricing Compared

Preguntas

FAQ

¿Cómo uso la API de X (Twitter) User Mentions?

Envía una solicitud POST a https://api.sandbase.ai/v1/api/twitter/user-mentions con tu clave API de SandBase en el encabezado Authorization (Bearer) y los parámetros como un cuerpo JSON. También puedes probarlo en el Playground de esta página sin escribir código.

¿Cuánto cuesta la API de X (Twitter) User Mentions?

Desde $0.003 por llamada, facturado desde tu saldo de SandBase. Solo se te cobra por las llamadas que haces; no hay suscripción.

¿Qué parámetros acepta la API de X (Twitter) User Mentions?

Requeridos: userName (string). Opcionales: cursor (string), sinceTime (integer) y untilTime (integer). La tabla de Parámetros y el Playground de esta página enumeran todos los campos.

¿Qué devuelve la API de X (Twitter) User Mentions?

Una respuesta JSON devuelta en la misma solicitud HTTP (sincrónica). El README de esta página incluye una respuesta de ejemplo.

¿Necesito una cuenta de desarrollador o una clave API de X (Twitter)?

No. X (Twitter) User Mentions funciona a través de SandBase, así que una sola clave API de SandBase cubre este endpoint y todas las demás APIs y modelos del catálogo. No necesitas solicitar acceso a la API de X (Twitter) por separado.