Content API
API REST para consumo externo de conteúdo curado
Autenticação
Envie o header x-api-key com sua chave em todas as requisições. Configure a variável de ambiente CONTENT_API_KEY no servidor.
curl -H "x-api-key: YOUR_API_KEY" http://localhost:3000/api/content/articlesEndpoints
Parâmetros
| Nome | Tipo | Default | Descrição |
|---|---|---|---|
| status | string | approved | "approved" | "published" |
| limit | number | 20 | 1-100 |
| offset | number | 0 | Paginação |
| category | string | - | Filtrar por categoria |
| tag | string | - | Filtrar por tag (pode repetir) |
| minScore | number | - | Score mínimo |
| period | string | 7d | "24h" | "7d" | "30d" | "all" |
| sort | string | newest | "newest" | "score" | "title" |
Exemplo
curl -H "x-api-key: SUA_CHAVE" "http://localhost:3000/api/content/articles?period=7d&minScore=60&limit=5"
Resposta
{
"data": [
{
"id": "uuid",
"title": "Título reescrito",
"excerpt": "Resumo do artigo...",
"content": "Conteúdo completo...",
"originalUrl": "https://...",
"score": 75,
"category": "fintech",
"tags": ["bitcoin", "investimentos"],
"decision": "Relevante",
"publishedAt": "2026-03-15T...",
"provider": "local",
"wordCount": 450
}
],
"pagination": {
"total": 150,
"limit": 5,
"offset": 0,
"hasMore": true
}
}ℹ️ Informações Adicionais
- • Todas as respostas incluem headers CORS para consumo via browser
- • Sem rate limit configurado por padrão (adicione via middleware se necessário)
- • O endpoint
/digest?format=htmlretorna HTML estilizado para newsletters - • Timestamps em formato ISO 8601 (UTC)
- • Paginação via
offsetelimit