Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/miikorz/DailyNews/llms.txt

Use this file to discover all available pages before exploring further.

GET /feed is the primary listing endpoint for DailyNews. On every call it triggers a live scrape of the top five articles from both El Mundo and El País, deduplicates them against existing records by link, persists any new items, and then returns the full collection sorted by createdAt descending. This means the response always reflects the latest news without any separate refresh step.

Endpoint

GET /feed

Request

No path parameters, query parameters, request body, or authentication headers are required.

Response

data
Feed[]
Array of Feed objects sorted by createdAt descending. Empty array [] when no feeds exist.
error
null
Always null on a successful response.

Example Request

curl -X GET http://localhost:3001/feed \
  -H "Accept: application/json"

Example Response

{
  "data": [
    {
      "_id": "664a1f2e8b3c2a001e4d7f01",
      "title": "El Gobierno aprueba el nuevo plan de vivienda",
      "description": "El Consejo de Ministros ha dado luz verde al paquete de medidas para facilitar el acceso a la vivienda en las grandes ciudades.",
      "author": "María López",
      "link": "https://www.elpais.com/economia/2024-05-20/el-gobierno-aprueba-nuevo-plan-vivienda.html",
      "portrait": "https://imagenes.elpais.com/resizer/vivienda-cover.jpg",
      "newsletter": "El País",
      "createdAt": "2024-05-20T08:34:22.000Z"
    },
    {
      "_id": "664a1f2e8b3c2a001e4d7f02",
      "title": "La selección española golea en su debut en la Eurocopa",
      "description": "España arrancó con una contundente victoria por 3-0 frente a Croacia en el estadio Olímpico de Berlín.",
      "author": "Carlos Ruiz",
      "link": "https://www.elmundo.es/deportes/2024-05-20/espana-golea-debut-eurocopa.html",
      "portrait": "https://e00-elmundo.uecdn.es/assets/multimedia/imagenes/eurocopa-cover.jpg",
      "newsletter": "El Mundo",
      "createdAt": "2024-05-20T07:15:10.000Z"
    },
    {
      "_id": "664a1f2e8b3c2a001e4d7f03",
      "title": "Récord histórico de temperaturas en la Península",
      "description": "La Agencia Estatal de Meteorología prevé que varios municipios superen los 42 °C este fin de semana.",
      "author": "",
      "link": "https://www.elpais.com/clima/2024-05-20/record-historico-temperaturas-peninsula.html",
      "portrait": null,
      "newsletter": "El País",
      "createdAt": "2024-05-20T06:50:44.000Z"
    }
  ],
  "error": null
}

Status Codes

CodeMeaning
200Feeds returned successfully
500An unexpected server error occurred; scraping or database failure
On every call, the service scrapes the top 5 articles from El Mundo and the top 5 from El País. Each scraped article is compared against existing records by link; only articles with a new, unseen link are inserted. The endpoint then returns all stored feeds (scraped and manually created), sorted newest-first — not only the freshly scraped batch.

Build docs developers (and LLMs) love