Images no longer included in body text?

53 views
Skip to first unread message

Phil Gyford

unread,
May 2, 2024, 5:09:19 AMMay 2
to Guardian Open Platform API Forum
I think that in the past, when an article had images within the body text, their HTML tags were included in the "body" field. But I've noticed recently that some/all articles no longer do this. The images' details are included in the "elements" field though.

Is there a way to determine via the API where these images would appear within the body text?



Thanks,
Phil

Guardian Open Platform API Forum

unread,
May 3, 2024, 8:32:51 AMMay 3
to Guardian Open Platform API Forum
Hi Phil,

Thanks for bringing this to our attention.  There were indeed some changes made to the provision of images in our API feeds at the request of our Licensing department; it seems that stripping the images out of the body text was a part of this.  We'll have a look to see if there's a way to find image insertion points and try to come back to you next week.

Have a good weekend!

Guardian Open Platform API Forum

unread,
May 7, 2024, 12:18:01 PMMay 7
to Guardian Open Platform API Forum
Hi Phil,

As mentioned, this is the effect of updated image licensing rules for the developer API tier.

What you're seeing in the article you reference is correct insofar as the only image that is permitted is what is considered the "main" image for the article, and in this case the main image happens to appear in the "main" field, and in top-level elements with relation "main" and "thumbnail", the main block and the main block's elements. This image does not appear in the article's body field, elements or blocks.

Typically an article will have a main image, and this may appear in one or both of the main or body fields, elements and blocks, but only that image will be provided.

The other images that appear in this particular article on the website are different to the main image and are not available to the developer tier under the updated licensing rules.

If you have a requirement for additional images beyond those available to the developer tier, please feel free to reach out to our licensing team through the commercial key request form at https://open-platform.theguardian.com/access/

Many thanks.

On Thursday 2 May 2024 at 10:09:19 UTC+1 ph...@gyford.com wrote:

Phil Gyford

unread,
May 8, 2024, 8:33:11 AMMay 8
to Guardian Open Platform API Forum
Thanks for the clarification!

A shame that the extra images aren't available, but I understand.

Phil

Reply all
Reply to author
Forward
0 new messages