x_resolve_url 2 credits
Identify what an X (formerly Twitter) URL points at before fetching it. Give any x.com or twitter.com URL (mobile links, query params, /i/web/status forms are fine); get back {type: profile|tweet, id, handle, canonical_url}. Tweet URLs yield the numeric id for x_get_tweet; profile URLs yield the handle for x_get_profile or x_get_tweets. Costs 2 credits and parses offline without fetching the page. t.co short links cannot be expanded offline and return INVALID_INPUT telling you so; expand them in your own browser step first. Skip this tool when you already have a handle or tweet id: the other X tools accept those directly.
Part of the X (formerly Twitter) toolset: /docs/x.
Parameters#
| Param | Required | Type | Description |
|---|---|---|---|
url | yes | string | An X URL, e.g. https://x.com/nasa/status/2054497961162478079 or https://twitter.com/nasa. |
REST#
GET /v1/x/resolve-url · auth: required · metered: true
curl "https://api.veezee.io/v1/x/resolve-url?url=https%3A%2F%2Fx.com%2Fnasa%2Fstatus%2F2054497961162478079" \
-H "Authorization: Bearer $VEEZEE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"MCP#
{
"method": "tools/call",
"params": {
"name": "x_resolve_url",
"arguments": {
"url": "https://x.com/nasa/status/2054497961162478079"
}
}
}Input examples#
Tweet URL
{
"url": "https://x.com/nasa/status/2054497961162478079"
}
Profile URL with params
{
"url": "https://twitter.com/nasa?ref_src=share"
}
Output#
Returns a url_resolution envelope. Full field list: /docs/fields#url_resolution.
Errors#
REST returns application/problem+json; MCP returns the same content as an error result. message is written as the next-turn instruction.
| Code | HTTP status | Retriable | Meaning |
|---|---|---|---|
INVALID_INPUT | 400 | no | A parameter failed validation. Check param and message for what to fix. |
NOT_FOUND | 404 | no | Nothing matches the given identifier or URL. |
UNAUTHORIZED | 401 | no | Invalid, revoked, or unusable API key. |
NOT_ENTITLED | 403 | no | This account is not enabled for the platform you called. |
INSUFFICIENT_CREDITS | 402 | no | Your balance can't cover this call's quote. Check get_usage or add credits. |
QUOTE_EXCEEDS_MAX_CREDITS | 402 | no | The call's quote is higher than the max_credits you set. Nothing was charged. |
IDEMPOTENCY_KEY_REQUIRED | 400 | no | This is a metered call; send an Idempotency-Key header. |
IDEMPOTENCY_KEY_REUSED | 409 | no | That Idempotency-Key was already used with different arguments. Use a new key for a new call. |
CONCURRENCY_LIMIT | 429 | yes | Too many calls in flight for this key's plan. Wait for one to finish. |
RATE_LIMITED | 429 | yes | Too many calls per minute for this key's plan. Back off and retry. |
TRIAL_CAP_EXCEEDED | 403 | no | A trial-only limit was hit (concurrency, rate, search size, or realtime fetches). |
BUDGET_EXHAUSTED | 503 | no | A configured spend budget has been used up. |
UPSTREAM_UNAVAILABLE | 502 | yes | LinkedIn data wasn't reachable. Safe to retry. |
PAYLOAD_TOO_LARGE | 413 | no | The request or response exceeded the size limit. |
INTERNAL | 500 | yes | Something failed on our side. Safe to retry. |
AUTH_REQUIRED | 401 | no | |
KEY_REQUIRED | 401 | no | No API key was sent. Mint one free at POST /v1/keys/mint and retry. |
Errors a payment can fix: the offer fields
Errors a payment can fix add fields to the base error shape. INSUFFICIENT_CREDITS, TRIAL_CAP_EXCEEDED, and BUDGET_EXHAUSTED carry upgrade_url (a link to hand to your human) and offer, its machine-readable twin. RATE_LIMITED and CONCURRENCY_LIMIT carry both on trial accounts only, where a paid plan raises the limit.
Fields inside offer:
offer_version: currently 1.reason: the error code that produced the offer.currency:"usd".recommended: the pack to lead with, currentlyflex.packs: each pack'spack,mode,price_usd_cents,creditsorcredits_per_month, andwhen, a short label for when that pack fits.rails: currentlystripe_checkout.checkout_url: the same account-bound link asupgrade_url.resume: how to continue after payment, per code (next paragraph).refund_policy: the refund terms in plain text.
After payment, follow resume: INSUFFICIENT_CREDITS retries the same call with the same Idempotency-Key; TRIAL_CAP_EXCEEDED and BUDGET_EXHAUSTED retry with a fresh key; the two limit codes clear on their own with back-off, payment only raises the limit. INSUFFICIENT_CREDITS also sets credits_required: the credits the failed call needed. The failed attempt charged nothing.