Categories/sources list

16 views
Skip to first unread message

Kristi Papallazo

unread,
Aug 15, 2024, 4:50:37 AMAug 15
to Guardian Open Platform API Forum
Hello, 

I am creating a News app with this api, and the problem I have is that I want to have a category and source list, so users select the category/source. Is there any endpoint to get a list of categories or sources? Or do I need to create the categories list from the articles list? 

Please let me know, it will help me a lot. 

Looking forward to hearing from you. 

Best regards, 
Kristi.

Emily Bourke

unread,
Aug 15, 2024, 5:33:56 AMAug 15
to papalla...@gmail.com, guardian...@googlegroups.com
Hi Kristi,

There is an endpoint for retrieving tags, which is described in the documentation on the open-platform website:

Tags

The tags endpoint (/tags) returns all tags in the API. All Guardian content is manually categorised using these tags, of which there are more than 50,000.

A tag is a piece of data that we use to categorise our content. We use many different tags so understanding what they mean is important, and with new ones being added all the time you'll want to make sure to keep up to date with the changes.

For example, this article contains many tags including:

  • environment/recycling
  • environment/plasticbags
  • environment/energyefficiency

You can use these tags in your own queries to find other content that has the same tags, for example environment/recycling, like this:

https://content.guardianapis.com/search?tag=environment/recycling&api-key=test

Or you can search for tags containing the term green in the tag itself.

Finally, tags have types:

  • keyword -- a word describing what this piece of content is about
  • series -- the name of a regularly produced content feature, such as podcasts or columns, eg. 'Band of the week'
  • contributor -- the author or authors of a content item
  • tone -- the intent of the content, such as feature or obituary
  • type -- the media type, such as article, poll, video, etc
  • blog -- the name of one of the Guardian's blogs

I think this should cover your category needs, but I’m not sure exactly what you mean by source – would you mind explaining a bit more?

Best wishes,
Emily

--
You received this message because you are subscribed to the Google Groups "Guardian Open Platform API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to guardian-api-t...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/guardian-api-talk/eae0180e-b35a-4c11-8f34-55a8c904543cn%40googlegroups.com.


This e-mail and all attachments are confidential and may also be privileged. If you are not the named recipient, please notify the sender and delete the e-mail and all attachments immediately. Do not disclose the contents to another person. You may not use the information for any purpose, or store, or copy, it in any way.  Guardian News & Media Limited is not liable for any computer viruses or other material transmitted with or as part of this e-mail. You should employ virus checking software.
 
Guardian News & Media Limited is a member of Guardian Media Group plc. Registered Office: PO Box 68164, Kings Place, 90 York Way, London, N1P 2AP.  Registered in England Number 908396


Reply all
Reply to author
Forward
0 new messages