> For the complete documentation index, see [llms.txt](https://docs.suggestic.com/graphql/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.suggestic.com/graphql/query/queries/content/content-library-1.md).

# Content Categories

Query content library articles

Use the `contentCategories` query to retrieve a list of content categories.

### Available Arguments

| **Arguments** | **Type**  | **Description**                                                                                                                   |
| ------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `after`       | String    | See [pagination](https://docs.suggestic.com/graphql/start-here/tutorials-and-walkthroughs/pagination).                            |
| `before`      | String    | See [pagination](https://docs.suggestic.com/graphql/start-here/tutorials-and-walkthroughs/pagination).                            |
| `first`       | Int       | See [pagination](https://docs.suggestic.com/graphql/start-here/tutorials-and-walkthroughs/pagination).                            |
| `id`          | ID        | Id of caregory.                                                                                                                   |
| `last`        | Int       | See [pagination](https://docs.suggestic.com/graphql/start-here/tutorials-and-walkthroughs/pagination).                            |
| `tags`        | \[String] | Content [tags](https://app.gitbook.com/o/-LwqSh0rNboNaGEQruZQ/s/-LwqSnBDpAb6mFZYLsuB/~/changes/1886/objects/content/content-tag). |

### Available Fields

| **Field**    | **Type**             | **Description**                                                                                                                                |
| ------------ | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `categories` | \[contentCategories] | List of [categories](https://app.gitbook.com/o/-LwqSh0rNboNaGEQruZQ/s/-LwqSnBDpAb6mFZYLsuB/~/changes/1886/objects/content/content-categories). |

### Example with Category Filter

{% tabs %}
{% tab title="Query" %}

```graphql
query{contentCategories(first:1 tags:["faqs"]){
  edges{node{
    name
    id
    lang
    image
    subcategories{
      name
      id
    }
    tags{
      name
      id
    }
  }}
}}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "data": {
    "contentCategories": {
      "edges": [
        {
          "node": {
            "name": "Account",
            "id": "Q29udGVudENhdGVnb3J5OjcyZjE5ZGM0LTM4MTktNDMyOC1iZWQ3LWE2NTI5MTcxNDBhNw==",
            "lang": "{\"es\": {\"name\": \"Cuenta\"}}",
            "image": null,
            "subcategories": [],
            "tags": [
              {
                "name": "faqs",
                "id": "Q29udGVodFRhZzo0ZDAyOTIxOC1kYWJjLTQxNmEtYWExNS02MWFmMGJhZTViZGM="
              }
            ]
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}
