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

# Count reviews

> This endpoint returns the number of reviews of your businesses matching the filters, without fetching them.

It accepts the same filters as `GET /v2/reviews`. To access the reviews of a business you need to have `READ` access on it.

By default, no state filter is applied: the count includes **all** reviews,
including deleted ones. Use `state__in` / `state__notin` to narrow the result.




## OpenAPI

````yaml /assets/openapi/openapi-bundled.yaml get /reviews/count
openapi: 3.1.0
info:
  title: Partoo Rest API
  version: v2
  license:
    name: © Copyright Partoo
    url: https://www.partoo.co/en/gtu-api/
  x-logo:
    url: >-
      https://partoo-client-images.s3.amazonaws.com/logo-partoo-restapi-white.png
  description: >
    ## Introduction

    The Partoo Rest API allows you to automate all the actions that are possible
    to do in the Partoo Web Application.


    The Partoo Rest API can be used for many different purposes:
      - Create/update/delete your businesses & users if you are a client.
      - Create/subscribe/manage organizations, businesses & users if you are a reseller.
      - Retrieve data on businesses you have access to if you are a publisher.
      - ...
servers:
  - url: https://api.partoo.co/v2
    description: Production server
  - url: https://api.sandbox.partoo.co/v2
    description: Sandbox server (dev environment for clients & partners)
security:
  - ApiKeyAuth: []
