---
name: 888desturl-url-trace
description: Use when you need to trace a URL through HTTP redirects, meta refresh, or JavaScript navigation by calling the live 888desturl API for the current deployment. Supports final destination discovery, LIFF URL inspection, and redirect-chain debugging.
---

# 888desturl URL Trace

## Environment Setup

- **Base URL**: `https://url.david888.com`
- **Trace Endpoint**: `https://url.david888.com/api/trace?url=<encoded_target_url>`
- **Final-Only Endpoint**: `https://url.david888.com/api/final?url=<encoded_target_url>`
- **Short CLI Endpoint**: `https://url.david888.com/api/f?url=<encoded_target_url>`
- **Result Page Pattern**: `https://url.david888.com/result/<result_id>`
- **Optional Context**: add `&context=line` for LINE-like mobile tracing when a link only works inside the LINE in-app browser
- **Method**: `GET`
- **Content Type**: `application/json`

## Workflow

1. Validate that the input is a full `http://` or `https://` URL.
2. URL-encode the target URL.
3. If the URL appears to depend on the LINE app or LIFF, add `context=line`.
4. Call `https://url.david888.com/api/f?url=<encoded_target_url>` for a short CLI response.
5. Call `https://url.david888.com/api/final?url=<encoded_target_url>&format=json` when you need the final URL plus metadata.
6. Call `https://url.david888.com/api/trace?url=<encoded_target_url>` when you need the full chain.
7. Read `final_url` first and present it as the main answer.
8. Summarize `redirect_count`.
9. If present, surface `security.status`, `preview_url`, `final_image_url`, and `result_url`.

## Response Shape

- `final_url`
- `redirect_count`
- `chain`
- `preview_url`
- `final_image_url`
- `security`
- `result_url`
