Skip to main content

Filtering API responses by tag category

Specify the tag_category_id parameter to filter. The specification of this parameter takes into account the parent-child relationship of tag categories.

Content Examples

Results of filtering the following contents are as follows.

Topic IDTitleTag Category IDTag Category NameTag IDTag Name
1152Content of parent category7Parent tag category186ParentTag
1153Content of child category8Child tag category187ChildTag
1154Content of grandchild category9Grandchild tag category188GrandchildTag
  • Tag category settings Image from Gyazo

  • Tag list Image from Gyazo

  • Content list Image from Gyazo

Filtering by tag_category_id

Filtering by tag_category_id takes into account the parent-child relationship of tag categories, and returns a list of content with tags belonging to the specified tag category and its subcategories.

Specifying tag_category_id=[7]

Displays "Content of parent category", "Content of child category", and "Content of grandchild category".

Request URL:
https://example.g.kuroco.app/rcms-api/13/news?tag_category_id=7

Response Body:

{
"errors": [],
"messages": [],
"list": [
{
"topics_id": 1152,
"ymd": "2023-02-16",
"contents_type": 17,
"contents": "",
"subject": "Content of parent category",



"tags": [
{
"tag_id": 186,
"tag_nm": "ParentTag",
"open_contents_cnt": 1,
"all_contents_cnt": 1,
"inst_ymdhi": "2023-02-16T15:40:07+09:00",
"update_ymdhi": "2023-02-16T15:40:52+09:00",
"tag_category_id": 7,



}
],



},
{
"topics_id": 1153,
"ymd": "2023-02-16",
"contents_type": 54,
"contents": "",
"subject": "Content of child category",



"tags": [
{
"tag_id": 187,
"tag_nm": "ChildTag",
"open_contents_cnt": 1,
"all_contents_cnt": 1,
"inst_ymdhi": "2023-02-16T15:40:21+09:00",
"update_ymdhi": "2023-02-16T15:40:52+09:00",
"tag_category_id": 8,



}
],



},
{
"topics_id": 1154,
"ymd": null,
"contents_type": 55,
"contents": "",
"subject": "Content of grandchild category",



"tags": [
{
"tag_id": 188,
"tag_nm": "GrandchildTag",
"open_contents_cnt": 1,
"all_contents_cnt": 1,
"inst_ymdhi": "2023-02-16T15:40:34+09:00",
"update_ymdhi": "2023-02-16T15:40:52+09:00",
"tag_category_id": 9,



}
],



}
],
"pageInfo": {
"totalCnt": 3,



}
}

Specifying tag_category_id=[8]

Displays "Content of child category" and "Content of grandchild category".

Request URL:
https://example.g.kuroco.app/rcms-api/13/news?tag_category_id=8

Response Body:

{
"errors": [],
"messages": [],
"list": [
{
"topics_id": 1153,
"ymd": "2023-02-16",
"contents_type": 54,
"contents": "",
"subject": "Content of child category",



"tags": [
{
"tag_id": 187,
"tag_nm": "ChildTag",
"open_contents_cnt": 1,
"all_contents_cnt": 1,
"inst_ymdhi": "2023-02-16T15:40:21+09:00",
"update_ymdhi": "2023-02-16T15:40:52+09:00",
"tag_category_id": 8,



}
],



},
{
"topics_id": 1154,
"ymd": null,
"contents_type": 55,
"contents": "",
"subject": "Content of grandchild category",



"tags": [
{
"tag_id": 188,
"tag_nm": "GrandchildTag",
"open_contents_cnt": 1,
"all_contents_cnt": 1,
"inst_ymdhi": "2023-02-16T15:40:34+09:00",
"update_ymdhi": "2023-02-16T15:40:52+09:00",
"tag_category_id": 9,



}
],



}
],
"pageInfo": {
"totalCnt": 2,



}
}

Support

If you have any other questions, please contact us or check out Our Slack Community.