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/:id retrieves one news feed item from MongoDB using its unique ObjectId. Unlike GET /feed, this endpoint does not trigger any scraping — it is a direct database lookup. If no document matches the provided id, the server responds with 404 and the NOT_FOUND error envelope.

Endpoint

GET /feed/:id

Path Parameters

id
string
required
The MongoDB ObjectId of the feed item to retrieve (e.g. 664a1f2e8b3c2a001e4d7f01). Must be a valid 24-character hexadecimal ObjectId string; passing a malformed value results in a 500 response carrying the cast error reason.

Response

data
Feed | null
The matching Feed object on success, or null when the item is not found.
error
null
Always null on a successful 200 response.

Example Request

curl -X GET http://localhost:3001/feed/664a1f2e8b3c2a001e4d7f01 \
  -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"
  },
  "error": null
}

Error Response (404)

Returned when no document with the given id exists in MongoDB.
{
  "data": null,
  "error": {
    "code": "NOT_FOUND",
    "message": "Feed not found"
  }
}

Status Codes

CodeMeaning
200Feed item found and returned successfully
404No feed item exists with the provided ObjectId
500An unexpected server error occurred (e.g. malformed ObjectId cast failure)

Build docs developers (and LLMs) love