Football Clubs and Competitions

Query for available clubs

You can query the subject endpoint to retreive a list of Football clubs that the Content API contains content for.

Below is an example of that query that contains 100 entries and uses partial response to only show the url and club name.

curl \
  -H "Accept: application/json" \
  -H "apikey: <API KEY>" \
  https://content.api.pressassociation.io/v1/subject?parentSubject=club:pafootball&limit=100&fields=item(uri,description_text)

In order to get all the results you can increment the offset url parameter to get the subsequent pages.

Below is an example of that, requesting the 2nd page from the previous example.

curl \
  -H "Accept: application/json" \
  -H "apikey: <API KEY>" \
  https://content.api.pressassociation.io/v1/subject?parentSubject=club:pafootball&limit=100&fields=item(uri,description_text)&offset=100

Query for stories based on a Club id

This example relies on the example from the previous section about obtaining a list of Clubs.

From the result of the previous example, an entry for an individual club looks like this:

{
  "uri": "club:pafootball:15",
  "description_text": "Nottm Forest"
},

In order to get stories for this club, the value of uri can be passed to the subject or andSubject url parameter on the item endpoint.

An example of this query for the Ready product would be:

curl \
  -H "Accept: application/json" \
  -H "apikey: <API KEY>" \
  https://content.api.pressassociation.io/v1/item?andSubject=club:pafootball:15&product=paproduct:ready

🚧

Entitled content

Please note that the end item endpoint filters content based on what you are entitled to see.
If the result of this request is empty then it might be because the subscription in use hasn't got access to our sports content.
Please talk to you account manager if this is the case.

Query for available Competitions

You can query the subject endpoint to retreive a list of Football competitions that the Content API contains content for.

Below is an example of that query that contains 100 entries and uses partial response to only show the url and competition name.

curl \
  -H "Accept: application/json" \
  -H "apikey: <API KEY>" \
  https://content.api.pressassociation.io/v1/subject?parentSubject=competition:pafootball&limit=100&fields=item(uri,description_text)

In order to get all the results you can increment the offset url parameter to get the subsequent pages.

Below is an example of that, requesting the 2nd page from the previous example.

curl \
  -H "Accept: application/json" \
  -H "apikey: <API KEY>" \
  https://content.api.pressassociation.io/v1/subject?parentSubject=club:pafootball&limit=100&fields=item(uri,description_text)&offset=100

Query for stories based on a Competition id

This example relies on the example from the previous section about obtaining a list of competitions.

From the result of the previous example, an entry for an individual competition looks like this:

{
  "uri": "competition:pafootball:100",
  "description_text": "Premier League"
},

In order to get stories for this competition, the value of uri can be passed to the subject or andSubject url parameter on the item endpoint.

An example of this query for the Ready product would be:

curl \
  -H "Accept: application/json" \
  -H "apikey: <API KEY>" \
  https://content.api.pressassociation.io/v1/item?andSubject=competition:pafootball:100&product=paproduct:ready

🚧

Entitled content

Please note that the end item endpoint filters content based on what you are entitled to see.
If the result of this request is empty then it might be because the subscription in use hasn't got access to our sports content.
Please talk to you account manager if this is the case.