DocumentationResolve URLs

API documentation/v2

Resolve URLs

Use this when you need the results page first and only plan to open some links. Search and Structured resolve links inline by default.

https://api.reserp.ai/v2/serp/resolve

Search first, then resolve one link

This example uses curl and jq to resolve the first wrapped link. You can select links by title or position using the regular search response.

cURL
set -e
api="https://api.reserp.ai/v2/serp"
search=$(curl -fsS "$api/search" -H "Authorization: Bearer $API_KEY" \
  --json '{"url":"https://www.google.com/search?q=coffee&gl=us&hl=en","resolve_urls":false}')
if body=$(printf '%s' "$search" | jq -ec '.unresolved_urls[0] // empty | {url: .}'); then
  curl -fsS "$api/resolve" -H "Authorization: Bearer $API_KEY" --json "$body"
fi

Request

Use your regular bearer API key and send a JSON object with one field.

FieldTypeDescription
urlstringCopy one wrapped link exactly as it appears in unresolved_urls. Direct destination URLs need no lookup.

Each request returns as soon as its link resolves or the lookup fails. A lookup can take up to five minutes from the start of the request, including any delay Google specifies. Allow a little longer in your client to receive the response.

The resolver can make up to two retries for connection failures across the initial request and one optional timed redirect. An HTTP 403 or 429 from Google ends the lookup.

You can send independent requests concurrently. The default resolver limit per account is 500 requests per second, with a burst of 500. Search has its own rate limit. For HTTP 429 or a busy resolver (HTTP 503), follow the Retry-After header when present.

Response and billing

A completed lookup returns HTTP 200. Read resolved_url for the destination. If it is null, error gives the reason. Check billed for the charge.

FieldTypeDescription
urlstringThe original wrapped URL. Use it to match destinations back to search results.
resolved_urlstring | nullThe final destination, or null when resolution failed.
errorstring?Present on failure. Values include timeout, busy, upstream_rate_limited, upstream_refused and unresolved.
cost_usdnumberAmount debited from your prepaid balance for this lookup.
billed / billing_sourceboolean / string | nullA charge returns true and prepaid, including when a lookup uses upstream data and fails. A request rejected before upstream traffic returns false and null.

Resolution costs $0.99 per 1,000 lookups that use upstream data ($0.00099 each). The first outbound data starts one charge, including when the link cannot be resolved, the lookup times out, or your client disconnects. Internal retries and timed follow-ups are part of that charge. Submitting the URL again starts a separate request.

Each lookup requires prepaid credit. If the balance is too low, including when another in-flight request spends the last credit, the API returns HTTP 402 with insufficient_balance and billed: false. The monthly free allowance covers Search and Structured.