Contentful's Content Delivery API at https://cdn.contentful.com serves published content by space and environment. The Management API (api.contentful.com) edits it.
Create a Content Delivery API token under Settings → API keys and send it as Authorization: Bearer <token>. In the examples it's written {{CONTENTFUL_DELIVERY_TOKEN}}.
Full reference: https://www.contentful.com/developers/docs/references/content-delivery-api/
Runs as-is: cfexampleapi is Contentful's public demo space, and this read-only token is published in Contentful's own docs. Swap in your space id and token.
curl "https://cdn.contentful.com/spaces/cfexampleapi/environments/master/entries?limit=2" \
-H "Authorization: Bearer b4c0n73n7fu1"
{
"sys": {
"type": "Array"
},
"total": 10,
"skip": 0,
"limit": 2,
"items": [
{
"metadata": {
"tags": [],
"concepts": []
},
"sys": {
"space": {},
"id": "5ETMRzkl9KM4omyMwKAOki",
"type": "Entry",
"createdAt": "2014-02-21T13:42:57.752Z",
"updatedAt": "2014-08-23T14:42:35.207Z",
"environment": {},
"publishedVersion": 10,
"revision": 3,
"contentType": {},
"locale": "en-US"
},
"fields": {
"name": "London",
"center": {
"lon": -0.12548719999995228,
"lat": 51.508515
}
}
},
{
"metadata": {
"tags": [],
"concepts": []
},
"sys": {
"space": {},
"id": "7qVBlCjpWE86Oseo40gAEY",
"type": "Entry",
"createdAt": "2014-02-21T13:43:38.258Z",
"updatedAt": "2014-04-15T08:22:22.010Z",
"environment": {},
"publishedVersion": 18,
"revision": 2,
"contentType": {},
"locale": "en-US"
},
"fields": {
"name": "San Francisco",
"center": {
"lon": -122.41941550000001,
"lat": 37.7749295
}
}
}
]
}
curl "https://cdn.contentful.com/spaces/{{SPACE_ID}}/environments/master/entries?content_type={{CONTENT_TYPE_ID}}&limit=5" \
-H "Authorization: Bearer {{CONTENTFUL_DELIVERY_TOKEN}}"