---
updatedAt: 2026-11-11T07:32:40.000Z
agentTools:
  projectIndex: https://docs.yotpo.com/llms.txt
---

# Topics

Retrieves topics mentioned in reviews. The response includes Insights data such as topic sentiment score, industry average, the number of opinions detected per topic, and the opinion polarity. You can filter your request by date, product, reviewer location, review score, and much more. For a full breakdown, see the body params list below.

> 📘 Authentication and request format
>
> Authenticate with `Authorization: Bearer YOUR_ACCESS_TOKEN`. The Insights API does not accept the `X-Yotpo-Token` header.
>
> Send filters inside the `filter` object, pagination inside `paging` and sorting inside `sorting`. Fields sent at the top level of the body are ignored.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Reviews API (V1)",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.yotpo.com",
      "description": "Main API server for authenticated and write operations"
    }
  ],
  "components": {
    "securitySchemes": {
      "X-Yotpo-Token": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Yotpo-Token",
        "description": "Your Yotpo account access token. See [Yotpo Authentication](ref:yotpo-authentication) to learn how to generate your token."
      },
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Your Yotpo access token sent as `Authorization: Bearer YOUR_ACCESS_TOKEN`. Used by the Insights API."
      }
    }
  },
  "security": [
    {
      "X-Yotpo-Token": []
    }
  ],
  "paths": {
    "/insights/v1/topics": {
      "post": {
        "summary": "Topics",
        "description": "Retrieves topics mentioned in reviews. The response includes Insights data such as topic sentiment score, industry average, the number of opinions detected per topic, and the opinion polarity. You can filter your request by date, product, reviewer location, review score, and much more. For a full breakdown, see the body params list below.\n\n> 📘 Authenticate with `Authorization: Bearer YOUR_ACCESS_TOKEN`. The `X-Yotpo-Token` header is not accepted by the Insights API. Flat (un-nested) filter fields are ignored, so always nest them under `filter`.",
        "operationId": "topics",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "filter"
                ],
                "properties": {
                  "filter": {
                    "type": "object",
                    "required": [
                      "app_key"
                    ],
                    "description": "Filters for the request. `app_key` is required.",
                    "properties": {
                      "app_key": {
                        "type": "string",
                        "description": "Your store ID (app key)."
                      },
                      "date_range": {
                        "type": "object",
                        "description": "Date range of the reviews to analyze.",
                        "properties": {
                          "start_date": {
                            "type": "string",
                            "description": "Start of the range, ISO 8601 (e.g. `2024-01-01T00:00:00.000Z`).",
                            "format": "date-time"
                          },
                          "end_date": {
                            "type": "string",
                            "description": "End of the range, ISO 8601 (e.g. `2024-12-31T23:59:59.999Z`).",
                            "format": "date-time"
                          }
                        }
                      },
                      "location": {
                        "type": "object",
                        "description": "Reviewer location filter.",
                        "properties": {
                          "countries": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Two-letter reviewer country codes, e.g. `US`. [See list](https://github.com/pariz/gountries/tree/master/data/json/countries)",
                            "example": [
                              "US"
                            ]
                          },
                          "states": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Reviewer state codes, e.g. `CA`. [See list](https://github.com/YotpoLtd/country-states/blob/master/us.go)",
                            "example": [
                              "CA"
                            ]
                          }
                        }
                      },
                      "external_product_ids": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Product IDs (domain keys / SKUs) to include.",
                        "example": [
                          "2063374417974"
                        ]
                      },
                      "product_groups": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Product group names as defined in your Yotpo product catalog."
                      },
                      "product_collections": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Product collection names as defined in your Yotpo product catalog."
                      },
                      "minimum_score": {
                        "type": "integer",
                        "description": "Minimum star rating, 1–5.",
                        "minimum": 1,
                        "maximum": 5
                      },
                      "exclude_unpublished": {
                        "type": "boolean",
                        "description": "Set to `true` to leave unpublished reviews out of the results."
                      },
                      "minimum_mentions": {
                        "type": "integer",
                        "description": "Only return topics mentioned at least this many times. Use 10 or more for a statistically meaningful sentiment score. Default: 0.",
                        "minimum": 0
                      },
                      "topics": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Topic names to include.",
                        "example": [
                          "quality"
                        ]
                      }
                    }
                  },
                  "paging": {
                    "type": "object",
                    "description": "Pagination. If omitted, up to 25 results are returned.",
                    "properties": {
                      "page": {
                        "type": "integer",
                        "description": "Page number, starting from 0.",
                        "minimum": 0
                      },
                      "per_page": {
                        "type": "integer",
                        "description": "Results per page.",
                        "minimum": 1
                      }
                    }
                  },
                  "sorting": {
                    "type": "object",
                    "description": "Sorting options.",
                    "properties": {
                      "sorting_field": {
                        "type": "string",
                        "description": "Field to sort by. `yotpo_default_sorting` combines sentiment score and number of opinions.",
                        "enum": [
                          "yotpo_default_sorting",
                          "sentiment_score",
                          "positive_mentions",
                          "negative_mentions",
                          "topic"
                        ]
                      },
                      "sorting_direction": {
                        "type": "string",
                        "description": "Sort direction. Case-sensitive. Does not apply to `yotpo_default_sorting`.",
                        "enum": [
                          "ASC",
                          "DESC"
                        ]
                      }
                    }
                  }
                }
              },
              "examples": {
                "Body": {
                  "value": {
                    "filter": {
                      "app_key": "YOUR_STORE_ID",
                      "date_range": {
                        "start_date": "2017-04-23T00:00:00.000Z",
                        "end_date": "2018-04-23T23:59:59.999Z"
                      },
                      "minimum_mentions": 10,
                      "external_product_ids": [
                        "325",
                        "526",
                        "295"
                      ],
                      "location": {
                        "countries": [
                          "US"
                        ],
                        "states": [
                          "CA",
                          "AZ",
                          "UT",
                          "NV"
                        ]
                      },
                      "product_groups": [],
                      "product_collections": [],
                      "minimum_score": 3,
                      "topics": [
                        "flavor"
                      ]
                    },
                    "paging": {
                      "page": 0,
                      "per_page": 10
                    },
                    "sorting": {
                      "sorting_field": "yotpo_default_sorting",
                      "sorting_direction": "ASC"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"topics\": [\n        {\n            \"topic\": \"flavor\",\n            \"sentiment_score\": 44.334976,\n            \"industry_average\": {\n                \"value\": 51.5839958190918,\n                \"error\": \"\"\n            },\n            \"sentiment_change\": {\n                \"value\": -14.511178476695719,\n                \"error\": \"\"\n            },\n            \"positive_mentions\": 131,\n            \"negative_mentions\": 41,\n            \"neutral_mentions\": 31,\n            \"products_count\": 3,\n            \"opinions_count\": 203,\n            \"included_keywords\": []\n        }\n    ],\n    \"paging\": {\n        \"page\": 0,\n        \"page_count\": 1,\n        \"per_page\": 10,\n        \"total\": 1\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "topics": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "topic": {
                            "type": "string",
                            "example": "flavor",
                            "description": "Topic name."
                          },
                          "sentiment_score": {
                            "type": "number",
                            "example": 44.334976,
                            "default": 0,
                            "description": "Net sentiment of the topic: positive minus negative mentions, as a percentage of all mentions (-100 to 100)."
                          },
                          "industry_average": {
                            "type": "object",
                            "properties": {
                              "value": {
                                "type": "number",
                                "example": 51.5839958190918,
                                "default": 0,
                                "description": "Industry average sentiment score, or `0` when it isn't available."
                              },
                              "error": {
                                "type": "string",
                                "example": "",
                                "description": "Why the industry average isn't available, for example `not available`. Empty when it is."
                              }
                            },
                            "description": "Industry average sentiment score for this topic."
                          },
                          "sentiment_change": {
                            "type": "object",
                            "properties": {
                              "value": {
                                "type": "number",
                                "example": -14.511178476695719,
                                "default": 0,
                                "description": "Change in the sentiment score."
                              },
                              "error": {
                                "type": "string",
                                "example": "",
                                "description": "Why the change couldn't be calculated, for example `invalid date range`. Empty when it could."
                              }
                            },
                            "description": "Change in the sentiment score compared with an earlier period. When it can't be calculated, `value` is `0` and `error` says why."
                          },
                          "positive_mentions": {
                            "type": "integer",
                            "example": 131,
                            "default": 0,
                            "description": "Number of positive mentions of the topic."
                          },
                          "negative_mentions": {
                            "type": "integer",
                            "example": 41,
                            "default": 0,
                            "description": "Number of negative mentions of the topic."
                          },
                          "neutral_mentions": {
                            "type": "integer",
                            "example": 31,
                            "default": 0,
                            "description": "Number of neutral mentions of the topic."
                          },
                          "products_count": {
                            "type": "integer",
                            "example": 3,
                            "default": 0,
                            "description": "Number of products whose reviews mention the topic."
                          },
                          "opinions_count": {
                            "type": "integer",
                            "example": 203,
                            "default": 0,
                            "description": "Number of opinions (mentions) about the topic."
                          },
                          "included_keywords": {
                            "type": "array"
                          }
                        }
                      },
                      "description": "Topics mentioned in your reviews that match the filter."
                    },
                    "paging": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "example": 0,
                          "default": 0,
                          "description": "Page number, starting at 0."
                        },
                        "page_count": {
                          "type": "integer",
                          "example": 1,
                          "default": 0,
                          "description": "Number of pages."
                        },
                        "per_page": {
                          "type": "integer",
                          "example": 10,
                          "default": 0,
                          "description": "Results per page."
                        },
                        "total": {
                          "type": "integer",
                          "example": 1,
                          "default": 0,
                          "description": "Total number of results."
                        }
                      },
                      "description": "Paging details."
                    }
                  }
                }
              }
            },
            "headers": {
              "ratelimit-limit": {
                "description": "The maximum number of requests allowed in the current time window",
                "schema": {
                  "type": "integer"
                }
              },
              "ratelimit-remaining": {
                "description": "The number of requests remaining in the current time window",
                "schema": {
                  "type": "integer"
                }
              },
              "ratelimit-reset": {
                "description": "The time (in seconds) until the rate limit resets",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-limit-minute": {
                "description": "The maximum number of requests allowed per minute",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining-minute": {
                "description": "The number of requests remaining in the current minute",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            },
            "headers": {
              "ratelimit-limit": {
                "description": "The maximum number of requests allowed in the current time window",
                "schema": {
                  "type": "integer"
                }
              },
              "ratelimit-remaining": {
                "description": "The number of requests remaining in the current time window",
                "schema": {
                  "type": "integer"
                }
              },
              "ratelimit-reset": {
                "description": "The time (in seconds) until the rate limit resets",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-limit-minute": {
                "description": "The maximum number of requests allowed per minute",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining-minute": {
                "description": "The number of requests remaining in the current minute",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token. The body is the plain string `unauthorized`."
          }
        },
        "deprecated": false,
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "value": "application/json",
        "key": "Content-Type"
      }
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```