Skip to content

Media Categories Search

v1.0.0
OpenAPI 3.1.0

Upriver API

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.

Server:https://api.upriver.ai

Production API server

Client Libraries

Media Categories Search

Find the most relevant categories from the taxonomy for a given freeform text. Useful for discovering the best category for brand industries, target audiences, etc. Returns ordered matches with confidence scores.

Body·CategorySearchInput
required
application/json

Input for category search endpoint.

  • text
    Type: string · Text
    required

    Freeform text to match against category taxonomy

  • top_k
    Type: integer · Top K
    min:  
    1
    max:  
    20

    Number of categories to return, ordered by relevance

Responses
  • application/json
  • application/json
Request Example for post/v1/categories/search
curl https://api.upriver.ai/v1/categories/search \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: YOUR_SECRET_TOKEN' \
  --data '{
  "text": "telehealth and men'\''s health",
  "top_k": 5
}'
{
  "matches": [
    {
      "category_id": "string",
      "display_name": "string",
      "level": 1,
      "parent_id": "string",
      "confidence": 0,
      "reason": "string"
    }
  ],
  "query_text": "string"
}