---
updatedAt: 2025-06-10T20:52:30.000Z
agentTools:
  projectIndex: https://docs.clerk.io/llms.txt
---

# recommendations/category/popular

The products in a given category (and subcategories) that are most popular among customers right now.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "api-settings",
    "version": "2"
  },
  "servers": [
    {
      "url": "https://api.clerk.io/v2"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "key",
        "in": "query",
        "x-default": "your_api_key"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/recommendations/category/popular": {
      "get": {
        "summary": "recommendations/category/popular",
        "description": "The products in a given category (and subcategories) that are most popular among customers right now.",
        "operationId": "recommendations-category-popular",
        "parameters": [
          {
            "name": "key",
            "in": "query",
            "description": "You store API key.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "description": "Category ID for the category you want popular products for.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of results to be returned.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "visitor",
            "in": "query",
            "description": "<small style=\"color: #eea236;\">Required for tracking</small><br/>Visitor ID for the given visitor. <br/> If `auto`, an anonymous ID is generated. <br/> See <a href=\"https://docs.clerk.io/docs/visitor-tracking\" target=\"_blank\">API documentation on Visitor Tracking</a> for details.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "labels",
            "in": "query",
            "description": "<small style=\"color: #eea236;\">Required for tracking</small><br/>A list of one or more text labels, used to track the labels performance in Analytics.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset into the result. See pagenation docs for a deeper specification on how to use pagenation.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "filter",
            "in": "query",
            "description": "A attribute filter to filter the result. See API documentation on Filters for details.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exclude",
            "in": "query",
            "description": "Array of product IDs to be excluded from the result. See API documentation on Filters for details.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "facets",
            "in": "query",
            "description": "List of facets to be returned for the products in the result. See API documentation on Facets for details.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "orderby",
            "in": "query",
            "description": "Attribute to order the results by.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order",
            "in": "query",
            "description": "Should the ordering from `orderby` be ascending (asc) or descending (desc).",
            "schema": {
              "type": "string",
              "default": "asc"
            }
          },
          {
            "name": "attributes",
            "in": "query",
            "description": "Product attributes to be provided in the response. See API documentation on Product Metadata for details.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "callback",
            "in": "query",
            "description": "JSONP - Wraps the response as a function call with the name of the string.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "debug",
            "in": "query",
            "description": "When `true`, the response will include a JSON dictionary of the various customisations made to the results shown by Synonyms, Customized Search, Merchandising etc.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"status\": \"ok\",\n  \"result\": [123, 456, 789, ...]\n}"
                  },
                  "Error": {
                    "value": "{\n  \"status\": \"error\",\n  \"message\": \"A message explaining the error.\",\n  \"moreInfo\": \"http://help.clerk.io/error/{ERROR_ID}\",\n  \"type\": \"ErrorType\",\n  \"id\": \"{ERROR_ID}\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "error"
                    },
                    "message": {
                      "type": "string",
                      "example": "A message explaining the error."
                    },
                    "moreInfo": {
                      "type": "string",
                      "example": "http://help.clerk.io/error/{ERROR_ID}"
                    },
                    "type": {
                      "type": "string",
                      "example": "ErrorType"
                    },
                    "id": {
                      "type": "string",
                      "example": "{ERROR_ID}"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl http://api.clerk.io/v2/recommendations/category/popular?key=store_api_key&category=123&limit=30&labels=[\"Category Popular\"]",
              "name": "GET"
            },
            {
              "language": "curl",
              "code": "curl -X POST \\\n     -H 'Content-Type: application/json' \\\n     -d '{\"key\": \"store_api_key\",\n          \"category\": 123, \n          \"limit\": 30,\n          \"offset\": 60,\n          \"visitor\": \"unique_visitor_id\",\n          \"exclude\": [42],\n          \"filter\": \"price > 100\",\n          \"labels\": [\"Category Popular\"],\n          \"facets\": [\"categories\", \"brands\"]}' \\\n     http://api.clerk.io/v2/recommendations/category/popular",
              "name": "POST"
            }
          ],
          "samples-languages": [
            "curl"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```