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
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| url | String | Yes | The URL to unshorten. Minimum length: 3 characters. |
| max_hops | Integer | No | Maximum number of redirects to follow. Default: 10. Minimum: 1. Maximum: 30. |
| timeout_s | Integer | No | Timeout in seconds for the unshortening attempt. Default: 8. Minimum: 1. Maximum: 20. |
Response
Returns a JSON object with the URL that was submitted, the final destination, and the redirect chain that was followed.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| input | String | Yes | The URL supplied in the request. |
| resolved | String | Yes | The final URL after all redirects were followed. |
| hops | Object Array | Yes | The redirect chain, in order, starting with the submitted URL. |
| hops[].url | String | Yes | URL for this step of the chain. |
| hops[].status | Integer | Yes | HTTP status code returned by this step. |
| truncated | Boolean | Yes | true when the redirect chain was cut short before reaching a final destination. |
| attribution | Object Array | No | Source attribution entries. |
| attribution[].source | String | No | Where the redirect metadata came from. |


