X media posts API

Posts with photos or videos from one X account

GET/v1/x/media/list

Use the X media posts API to read public X media. Posts with photos or videos from one X account.

Request

Send your API key as a Bearer token. Replace YOUR_API_KEY with a key from your console.

curl "https://xtikapi.com/v1/x/media/list?screen_name=example" \
  -H "Authorization: Bearer YOUR_API_KEY"

Parameters

NameTypeRequired
screen_namestringrequired
rest_idnumberoptional
cursorstringoptional

Response fields

Every platform returns the same post shape. A field the platform does not provide is named in meta.unavailable.

  • id
  • url
  • text
  • author
  • createdAt
  • likeCount
  • commentCount
  • shareCount
  • viewCount
  • cover

Example response

Recorded from a live call on 2026-11-18. Names, text, links and images are replaced with examples; counts, dates and field names are real.

{
  "data": {
    "items": [
      {
        "id": "3074185296307418529",
        "text": "Example text",
        "author": {
          "id": "30741852",
          "username": "example_user",
          "name": "Example name"
        },
        "createdAt": "2026-11-18T21:40:00.000Z",
        "likeCount": 1534,
        "commentCount": 64,
        "shareCount": 247,
        "viewCount": 220912,
        "url": "https://example.com/link"
      },
      {
        "id": "3074185296307418529",
        "text": "Example text",
        "author": {
          "id": "30741852",
          "username": "example_user",
          "name": "Example name"
        },
        "createdAt": "2026-11-18T20:47:24.000Z",
        "likeCount": 510,
        "commentCount": 41,
        "shareCount": 53,
        "viewCount": 194605,
        "url": "https://example.com/link"
      }
    ]
  },
  "meta": {
    "request_id": "example",
    "endpoint": "x.media.list",
    "normalized": true,
    "unavailable": [
      "cover"
    ],
    "billing": {
      "charged": true,
      "amount": 0.002,
      "balance": 4.98
    }
  }
}

Error codes

Errors are not billed. Retry the ones marked yes. More in the API quickstart.

CodeHTTPRetryMeaning
unauthorized401noAPI key is missing, invalid, or revoked.
rate_limited429yesToo many requests.
invalid_params422noRequest parameters are invalid.
price_exceeds_max402noThis call costs more than X-Max-Price.
insufficient_balance402noBalance is too low for this call.
key_limit_reached402noThis API key has reached its spend limit.
idempotency_conflict409noThis Idempotency-Key was already used with different parameters.
idempotency_in_progress409yesA request with this Idempotency-Key is still running.
response_too_large409noThe response is too large to store for a safe retry.
upstream_error502yesThe data provider returned an error. You were not charged.
upstream_timeout504yesThe data provider timed out. You were not charged.
internal_error500yesSomething went wrong on our side. You were not charged.
not_found404noNo such endpoint.

More X APIs

Questions

What does the X media posts API return?

A post object with the fields listed on this page. Missing provider fields are named in meta.unavailable.

When is the X media posts API billed?

This call costs $0.002 when the provider returns HTTP 200. An empty result is billed. Errors and timeouts are not billed.

What do I do if the provider returns an error?

The response has charged set to false. Read the error code and retry if the error says retry is true. Your balance is unchanged.

Where is this resource on another platform?

Use the links on this page for the same resource and action on other platforms. Change the platform word in the path.