Events
Event endpoint
Content API provides an Event endpoint which lists events contained in the API.
Once you have an Event id you can lookup the stories, images and social posts related to that event.
Products
Responses to from the Events endpoint respect the Product that is being used in the Request.
For more about products, such as which default is used and how to change it, please see here - Products
Listing events
Request
curl \
-H "Accept: application/json" \
-H "apikey: <API KEY>" \
https://content.api.pressassociation.io/v1/event
Response
Note: This example shows 3 events. By default 20 are returned.
Please see Pagination for details on configuring this.
{
"total": 324134,
"limit": 3,
"offset": 0,
"item": [
{
"uri": "paevent:70a50ea7852469ea57a4cb3defa6c038149da021af02d81e5c7a95461d1bdd5c",
"profile": "paevent",
"version": "1",
"firstcreated": "2019-11-11T15:38:19Z",
"versioncreated": "2019-11-11T15:38:19Z",
"pubstatus": "usable",
"dates": {
"start": "2019-11-11T00:00:00Z",
"end": "2019-11-12T00:00:00Z",
"duration": "P1D"
},
"subject": [
{
"code": "patopic:science",
"name": "Science",
"profile": "patopic",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "about"
},
{
"code": "pakeyword:mercury",
"name": "Mercury",
"profile": "pakeyword",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "about"
}
],
"description_text": "Science Mercury 11/11/2019",
"links": [
{
"rel": "self",
"href": "https://content.api.pressassociation.io/v1/event/paevent:70a50ea7852469ea57a4cb3defa6c038149da021af02d81e5c7a95461d1bdd5c"
},
{
"rel": "item-collection",
"href": "https://content.api.pressassociation.io/v1/event/paevent:70a50ea7852469ea57a4cb3defa6c038149da021af02d81e5c7a95461d1bdd5c/item"
}
]
},
{
"uri": "paevent:d2c82789f84b167e0b92d6775dce6779c304a81e5bd268d933b7a752e4e14086",
"profile": "paevent",
"version": "1",
"firstcreated": "2019-11-11T02:45:17Z",
"versioncreated": "2019-11-11T02:45:17Z",
"pubstatus": "usable",
"dates": {
"start": "2019-11-11T00:00:00Z",
"end": "2019-11-12T00:00:00Z",
"duration": "P1D"
},
"subject": [
{
"code": "patopic:showbiz",
"name": "Showbiz",
"profile": "patopic",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "about"
},
{
"code": "pakeyword:christmas",
"name": "Christmas",
"profile": "pakeyword",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "about"
}
],
"description_text": "Showbiz Christmas 11/11/2019",
"links": [
{
"rel": "self",
"href": "https://content.api.pressassociation.io/v1/event/paevent:d2c82789f84b167e0b92d6775dce6779c304a81e5bd268d933b7a752e4e14086"
},
{
"rel": "item-collection",
"href": "https://content.api.pressassociation.io/v1/event/paevent:d2c82789f84b167e0b92d6775dce6779c304a81e5bd268d933b7a752e4e14086/item"
}
]
},
{
"uri": "paevent:fef7d22c2331911e216784ee41ebdb84f240316a18d16b93d348e62a49622705",
"profile": "paevent",
"version": "1",
"firstcreated": "2019-11-11T05:47:27Z",
"versioncreated": "2019-11-11T05:47:27Z",
"pubstatus": "usable",
"dates": {
"start": "2019-11-11T00:00:00Z",
"end": "2019-11-12T00:00:00Z",
"duration": "P1D"
},
"subject": [
{
"code": "patopic:hong-kong",
"name": "Hong Kong",
"profile": "patopic",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "about"
},
{
"code": "pakeyword:protests",
"name": "Protests",
"profile": "pakeyword",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "about"
}
],
"description_text": "Hong Kong Protests 11/11/2019",
"links": [
{
"rel": "self",
"href": "https://content.api.pressassociation.io/v1/event/paevent:fef7d22c2331911e216784ee41ebdb84f240316a18d16b93d348e62a49622705"
},
{
"rel": "item-collection",
"href": "https://content.api.pressassociation.io/v1/event/paevent:fef7d22c2331911e216784ee41ebdb84f240316a18d16b93d348e62a49622705/item"
}
]
}
],
"links": [
{
"rel": "self",
"href": "https://content.api.pressassociation.io/v1/event"
}
]
}
Accessing the items for an event
Request
Items in an event can be accessed via the following URL pattern
curl \
-H "Accept: application/json" \
-H "apikey: <API KEY>" \
https://content.api.pressassociation.io/v1/event/:eventId/item
This example is a a request to get the content items for one of the entries above -
curl \
-H "Accept: application/json" \
-H "apikey: <API KEY>" \
https://content.api.pressassociation.io/v1/event/paevent:70a50ea7852469ea57a4cb3defa6c038149da021af02d81e5c7a95461d1bdd5c/item
A URL for this lookup call can be found in the links property of each event in the list response.
Response
For this event there has a single story and an image.
{
"total": 2,
"limit": 20,
"offset": 0,
"item": [
{
"uri": "504c884f-ff86-4627-9e51-d6e809746f89",
"type": "picture",
"profile": "asset",
"version": "1",
"contentcreated": "2019-11-11T15:33:39Z",
"firstcreated": "2019-11-11T15:39:14Z",
"versioncreated": "2019-11-11T15:39:14Z",
"issued": "2019-11-11T15:39:14Z",
"urgency": 6,
"pubstatus": "usable",
"copyrightholder": "PA PICTURE DESK",
"copyrightnotice": "Press Association Images",
"usageterms": "PICTURE DESK USE ONLY. NO SALES",
"language": "en",
"byline": "Nasa/SDO",
"headline": "Mercury passes sun",
"description_text": "Handout out photo issued by Nasa/SDO of Mercury as it makes a rare transit of the sun on Monday. The smallest planet in the solar system could be seen as a tiny black disc moving across the glowing orb, starting just after 12.35pm. However, poor weather conditions in parts the UK made it hard for some astronomers to see the event.",
"body_text": "Handout out photo issued by Nasa/SDO of Mercury as it makes a rare transit of the sun on Monday. The smallest planet in the solar system could be seen as a tiny black disc moving across the glowing orb, starting just after 12.35pm. However, poor weather conditions in parts the UK made it hard for some astronomers to see the event.",
"subject": [
{
"code": "paservice:news",
"name": "News",
"profile": "paservice",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "partOf"
},
{
"code": "contributor:group:image-provider",
"name": "Image Provider",
"profile": "contributor",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "contributedBy"
},
{
"code": "contributor:pa",
"name": "PA",
"profile": "contributor",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "contributedBy"
},
{
"code": "patopic:science",
"name": "SCIENCE",
"profile": "patopic",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "about"
},
{
"code": "pakeyword:mercury",
"name": "Mercury",
"profile": "pakeyword",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "about"
},
{
"code": "paservice:news:uk",
"name": "UK",
"profile": "paservice",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "partOf"
},
{
"code": "paservice:sci-tech",
"name": "Sci-Tech",
"profile": "paservice",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "partOf"
},
{
"code": "paservice:sci-tech:science",
"name": "Science",
"profile": "paservice",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "partOf"
}
],
"event": [
{
"code": "paevent:70a50ea7852469ea57a4cb3defa6c038149da021af02d81e5c7a95461d1bdd5c",
"name": "SCIENCE Mercury 11/11/2019",
"profile": "paevent",
"scheme": "https://content.api.pressassociation.io/v1/event",
"rel": "partOf"
}
],
"renditions": {
"original": {
"href": "https://image.assets.pressassociation.io/v2/image/production/3e6b13c46af1f07df7a89c0b23bd67a3/2.48264178.jpg",
"mimetype": "image/jpeg",
"height": 480,
"width": 854,
"orientation": "landscape"
}
},
"links": [
{
"rel": "self",
"href": "https://content.api.pressassociation.io/v1/item/504c884f-ff86-4627-9e51-d6e809746f89"
}
]
},
{
"uri": "7b518612-0a6d-4c3b-8876-4989ebe46f94",
"type": "composite",
"profile": "story",
"version": "1",
"firstcreated": "2019-11-11T15:38:19Z",
"versioncreated": "2019-11-11T15:38:19Z",
"issued": "2019-11-11T15:38:19Z",
"urgency": 6,
"ranking": 110,
"pubstatus": "usable",
"language": "en",
"byline": "By Jamie Harris and Nina Massey, PA",
"headline": "Observers catch rare glimpse of Mercury passing the sun",
"description_text": "However, poor weather conditions in parts of the UK made it hard for some astronomers to see the event.",
"description_html": "<p>However, poor weather conditions in parts of the UK made it hard for some astronomers to see the event.</p>",
"body_text": "Astronomers and space enthusiasts watched as Mercury made a rare transit of the sun on Monday.\n\nThe smallest planet in the solar system could be seen as a tiny black disc moving across the glowing orb, starting just after 12.35pm.\n\nMembers of the public wishing to see the special event were urged to join amateur astronomical societies and public observatories across the country to witness the occasion safely.\n\nHowever, poor weather conditions hampered some efforts to catch the occasion.\n\nThe last time Mercury passed the sun in this way was in 2016, but the next is not due to happen until 2032.\n\nNasa revealed some of the first images of the transit, taken from its satellite monitoring the sun.\n\nThe entire event is visible from the eastern United States and Canada, the south-western tip of Greenland, most of the Caribbean, central America, the whole of South America and some of west Africa.\n\nIn Europe – including the UK – the Middle East and most of Africa, the sun will set before the transit ends, and so the latter part of the event will not be visible.\n\nEvery 88 years Mercury completes each orbit around the sun, and passes between the Earth and sun every 116 days.\n\nBecause the planet’s orbit around the sun is tilted, it normally appears to pass above or below our nearest star.\n\nA transit can only take place when the Earth, Mercury and the sun are exactly in line in three dimensions.\n\nLooking at the sun without appropriate protection, either during the transit or at any other time, can cause serious and permanent damage to the eyes.",
"body_html": "<p>Astronomers and space enthusiasts watched as Mercury made a rare transit of the sun on Monday.</p><p>The smallest planet in the solar system could be seen as a tiny black disc moving across the glowing orb, starting just after 12.35pm.</p><p>Members of the public wishing to see the special event were urged to join amateur astronomical societies and public observatories across the country to witness the occasion safely.</p><p>However, poor weather conditions hampered some efforts to catch the occasion.</p><p>The last time Mercury passed the sun in this way was in 2016, but the next is not due to happen until 2032.</p><p>Nasa revealed some of the first images of the transit, taken from its satellite monitoring the sun.</p><p>The entire event is visible from the eastern United States and Canada, the south-western tip of Greenland, most of the Caribbean, central America, the whole of South America and some of west Africa.</p><p>In Europe – including the UK – the Middle East and most of Africa, the sun will set before the transit ends, and so the latter part of the event will not be visible.</p><p>Every 88 years Mercury completes each orbit around the sun, and passes between the Earth and sun every 116 days.</p><p>Because the planet’s orbit around the sun is tilted, it normally appears to pass above or below our nearest star.</p><p>A transit can only take place when the Earth, Mercury and the sun are exactly in line in three dimensions.</p><p>Looking at the sun without appropriate protection, either during the transit or at any other time, can cause serious and permanent damage to the eyes.</p>",
"subject": [
{
"code": "paservice:sci-tech",
"name": "Sci-Tech",
"profile": "paservice",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "partOf"
},
{
"code": "paservice:sci-tech:science",
"name": "Science",
"profile": "paservice",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "partOf"
},
{
"code": "paservice:news",
"name": "News",
"profile": "paservice",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "partOf"
},
{
"code": "paservice:news:uk",
"name": "UK",
"profile": "paservice",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "partOf"
},
{
"code": "patopic:science",
"name": "Science",
"profile": "patopic",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "about"
},
{
"code": "pakeyword:mercury",
"name": "Mercury",
"profile": "pakeyword",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "about"
},
{
"code": "paterritory:uk",
"name": "UK",
"profile": "paterritory",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "intendedFor"
},
{
"code": "paselection:featured",
"name": "Featured",
"profile": "paselection",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "selectedAs"
},
{
"code": "tag:mercury",
"name": "Mercury",
"profile": "tag",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "about"
},
{
"code": "tag:nasa",
"name": "Nasa",
"profile": "tag",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "about"
},
{
"code": "tag:space",
"name": "Space",
"profile": "tag",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "about"
},
{
"code": "tag:sun",
"name": "Sun",
"profile": "tag",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "about"
},
{
"code": "contributor:pa",
"name": "PA",
"profile": "contributor",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "contributedBy"
}
],
"event": [
{
"code": "paevent:70a50ea7852469ea57a4cb3defa6c038149da021af02d81e5c7a95461d1bdd5c",
"name": "Science Mercury 11/11/2019",
"profile": "paevent",
"scheme": "https://content.api.pressassociation.io/v1/event",
"rel": "partOf"
}
],
"links": [
{
"rel": "self",
"href": "https://content.api.pressassociation.io/v1/item/7b518612-0a6d-4c3b-8876-4989ebe46f94"
}
]
}
],
"links": [
{
"rel": "self",
"href": "https://content.api.pressassociation.io/v1/event/paevent:70a50ea7852469ea57a4cb3defa6c038149da021af02d81e5c7a95461d1bdd5c/item"
}
]
}
Alternative lookup
The look for an Event's items can also be done in the following way.
This performs a search against the item endpoint and filters for a certain event id.
curl \
-H "Accept: application/json" \
-H "apikey: <API KEY>" \
https://content.api.pressassociation.io/v1/item?event=paevent:70a50ea7852469ea57a4cb3defa6c038149da021af02d81e5c7a95461d1bdd5c
Updated about 5 years ago