> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shappire.tools/llms.txt
> Use this file to discover all available pages before exploring further.

# Download do TikTok

> Baixar vídeos do TikTok sem marca d'água via API

## URL suportada

```
https://www.tiktok.com/@usuario/video/1234567890123456789
```

## Fluxo

```bash theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
# Resolve
curl https://api.shappire.tools/v1/media/resolve \
  -H "X-API-Key: $SHAPPIRE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.tiktok.com/@user/video/1234567890"}'

# Download
curl -X POST https://api.shappire.tools/v1/media/download \
  -H "X-API-Key: $SHAPPIRE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"media_id":"med_xxx","format":"video_best"}'
```

## Python completo

```python theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
def download_tiktok(url: str) -> str:
    media = resolve(url)
    job_id = enqueue(media["id"], "video_best")
    job = wait_for_job(job_id)
    return job["result"]["download_url"]
```

## Erros comuns

| Código                 | Causa                             |
| ---------------------- | --------------------------------- |
| `unsupported_platform` | URL encurtada — use link canônico |
| `media_unavailable`    | Vídeo privado ou removido         |