paths:
  /reviews/count:
    get:
      tags:
        - Reviews
      summary: Count reviews
      description: >
        This endpoint returns the number of reviews of your businesses matching
        the filters, without fetching them.


        It accepts the same filters as `GET /v2/reviews`. To access the reviews
        of a business you need to have `READ` access on it.


        By default, no state filter is applied: the count includes **all**
        reviews,

        including deleted ones. Use `state__in` / `state__notin` to narrow the
        result.
      operationId: countReviews
      parameters:
        - $ref: '#/components/parameters/query_business__in'
        - $ref: '#/components/parameters/query_business__notin'
        - $ref: '#/components/parameters/query_content__isnull'
        - $ref: '#/components/parameters/query_partner__in'
        - $ref: '#/components/parameters/query_gmb_rating__in'
        - $ref: '#/components/parameters/query_tripadvisor_rating__in'
        - $ref: '#/components/parameters/query_recommended__in'
        - $ref: '#/components/parameters/query_review_update_date__gte'
        - $ref: '#/components/parameters/query_review_update_date__lte'
        - $ref: '#/components/parameters/query_review_state'
        - $ref: '#/components/parameters/query_review_state__notin'
        - $ref: '#/components/parameters/query_tag_label_in'
        - $ref: '#/components/parameters/query_review_without_tag'
        - $ref: '#/components/parameters/query_keywords'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - count
                properties:
                  count:
                    type: integer
                    description: Number of reviews matching the filters
                    example: 287
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
components:
  parameters:
    query_business__in:
      in: query
      name: business__in
      description: >-
        Filter by business ids. Use a comma-separated list to provide multiple
        ids.
      schema:
        type: array
        example: >-
          a1c9f37b4deca92f83b61d02,9f4e2a8c0d73b154e621bc97,c73b15e9fa42d60b3a8c21ef
        items:
          $ref: '#/components/schemas/BusinessId'
          description: ''
    query_business__notin:
      in: query
      name: business__notin
      description: Excludes from the request all businesses provided
      schema:
        type: array
        items:
          $ref: '#/components/schemas/BusinessId'
    query_content__isnull:
      in: query
      name: content__isnull
      description: >
        Filter by review's content


        If set to `true`, the endpoint will return all the reviews without
        content.


        **Note:** This is the content of the review and not the content of the
        reply.
      schema:
        type: string
        enum:
          - 'true'
          - 'false'
        example: false
    query_partner__in:
      in: query
      name: partner__in
      description: Filter by publisher
      schema:
        type: array
        items:
          $ref: '#/components/schemas/ReviewPublisherLabel'
        example: google_my_business,facebook
    query_gmb_rating__in:
      in: query
      name: gmb_rating__in
      description: |
        Filter only by Google ratings
      schema:
        type: array
        items:
          type: number
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
        example: 4,5
    query_tripadvisor_rating__in:
      in: query
      name: tripadvisor_rating__in
      description: |
        Filter only by Tripadvisor ratings
      schema:
        type: array
        items:
          type: number
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
        example: 1,2
    query_recommended__in:
      in: query
      name: recommended__in
      description: |
        Filter only by Facebook recommendation
      schema:
        type: array
        items:
          type: boolean
          enum:
            - true
            - false
        example: false
    query_review_update_date__gte:
      in: query
      name: update_date__gte
      description: >
        Filter by `update_date`


        Return all the reviews whose `update_date` >= `given_date`.


        For example : `update_date__gte=2019-01-01T00:00:00` will return all
        reviews from the first January of 2019

        until today.


        **Note** : The update dates are stored in UTC.
      schema:
        type: string
        format: datetime
        example: '2017-08-01T00:00:00'
    query_review_update_date__lte:
      in: query
      name: update_date__lte
      description: >
        Filter by `update_date`


        Return all the reviews whose `update_date` <= `given_date`.


        For example : `update_date__lte=2020-01-01T00:00:00` will return all
        reviews from the date of the first review

        until the first january of 2020.


        **Note** : The update dates are stored in UTC.
      schema:
        type: string
        format: datetime
        example: '2017-08-02T00:00:00'
    query_review_state:
      in: query
      name: state__in
      description: |
        Filter by state. Comma-separated list of review states.
      schema:
        type: array
        items:
          $ref: '#/components/schemas/ReviewState'
        example: treated,not_treated
    query_review_state__notin:
      in: query
      name: state__notin
      description: >
        Exclude reviews in the given states. Comma-separated list of review
        states.
      schema:
        type: array
        items:
          $ref: '#/components/schemas/ReviewState'
        example: deleted
    query_tag_label_in:
      in: query
      name: tag_label__in
      description: >
        Filter by Tag label


        Will partially match given labels (ie `foo` will match reviews with tag
        `food`)
      schema:
        type: array
        items:
          $ref: '#/components/schemas/TagLabel'
        example: food,drink
    query_review_without_tag:
      in: query
      name: without_tag
      description: |
        Filter only reviews without tags
      schema:
        type: boolean
        example: true
    query_keywords:
      in: query
      name: keywords
      description: >
        Filter by keywords


        Return all the reviews with not-nullable content, that contain the
        provided list of keywords.


        **Note:** This is the content of the review and not the content of the
        reply.


        The filter accepts both simple and composed words.

        To indicate it's a composed keyword, add the `+` as separator.

        For example:

        - `keywords=bonjour` returns all reviews containing the keyword
        `bonjour`

        - `keywords=good+service` returns all reviews containing the combined
        keyword **good service**, without splitting the keyword. No reviews
        containing just **good** or just **service** will be returned.

        - `keywords=bonjour,good+service`: returns all reviews that contain
        either just **bonjour**, either just **good service** or both keywords
        at the same time.
      schema:
        type: array
        items:
          type: string
        example: bonjour,good+service
  responses:
    '400':
      description: Your request is incorrect
      content:
        application/json:
          schema:
            description: |
              Error that occcurs when your request is incorrect
            properties:
              errors:
                type: object
                description: The detail of the error encountered
                properties:
                  json:
                    type: object
    '401':
      description: You are not authenticated
      content:
        application/json:
          schema:
            description: Error that occurs when you are not authenticated
            type: object
            properties:
              errors:
                type: object
                description: The detail of the error encountered
                properties:
                  authentication:
                    type: string
                    default: User not authenticated
    '403':
      description: |
        You are not allowed to perform this action
      content:
        application/json:
          schema:
            description: >
              Error that occurs when you are authenticated but you are trying to
              perform an action you are not allowed to perform
            type: object
            properties:
              errors:
                type: object
                description: The detail of the error encountered
                properties:
                  authorization:
                    type: string
                    default: Operation not allowed
  schemas:
    BusinessId:
      description: Business id
      type: string
      example: 5409c35a97bbc544d8e26737
    ReviewPublisherLabel:
      type: string
      description: Review partner slug
      example: google_my_business
    ReviewState:
      type: string
      description: Reply state
      enum:
        - treated
        - not_treated
        - deleted
    TagLabel:
      description: >
        The label of the tag

        Must be <= 30 characters and cannot contain a comma (commas will be
        ignored)
      type: string
      example: food
  securitySchemes:
    ApiKeyAuth:
      description: >
        The authentication system on Partoo API is using API Key that should be
        put in the header of the request (the name of the header is `x-APIKey`).
        An api_key is linked to a user. This user's role will give you different
        access level to the API features.
      type: apiKey
      in: header
      name: x-APIKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.