> For the complete documentation index, see [llms.txt](https://docs.mediarithmics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mediarithmics.io/api-reference/contextual-targeting/contextual-targeting-related-categories.md).

# Contextual Targeting Related Categories

Operations related to Contextual Targeting Related Categories that define relationships between content categories.

## GET /communities/{community\_id}/contextual/categories/{iab\_category\_id}/related\_categories

> List all IAB categories linked to a given IAB category based on a relevance score

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Contextual Targeting Related Categories","description":"Operations related to Contextual Targeting Related Categories that define relationships between content categories."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/communities/{community_id}/contextual/categories/{iab_category_id}/related_categories":{"get":{"summary":"List all IAB categories linked to a given IAB category based on a relevance score","description":"","parameters":[{"in":"path","schema":{"type":"string"},"required":true,"style":"simple","description":"IAB categories are linked to a channel that are linked to a datamart. You can look for all the IAB categories of any datamart within the community.","explode":false,"name":"community_id"},{"required":true,"name":"iab_category_id","schema":{"type":"string"},"style":"simple","explode":false,"description":"IAB category to look for related categories","in":"path"},{"description":"Offset from which the search must be performed","style":"form","in":"query","explode":true,"schema":{"type":"integer","format":"int32"},"required":false,"name":"first_result"},{"in":"query","style":"form","name":"max_results","required":false,"schema":{"type":"integer","format":"int32"},"description":"Number of maximum items that shall be return by this search","explode":true}],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ContextualTargetingRelatedIABCategoryResource"}},"first_result":{"type":"integer"},"max_results":{"type":"integer"},"total":{"type":"integer"},"count":{"type":"integer"}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"operationId":"getContextualTargetingRelatedEntities","tags":["Contextual Targeting Related Categories"]}}},"components":{"schemas":{"ContextualTargetingRelatedIABCategoryResource":{"allOf":[{"$ref":"#/components/schemas/ContextualTargetingIABCategory"},{"type":"object","properties":{"relevance":{"type":"number","readOnly":true,"format":"float","default":0},"related_to":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true},"url_count":{"readOnly":true,"format":"int64","default":0,"type":"integer"},"last_30_days_page_views":{"readOnly":true,"format":"int64","default":0,"type":"integer"}},"required":["id","name","related_to","relevance"]}]},"ContextualTargetingIABCategory":{"type":"object"},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mediarithmics.io/api-reference/contextual-targeting/contextual-targeting-related-categories.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
