Item FAQ

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

Why can I only see a small number of items?

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 Item Collection endpoint you will only ever see items belonging to services and sub-services you're entitled to access.

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

How I paginate through items?

Please refer to the Pagination section of this documentation.

How do I return Atom or RSS?

Please refer to the Content Negotiation section of this documentation.

How do I search for items using specific fields?

To search for items using a specific field you can pass the field and an example value to the "query" parameter.

Making the following request will only return items written by "Laura Dennison".

curl \
  -H "Accept: application/json" \
  -H "apikey: <API KEY>" \
  https://content.api.pressassociation.io/v1/item?query=?query=byline:'laura dennison'

What HTML elements are used in the item's html fields?

Text

The majority of an item's body_html field contains a list of <p> elements with text inside.

Links

The <a> element is used for a link. This may be inside a <p>element.

<p>Intrepid (<a href=\"http://intrepidtravel.com\" target=\"_blank\" rel=\"noopener noreferrer\">intrepidtravel.com</a>) offers the 12-day women&rsquo;s-only Turkey expedition from &pound;2,195pp, including flights, transport, activities and most meals. Departures from April 2024.</p>

Bold

The <strong> element is used for bolded text. This may be inside a <p>element.

<p><strong>How to plan your trip</strong></p>

Italics

The <em> element is used for italicised text. This may be inside a <p> element.

<p>This trip will take you <em>around the world!</em></p>

Image

<!-- EMBED START Image { id: \"embedded273346881\" } -->
<figure id=\"embedded273346881\"><img
    src=\"//image.assets.pressassociation.io/v2/image/production/5c6308519a6e7f1763ddb68717f851acY29udGVudHNlYXJjaGFwaSwxNjkyMjczNDUx/2.73346881.jpg?w=640\"
    alt=\"England fans hugging\" data-title=\"Fans watch Australia v England\" data-copyright-holder=\"PA Wire\"
    data-copyright-notice=\"PA Wire/PA Images\" data-credit=\"Victoria Jones\" data-usage-terms=\"Use subject to
    restrictions. Editorial use only, no commercial use without prior consent from rights holder.\"
    srcset=\"https://image.assets.pressassociation.io/v2/image/production/5c6308519a6e7f1763ddb68717f851acY29udGVudHNlYXJjaGFwaSwxNjkyMjczNDUx/2.73346881.jpg?w=320
    320w,
    https://image.assets.pressassociation.io/v2/image/production/5c6308519a6e7f1763ddb68717f851acY29udGVudHNlYXJjaGFwaSwxNjkyMjczNDUx/2.73346881.jpg?w=640
    640w,
    https://image.assets.pressassociation.io/v2/image/production/5c6308519a6e7f1763ddb68717f851acY29udGVudHNlYXJjaGFwaSwxNjkyMjczNDUx/2.73346881.jpg?w=1280
    1280w\" sizes=\"(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\">
  <figcaption>Fans hugged and celebrated as the Lionesses reached the final (Victoria Jones/PA)</figcaption>
</figure>
<!-- EMBED END Image { id: \"embedded273346881\" } -->

Video

<!-- EMBED START StreamAMG { id: \"embedded0_by10ps7k\", urn: \"urn:pressassociation:video:150336\" } -->
<figure id=\"0_by10ps7k\" data-urn=\"urn:pressassociation:video:150336\">
  <div style=\"width: 100%; display: inline-block; position: relative;\">
    <div id=\"dummy\" style=\"margin-top: 56.25%;\"></div>
    <div id=\"kaltura_player_2556780087\" style=\"position:absolute; top:0; left:0; left: 0; right: 0; bottom: 0;\"
      data-player-config='{\"partner\": \"3001090\", \"uiConf\": \"30024158\", \"entryId\": \"0_by10ps7k\"}'></div>
  </div>
  <script type=\"text/javascript\" src=\"//pa.streamamg.com/player-embed/loader.js\"></script>
</figure>
<!-- EMBED END StreamAMG { id: \"embedded0_by10ps7k\", urn: \"urn:pressassociation:video:150336\" } -->

Tweet

<!-- EMBED START Twitter { src: \"https://twitter.com/KensingtonRoyal/status/1691782820727783486?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Etweet\" } -->
<figure>
  <blockquote class=\"twitter-tweet\" data-width=\"525\" data-dnt=\"true\">
    <p lang=\"en\" dir=\"ltr\">What a phenomenal performance from the <a
        href=\"https://twitter.com/Lionesses?ref_src=twsrc%5Etfw\">@Lionesses</a> &ndash; on to the final!
      Commiserations to <a href=\"https://twitter.com/TheMatildas?ref_src=twsrc%5Etfw\">@TheMatildas</a>, you've played
      brilliantly and been fantastic co-hosts of this World Cup. W</p>
    <p>&mdash; The Prince and Princess of Wales (@KensingtonRoyal) <a
        href=\"https://twitter.com/KensingtonRoyal/status/1691782820727783486?ref_src=twsrc%5Etfw\">August 16, 2023</a>
    </p>
  </blockquote>
  <script async src=\"//platform.twitter.com/widgets.js\" charset=\"utf-8\"></script>
</figure>
<!-- EMBED END Twitter { src: \"https://twitter.com/KensingtonRoyal/status/1691782820727783486?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Etweet\" } -->

Quote

<!-- EMBED START PA Quote -->
<figure>
  <div class=\"pa-embed\" data-type=\"quote\" data-quote=\"A World Cup final at football. It&rsquo;s been a while\"
    data-source=\"Gary Lineker\"></div>
  <script async src=\"//content-embed.pressassociation.com/embeds.js\" charset=\"utf-8\"></script>
</figure>
<!-- EMBED END PA Quote -->

Big Number

<!-- EMBED START PA Big Number -->
<figure>
  <div class=\"pa-embed pa-embed-big-number\" data-type=\"big-number\" data-numbervalue=\"&pound;2,426\"
    data-context=\"Qantas air fare\" data-source=\"Qantas website\"></div>
  <script async src=\"//content-embed.pressassociation.com/embeds.js\" charset=\"utf-8\"></script>
</figure> 
<!-- EMBED END PA Big Number -->

List of elements

A complete list of elements to be expected are

  • p
  • a
  • strong
  • em
  • div
  • figure
  • figcaption
  • blockquote
  • script
  • table
    • Only in Press Release content in PA Create