apyhub
DEVELOPER TOOLS · SECURITY & PRIVACY

Resolve Short URL API

What it does

URL Unshortener follows shortened links and returns the destination URL after resolving redirects. Send a url in the request body, and you can also set max_hops to limit how many redirects are followed and timeout_s to control how long the lookup waits.

Use it when you need to expand link shorteners before storing, scanning, or displaying a URL. It helps you see the final target behind social links, tracking links, and other redirect chains without guessing where the link ends up.

The response is returned as a JSON object with the resolved result, and the schema allows additional properties. That makes it suitable for workflows where you need to inspect the final destination and pass the response onward without strict field assumptions.

If you process inbound links in moderation, analytics, phishing checks, or URL normalization, URL Unshortener gives you a direct way to resolve the actual destination before further handling.

POST
Unshorten URL
https://api.eu.apyhub.com/dosvak/unshorten-url

QUICKSTART

GUIDE

Quickstart

Send the URL you want to unshorten in a JSON body.

curl -X POST "https://api.eu.apyhub.com/dosvak/unshorten-url" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://bit.ly/example"}'

What you'll get back

Returns a JSON object. The schema does not declare any specific top-level fields, so the exact response shape may vary.

{
  "input": "https://bit.ly/example",
  "resolved": "https://vignettinglife.com/",
  "hops":  [
    {
      "url": "https://bit.ly/example",
      "status": 200
    },
    {
      "url": "https://vignettinglife.com/",
      "status": 200
    }
  ],
  "truncated": false,
  "attribution": [
    {
      "source": "HTTP redirect metadata"
    }
  ]
}
TRY ITLIVE · 100 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
UrlInput*

About this endpoint

What it does

Unshortens a URL by following redirects and returning the resolved result. The request body accepts the source url plus optional redirect-following controls.

Request Body

ParameterTypeMandatoryDescription
urlStringYesThe URL to unshorten. Minimum length: 3 characters.
max_hopsIntegerNoMaximum number of redirects to follow. Default: 10. Minimum: 1. Maximum: 30.
timeout_sIntegerNoTimeout in seconds for the unshortening attempt. Default: 8. Minimum: 1. Maximum: 20.

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.