> ## Documentation Index
> Fetch the complete documentation index at: https://docs.upriver.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Media Categories

> Returns the media categories split into L1 (top-level) and L2 (second-level) lists. These categories can be used as a filter for sponsors, sponsorships. and other endpoints which support filtering by categories.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/media_categories
openapi: 3.1.0
info:
  title: Upriver API
  description: >-
    A social insights API for ad generation platforms. It provides structured
    signals, like psychographics, behavioral insights, trends, and audience
    language, to help AI models generate relevant, higher-converting ads.
  version: 1.0.0
servers:
  - url: https://api.upriver.ai
    description: Production API server
security: []
tags:
  - name: Brands
  - name: Products
  - name: Creators
  - name: Audience
  - name: Sponsorships
  - name: Trends
  - name: Breakout Topics
  - name: Taxonomy
paths:
  /v1/media_categories:
    get:
      tags:
        - Taxonomy
      summary: Media Categories
      description: >-
        Returns the media categories split into L1 (top-level) and L2
        (second-level) lists. These categories can be used as a filter for
        sponsors, sponsorships. and other endpoints which support filtering by
        categories.
      operationId: media_categories
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CategoriesResponse'
      security:
        - APIKeyHeader: []
components:
  schemas:
    CategoriesResponse:
      properties:
        l1:
          items:
            $ref: '#/components/schemas/TaxonomyCategory'
          type: array
          title: L1
          description: Top-level categories (level=1)
        l2:
          items:
            $ref: '#/components/schemas/TaxonomyCategory'
          type: array
          title: L2
          description: Second-level categories (level=2)
      type: object
      required:
        - l1
        - l2
      title: CategoriesResponse
      description: Response containing lists of L1 and L2 taxonomy categories.
    TaxonomyCategory:
      properties:
        category_id:
          type: string
          title: Category Id
          description: Stable category slug id
        display_name:
          type: string
          title: Display Name
          description: Human-readable name
        level:
          type: integer
          title: Level
          description: 'Hierarchy level: 1 for L1, 2 for L2'
        parent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Id
          description: Parent category id (for L2 items)
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Optional description
        aliases:
          items:
            type: string
          type: array
          title: Aliases
          description: Known aliases
      type: object
      required:
        - category_id
        - display_name
        - level
      title: TaxonomyCategory
      description: A single taxonomy category item (L1 or L2).
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````