Short URL is changing

51 views
Skip to first unread message

Justin Pinner

unread,
Feb 15, 2021, 11:10:59 AM2/15/21
to Guardian Open Platform API Forum

Hi Everyone,

The Guardian Open Platform will soon be changing the way it exposes the Guardian's short URL field in its responses.

The short URL was originally introduced as a convenient way to share Guardian content on social platforms where the number of characters any message could contain was restricted, and this also applied to shared links.

As these limitations are no longer relevant, and because the additional redirections that occur whilst resolving gu.com addresses to theguardian.com increase latency, we will be removing gu.com from the short URL and will begin serving www.theguardian.com in its place.

If you rely on the current format of the short URL for any reason, you may need to update your systems to accommodate the change. To help you determine if changes are necessary, The Open Platform is able to provide a preview of the short URL in its new format if the parameter long-domain-short-url=true is added to your requests.

For example;

https://content.guardianapis.com/search?show-fields=shortUrl&long-domain-short-url=true&api-key=your-key

We intend to make this change apply to all requests from March 1st 2021, which we hope allows you sufficient time for testing.

Thanks for using the Guardian's Open Platform.

-----

Justin Pinner
Software Developer
Content Platforms Team

Reply all
Reply to author
Forward
0 new messages