# reddit_resolve_url - Veezee docs

Identify what a Reddit URL points at before fetching it. Give any reddit.com or redd.it URL (share links, old.reddit.com, trailing params are fine); get back {type: subreddit|user|post|comment, id, handle, canonical_url}. Post URLs yield the t3_ id for reddit_get_post; comment permalinks yield the t1_ id; subreddit and user URLs yield the name for reddit_get_subreddit or reddit_get_user. Costs 2 credits and parses offline without fetching the page. Skip this tool when you already have a t3_/t1_ id, subreddit name, or username: the other Reddit tools accept those directly. Not for non-Reddit URLs; it returns INVALID_INPUT for those.

## Parameters

| Param | Required | Type | Description |
| --- | --- | --- | --- |
| `url` | yes | `string` | A Reddit URL, e.g. https://www.reddit.com/r/selfhosted/comments/1tbups6/... or https://redd.it/1tbups6. |

## REST

`GET /v1/reddit/resolve-url` (auth: `required`, metered: `true`)

```
curl "https://api.veezee.io/v1/reddit/resolve-url?url=https%3A%2F%2Fredd.it%2F1tbups6" \
  -H "Authorization: Bearer $VEEZEE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
```

## MCP

```json
{
  "method": "tools/call",
  "params": {
    "name": "reddit_resolve_url",
    "arguments": {
      "url": "https://redd.it/1tbups6"
    }
  }
}
```

## Input examples

**Post share link**

```json
{
  "url": "https://redd.it/1tbups6"
}
```

**Comment permalink**

```json
{
  "url": "https://www.reddit.com/r/programming/comments/1tbups6/comment/okpklb6/"
}
```

## Output

Returns a `url_resolution` envelope. Full field list: https://veezee.io/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 | Missing, invalid, or revoked 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. |

Errors a payment can fix add fields to this shape. INSUFFICIENT_CREDITS, TRIAL_CAP_EXCEEDED, and BUDGET_EXHAUSTED carry `upgrade_url` (give it 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. `offer` holds `offer_version` (1), `reason` (the error code), `currency` ("usd"), `recommended` (which pack to lead with, currently `flex`), `packs` (pack, mode, price_usd_cents, credits or credits_per_month, and `when`, a short label for when that pack fits), `rails` (currently `stripe_checkout`), `checkout_url` (the same account-bound link as `upgrade_url`), `resume`, and `refund_policy`. Follow `offer.resume` after payment: 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.
