Skip to main content
POST https://xquik.com/api/v1/extractions/estimate
Free. This endpoint does not consume credits.

Estimate X (Twitter) API scraping cost

Request a free credit quote before starting any extraction. The response estimates results and required credits. It also checks your available credit balance. A quote never starts a scraping job. Use the same request fields for estimation and extraction. Keep toolType, target fields, filters, and resultsLimit unchanged. The quote then matches the job you run.

Match each scraping task

Other supported tools estimate likes, media, mentions, quotes, reposts, threads, Spaces, and articles. Use their matching target fields below.

Control the credit quote

resultsLimit defaults to 10,000. Set any positive integer for a different bound. The estimator adjusts creditsRequired for that projected count. Narrow tweet search estimates with dates, authors, languages, engagement thresholds, or media filters. Reuse those filters when creating the extraction. Changed filters can produce a different estimate. Post estimates use the 1,000-row cap. A protected profile returns 403 x_account_protected.

Read the estimate

When allowed is false, lower resultsLimit, narrow filters, or add credits. Then request another quote.

Headers

The estimator accepts the same fields as Create Extraction.

Body

Each tool reads its own target, collection, and filter fields. See extraction parameters for every field.

Response

200 OK

When allowed is false, credits required exceed the available balance.

400 Invalid input

The request body is missing or malformed. Send toolType and its matching target field.

400 Invalid tool type

{ "error": "invalid_tool_type" } The toolType value is not one of the 23 supported tools.

401 Unauthenticated

Missing or invalid API key.

402 Insufficient credits

The available balance cannot cover the estimate. Possible error values include no_subscription, subscription_inactive, no_credits, and insufficient_credits.

404 Not found

{ "error": "tweet_not_found", "message": "Tweet not found" } The target tweet does not exist, was deleted, or the ID is invalid. { "error": "user_not_found", "message": "X user not found" } The target user does not exist or is suspended.

429 Rate limited

Wait for the Retry-After value before requesting another estimate.

Decision handoff

A 200 OK response is a quote. It starts no extraction. Store the estimate with the request you plan to run.

Allowed run

When allowed is true, send the same toolType, target fields, filters, and resultsLimit. Send them to Create Extraction. Store the returned job ID from that 202 Accepted receipt.

Blocked run

When allowed is false, lower resultsLimit, narrow the target or filters, or add credits. Then call Create Extraction.

Source signal

Store source so operators know whether the estimate came from replyCount, followers, or resultsLimit. source can also be paginationCap or another supported count.

Audit fields

Store estimatedResults, creditsRequired, creditsAvailable, allowed, and source with the planned extraction request.
Call this endpoint before every extraction. It catches credit shortfalls before the job starts. If allowed is false, Create Extraction returns a 402 error. Check your current usage on the dashboard.
Next steps. Create Extraction to start an extraction, or Extraction Workflow Guide for the full flow.

Response examples

  • 400 { "error": "invalid_input", "message": "Invalid input. Check the request body." }
  • 401 { "error": "unauthenticated", "message": "Authentication required. Provide a valid API key or bearer token." }
  • 402 { "error": "insufficient_credits", "message": "Insufficient credits. Top up or subscribe to continue." }
  • 403 { "error": "api_key_budget_reached", "message": "This API key reached its monthly credit budget. Raise or remove it at dashboard.xquik.com/api-keys, or wait for the next UTC month." }
  • 404 { "error": "not_found", "message": "Resource not found." }
  • 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 }