Skip to main content
GET https://xquik.com/api/v1/x/users/{id}/media
Requested result counts are upper bounds for paid authenticated calls. Remaining credits may not cover the full page or ID list. If so, Xquik returns fewer results. If zero paid results are affordable, it returns 402 insufficient_credits.
1 credit per result returned · All plans from $0.00012/credit · Supports guest paid reads

User media handoff

GET /x/users/{id}/media returns recent media tweets from one account. Use it when a gallery, moderation queue, warehouse, or agent needs those tweets. The examples above write JSON Lines rows with the source user. Rows also hold the media tweet ID, text, tweet URL, author ID, and username. They also hold the display name, follower count, verified state, and profile image URL. They also hold engagement counts, media_urls, media_types, and cursor fields. A worker can then resume from the last saved next_cursor. A protected account returns 403 x_account_protected. Xquik charges nothing.

Which media endpoint?

  • Use GET /api/v1/x/users/{id}/media when every row must be a media tweet from one profile. Store media_urls, media_types, media_tweet_id, page_cursor, next_cursor, and has_next_page.
  • Use GET /api/v1/x/users/{id}/tweets when the sync also needs non-media posts or replies.
  • For one known tweet ID, use GET /api/v1/x/tweets/{id} for its media plus full tweet detail.
  • Use POST /api/v1/x/media only to host or validate media before a write. It takes a local file or HTTPS media URL. Pass mediaUrl to POST /api/v1/x/tweets, or pass mediaId as the only media_ids item for POST /api/v1/x/dm/{userId}.

Build a profile media inventory

Use this route for tweets containing photos, videos, or animated GIFs from one profile. Keep the source profile ID with every media item. Use the inventory for asset review, campaign research, or approved archiving. Respect the original publisher and applicable usage rights.

Hand media into an asset workflow

Create one child row per media item. Include the parent tweet ID, media type, source URL, author ID, and collection time. Choose the best available video variant only after inspecting its metadata. Keep the original variant list when later processing may need another format. Do not download every asset during discovery. First filter and approve the relevant tweets. Then call the download route with the selected tweet IDs. Keep attribution and source links in any archive. The media URL alone does not explain the asset’s publisher or where it appeared. Record download status separately from discovery status. A listed media URL does not mean you downloaded the asset.

Keep only chart posts

Send imageShows to keep the posts whose photos show a kind. This request keeps only the charts from an account.
  • Presets are charts, screenshots, product_photos, memes & people. Any other text is read as a description, such as a rocket.
  • Only photos X doesn’t mark sensitive get checked. Videos & flagged photos never get opened.
  • Each kept post costs 2 credits, the AI analysis price. A post the filter drops costs nothing. Posts without a safe photo cost nothing.

Path parameters

Query parameters

Tweet result filters

These optional filters apply to tweets[] returned by this route. They keep the same media-tweets target. Xquik filters rows after it fetches each page. Selective filters can return fewer rows than an unfiltered page.See tweet filters for every filter. Common ones are fromUser, language, sinceDate, mediaType, minLikes, and hashtags.

Keep posts by topic or photo

Send 1 of these to keep only the posts you want. AI-powered analysis checks each post the page reads. Posts scoring 0.5 or more come back, each with its score. Each kept post costs 2 credits instead of 1. A dropped post costs nothing. The page size counts checked posts. Posts the check can’t answer cost nothing & stay out. They need an Xquik API key, since each kept post bills Xquik credits. RapidAPI & pay-per-request calls with them get 400 invalid_input.

Choose fields

Headers

Response

200 OK

400 Invalid user ID

{ "error": "invalid_user_id", "message": "Send a user ID, @username or profile URL, such as x.com/nasa." } The user ID is empty or invalid.

401 Unauthenticated

Anonymous requests get WWW-Authenticate: Bearer and a guest wallet checkout action. This is not a Payment challenge. Missing or invalid API key.

402 Payment required

Account keys get account options. Guest keys get guest top-up only. No checkout starts automatically. Confirm any payment action.

502 X API unavailable

The read service returned an error. Retry after a short delay.

429 Rate limit exceeded

You exceeded your tier rate limit. Wait for the Retry-After header before retrying.

424 Dependency failed

The normalized v1 response contract can return 424 when the read service is unavailable.

Response examples

  • 400 { "error": "invalid_input", "message": "Invalid input. Check the request body." }
  • 401 { "error": "unauthenticated", "message": "Authentication required." }
  • 402 { "error": "insufficient_credits", "message": "Insufficient credits. Top up or subscribe to continue." }
  • 403 { "error": "api_key_paused", "message": "This API key is paused. Resume it at dashboard.xquik.com/api-keys to use it again." }
  • 404 { "error": "user_not_found", "message": "X user not found. Check the username." }
  • 424 { "error": "x_api_unavailable", "message": "X data source temporarily unavailable. Try again later." }
  • 429 { "error": "rate_limit_exceeded", "message": "Too many requests. Try again later.", "retryAfter": 60 }
  • 502 { "error": "x_api_unavailable", "message": "X data source temporarily unavailable. Try again later." }
  • 503 { "error": "x_api_unavailable", "message": "Xquik is busy right now. Retry shortly." }