Service FAQ

This page will cover any frequently asked questions regarding the Service resource

What services are available in the Content API?

Services are the main channels of content available from PA, with each broken down further by two or more sub-services. The services are:

CreateReadyNow
News
Sport
Entertainment
Finance
Sci-Tech
Lifestyle
Viral
Real Life
Motoring

Why can I only see a small number of services?

Content API is built around an entitlement model which basically means when we provision your API key we activate certain services against it (e.g. the News or Sport services). When you make a request to the Service Collection endpoint you will only ever see the services or sub-services you're entitled to access.

If you'd like to expand these services please contact the PA Commercial team on 020 7963 7624.

How do I see just the parent services (e.g. News, Sport, Motoring, Real Life)?

To return just the parent or top-level services you can utilise the query functionality. You can request that all services are returned that do not have subject properties with a profile of paservice.

Making the following request will list all available (and entitled) parent services:

curl \
  -H "Accept: application/json" \
  -H "apikey: <API KEY>" \
  https://content.api.pressassociation.io/v1/service?query=!subject.profile:"paservice"

How do I see what sub-services exist for a service?

A service can have several sub-services, for example the service "Sport" has several sub-services including: Football, Tennis and F1.

Making the following request will list all available (and entitled) sub-services for a service:

curl \
  -H "Accept: application/json" \
  -H "apikey: <API KEY>" \
  https://content.api.pressassociation.io/v1/service?parentSubject=paservice:sport

How I paginate through services?

Please refer to the Pagination section of this documentation.

How do I get return Atom or RSS?

Please refer to the Content Negotiation section of this documentation.

How do I get items for a service?

There are two methods of retrieving items for a service.

The first (and more verbose) way is to query the /item endpoint by providing a subject parameter, for example:

curl \
  -H "Accept: application/json" \
  -H "apikey: <API KEY>" \
  https://content.api.pressassociation.io/v1/item?subject=paservice:sport

The alternative, shortcut version is to simply call the item endpoint of the service resource, for example:

curl \
  -H "Accept: application/json" \
  -H "apikey: <API KEY>" \
  https://content.api.pressassociation.io/v1/service/paservice:sport/item

How do I use partial response to customise the JSON fields that are returned?

Please refer to the Partial Response section of this documentation.

Article metadata

Articles in each service carry a range of metadata to identify the subject matter and, where appropriate, type of story, geographical territory, plus additional categories for sport content.