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

# CPC Categories

> The canonical category catalog used to target CPC widgets: top-level groups (Age, Ethnicity, Body Type, …), each with its pickable tags. Only active entries are returned, in display order.

Mirror it into your own DB. `version` is a fingerprint of the whole catalog and changes only when the catalog changes, so poll it and re-sync only when it differs from the one you stored.

No parameters, no pagination: the full catalog is returned in one response.

The category catalog used to target CPC widgets. It has two levels:

* **Groups** (`categories[]`): top-level groups such as Age, Ethnicity or Body Type. A group itself can't be picked.
* **Tags** (`categories[].tags[]`): the pickable values inside each group.

Only active entries are returned, in display order. The endpoint takes no parameters and isn't paginated: the full catalog comes in one response.

## Tag fields

| Field            | Description                                                                                              |
| ---------------- | -------------------------------------------------------------------------------------------------------- |
| `slug`           | Stable identifier. Use it as the key when you mirror the catalog                                         |
| `name`           | Human-readable name                                                                                      |
| `gender`         | Audience the tag applies to: `female`, `male`, `couple`, `trans`, `any`, or an empty string when not set |
| `search_phrases` | Synonyms used to match a page title to this tag. Can be empty                                            |

## Keeping your copy in sync

Mirror the catalog into your own database instead of requesting it on every page load:

1. Fetch the catalog and store it together with `version`.
2. Poll the endpoint periodically and compare the returned `version` with the one you stored.
3. Re-sync only when `version` differs. It changes only when the catalog itself changes.

<Info>
  Match groups and tags by `slug`, not by `name`. Names can be edited, slugs stay the same.
</Info>


## OpenAPI

````yaml api/openapi-partners.json GET /api/marketer/cpc/categories
openapi: 3.0.2
info:
  title: OnlyTraffic Marketer API
  version: 2.0.0
  description: >-
    Partner (marketer) API for OnlyTraffic.


    **Authentication:** pass your API key in the `Authorization` header.


    **Pagination:** all list endpoints accept `offset` (default 0) and `limit`
    (default 50, max 1000) as query parameters or JSON body fields.


    **Dates:** every timestamp field has two variants — an ISO 8601 string
    (`*_at`) and a Unix timestamp integer (`*_at_ts` / `*_ts`).


    **Legacy endpoints** (`?do=…`) are still available for backward
    compatibility but are not extended further.
servers:
  - url: https://partner.onlytraffic.com
security: []
tags:
  - name: RevShare
    description: RevShare campaigns and financial data
  - name: CPL
    description: Cost-Per-Lead orders placed against your offers
  - name: CPC
    description: Cost-Per-Click orders and the category catalog
  - name: Subscribers
    description: Fans acquired through your campaigns
  - name: Stats
    description: Dashboard-style statistics widgets (fans, income, conversion)
  - name: Legacy
    description: Old `?do=` endpoints kept for backward compatibility
paths:
  /api/marketer/cpc/categories:
    get:
      tags:
        - CPC
      summary: CPC category catalog
      description: >-
        The canonical category catalog used to target CPC widgets: top-level
        groups (Age, Ethnicity, Body Type, …), each with its pickable tags. Only
        active entries are returned, in display order.


        Mirror it into your own DB. `version` is a fingerprint of the whole
        catalog and changes only when the catalog changes, so poll it and
        re-sync only when it differs from the one you stored.


        No parameters, no pagination: the full catalog is returned in one
        response.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                oneOf:
                  - title: Success
                    type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - success
                      version:
                        type: string
                        pattern: ^[0-9a-f]{16}$
                        description: >-
                          Catalog fingerprint (16 hex chars). Changes only when
                          the catalog changes.
                      count:
                        type: integer
                        description: Number of top-level groups in `categories`.
                      categories:
                        type: array
                        items:
                          $ref: '#/components/schemas/CpcCategory'
                  - $ref: '#/components/schemas/ErrorResponse'
              example:
                status: success
                version: 3f9a1c07b2e4d856
                count: 1
                categories:
                  - slug: age
                    name: Age
                    tags:
                      - slug: 18-year-old
                        name: 18 year old
                        gender: female
                        search_phrases:
                          - 18yo
                          - 18 year old
                          - barely legal
                      - slug: milf
                        name: MILF
                        gender: female
                        search_phrases:
                          - milf
                          - mature
      security:
        - api_key: []
components:
  schemas:
    CpcCategory:
      type: object
      description: >-
        Top-level category group. The group itself is not pickable, only its
        tags are.
      properties:
        slug:
          type: string
        name:
          type: string
        tags:
          type: array
          items:
            $ref: '#/components/schemas/CpcCategoryTag'
    ErrorResponse:
      title: Error
      type: object
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
          description: Human-readable error description.
        error_code:
          type: integer
          description: '422: bad request params. 404: not found. 429: rate limit exceeded.'
    CpcCategoryTag:
      type: object
      properties:
        slug:
          type: string
          description: Stable identifier, use it as the key when mirroring.
        name:
          type: string
          description: Human-readable name.
        gender:
          type: string
          enum:
            - female
            - male
            - couple
            - trans
            - any
            - ''
          description: Audience gender the tag applies to. Empty string when not set.
        search_phrases:
          type: array
          items:
            type: string
          description: Synonyms used to match a page title to this tag. May be empty.
  securitySchemes:
    api_key:
      type: apiKey
      name: Authorization
      in: header

````