Hi Hari Krishnan,
It sounds like you’re looking to know what the different categories are for news available from the content api, but I don’t think there’s a good answer to this question because how pieces of content are categories in the API is a bit more complicated. Each piece of content is labelled with a number of tags, some of which indicate the type of news it is. For example,
this piece currently has 8 tags:
- sport/olympic-games-2024
- sport/olympic-games
- sport/sport
- sport/athletics
- type/article
- tone/news
- profile/guardian-sport
- tracking/commissioningdesk/uk-sport
Here, the presence of type/article shows this is an article, and sport/sport shows it is an article about sport. The
API documentation describes how to use
the tags endpoint to find the tags that currently exist, and you can then search for content with those tags by using the “tag” query parameter on the content endpoint. I hope this helps: let me know if you’re stuck!
Best wishes,
Emily
May I know the how many category news support in the api
(ex sports, business)
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