API Reference
API Media Metadata
A API Media Metadata devolve informação estruturada sobre um URL de media público (YouTube, Instagram, TikTok, Vimeo, X, Facebook, Twitch, Reddit, etc.) sem descarregar o ficheiro.
Este endpoint é síncrono: recebe os metadados na resposta HTTP (sem polling de job_id).
x-api-key:stringobrigatório
A sua chave privada HuntAPI.
Endpoint: GET https://api.huntapi.com/v1/media/metadata
Custo: 1 crédito por chamada bem-sucedida.
query:stringobrigatório
URL público do media a inspecionar (ex. um URL do YouTube).
Resposta
{
"metadata": {
"id": "3g3Eow41B6I",
"ext": "mp4",
"title": "Faire une interview Multicam avec UNE SEULE caméra",
"width": 640,
"height": 360,
"channel": "Alex Jackson",
"is_live": false,
"duration": 432,
"was_live": false,
"extractor": "Youtube",
"thumbnail": "https://i.ytimg.com/vi/3g3Eow41B6I/maxresdefault.jpg",
"like_count": 4060,
"view_count": 93297,
"channel_url": "https://www.youtube.com/channel/UCW0GdGxlRENND_ft84Cp5vg",
"description": "...",
"live_status": "not_live",
"upload_date": 1712188800,
"webpage_url": "https://www.youtube.com/watch?v=3g3Eow41B6I",
"original_url": "https://www.youtube.com/watch?v=3g3Eow41B6I"
}
}Campos de resposta
| Campo | Tipo | Descrição |
|---|---|---|
metadata.id | string | Id do media na plataforma |
metadata.title | string | Título |
metadata.description | string | Descrição |
metadata.duration | number | Duração em segundos |
metadata.thumbnail | string | URL da thumbnail |
metadata.channel | string | Nome do canal / uploader |
metadata.channel_url | string | URL do canal |
metadata.view_count | number | Número de visualizações |
metadata.like_count | number | Número de likes |
metadata.width / height | number | Resolução quando disponível |
metadata.upload_date | number | Timestamp Unix |
metadata.is_live / was_live / live_status | - | Flags de live |
metadata.extractor | string | Extractor de origem (ex. Youtube) |
metadata.webpage_url | string | URL canónico da página |
metadata.original_url | string | URL passado em query |
Notas
Alguns URLs não podem ser inspecionados se o conteúdo for:
- Privado
- Indisponível (apagado ou inacessível)
- Com restrição de idade
Nestes casos a API devolve um erro explicativo.
Relacionado
- Descarregue depois com
https://api.huntapi.com/v1/video/downloadouhttps://api.huntapi.com/v1/audio/download - Faça poll dos jobs async com
https://api.huntapi.com/v1/jobs/{id}(campoprogress0–100)
VIDEO API
Discover why Hunt is the preferred API provider for developers.