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

# Get List of Cookies by Criteria

Use this API to retrieve a list of all cookies by filter criteria.
> 🗒 Things to Know
> 
> - If any of the available languages in the OneTrust application is entered as a value for the `language` parameter, cookie categories, descriptions, and third-party descriptions will be translated accordingly. 
> - It is recommended to use the `page` and `size` parameters if the number of cookies is greater than 500.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0",
    "title": "Consent & Preferences - Cookie Consent (Swagger)"
  },
  "tags": [
    {
      "name": "Cookies"
    }
  ],
  "paths": {
    "/v2/cookie-reports/search": {
      "post": {
        "tags": [
          "Cookies"
        ],
        "summary": "Get List of Cookies by Criteria",
        "description": "Use this API to retrieve a list of all cookies by filter criteria.\n> 🗒 Things to Know\n> \n> - If any of the available languages in the OneTrust application is entered as a value for the `language` parameter, cookie categories, descriptions, and third-party descriptions will be translated accordingly. \n> - It is recommended to use the `page` and `size` parameters if the number of cookies is greater than 500.",
        "operationId": "getCookieReportsUsingPOST",
        "parameters": [
          {
            "in": "query",
            "name": "language",
            "description": "Name of the language.",
            "example": "en",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "countryCode",
            "description": "Country specific code.",
            "example": "gb",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "searchStr",
            "description": "Search string includes either cookie name or host name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number of the results list (0….N).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "description": "Number of records per page (0…N).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domains": {
                    "type": "array",
                    "default": [],
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "description": "List of domains separated by commmas."
        },
        "responses": {
          "200": {
            "description": "OK\n\nCookie details retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedCookieResponseDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "429": {
            "description": "Too Many Requests\nFor more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).",
            "headers": {
              "Retry-After": {
                "description": "The number of seconds after which requests will be allowed again.",
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              },
              "ot-ratelimit-event-id": {
                "description": "The unique identifier for the rate-limiting event.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ot-requests-allowed": {
                "description": "The number of requests allowed within the specified period.",
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              },
              "ot-period": {
                "description": "The unit of time for which the rate limit applies.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "HOUR",
                    "MINUTE"
                  ]
                }
              },
              "ot-request-made": {
                "description": "The number of requests made within the specified period.",
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "x-readme": {
    "explorer-enabled": false,
    "metrics-enabled": false,
    "proxy-enabled": true
  },
  "x-onetrust": {
    "spec-label": "Swagger 2",
    "links": {
      "Cookie Consent Knowledge Base": "https://my.onetrust.com/s/topic/0TO1Q000000ItRyWAK/cookie-compliance"
    }
  },
  "servers": [
    {
      "url": "https://customer.my.onetrust.com/api/cookiemanager"
    }
  ],
  "components": {
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://{$$.env.host}/api/access/v1/oauth/token",
            "scopes": {
              "COOKIE": "Cookie Scope gives the user access to read/write operations inside the Cookie Consent module.",
              "COOKIE_READ": "Cookie Read Scope gives the user read-only access to the Cookie Consent module.",
              "COOKIE_FREE": "Cookie free Scope gives free users access to apis having free scope associated to them inside the Cookie Consent module."
            }
          }
        }
      }
    },
    "schemas": {
      "Sort": {
        "type": "object",
        "properties": {
          "empty": {
            "type": "boolean",
            "description": "Flag to indicate if the results are empty or not."
          },
          "sorted": {
            "type": "boolean",
            "description": "Flag to indicate if the results are sorted or not. If set to TRUE, the results are sorted."
          },
          "unsorted": {
            "type": "boolean",
            "description": "Flag to indicate if the results are unsorted or not. If set to TRUE, the results are unsorted."
          }
        },
        "title": "Sort"
      },
      "PaginatedCookieResponseDTO": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "description": "List of cookies with domain level information",
            "items": {
              "$ref": "#/components/schemas/CookieDetailsDto"
            }
          },
          "numberOfElements": {
            "type": "integer",
            "format": "int32",
            "description": "Total number of elements in the result list."
          },
          "pageNumber": {
            "type": "integer",
            "format": "int32",
            "description": "Page number of the results list (0….N)."
          },
          "pageSize": {
            "type": "integer",
            "format": "int32",
            "description": "Number of records per page (0…N)."
          },
          "sort": {
            "$ref": "#/components/schemas/Sort"
          },
          "totalElements": {
            "type": "integer",
            "format": "int64",
            "description": "Total number of cookie results found."
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "description": "Total number of pages in the result."
          }
        },
        "title": "PaginatedCookieResponseDTO",
        "description": "Paginated List of cookies with domain level info"
      },
      "CookieDetailsDto": {
        "type": "object",
        "properties": {
          "cookieName": {
            "type": "string",
            "description": "Name of a cookie."
          },
          "lifespan": {
            "type": "string",
            "description": "Lifespan of a cookie."
          },
          "host": {
            "type": "string",
            "description": "Host associated with a cookie."
          },
          "defaultCategory": {
            "type": "string",
            "description": "Default category of a cookie."
          },
          "cookieSource": {
            "type": "string",
            "description": "Source of a cookie (SCAN or MANUAL)."
          },
          "defaultDescription": {
            "type": "string",
            "description": "Description of a cookie."
          },
          "defaultThirdPartyDescription": {
            "type": "string",
            "description": "Third party description of a cookie."
          },
          "expiry": {
            "type": "string",
            "description": "Expiry duration of a cookie(For example, 4 weeks or 2 days or 5 months or 3 years)."
          },
          "thirdParty": {
            "type": "boolean",
            "description": "Indicates the type of a cookie. If set to true, then third party cookie else first party cookie."
          },
          "domainCookieInfo": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DomainCookieInfo"
            }
          }
        },
        "title": "CookieDetailsDto",
        "description": "Cookie details with domain level info"
      },
      "DomainCookieInfo": {
        "type": "object",
        "properties": {
          "cookieId": {
            "type": "string",
            "description": "Id of a cookie."
          },
          "domainCookieId": {
            "type": "string",
            "description": "Id of domaincookie."
          },
          "domainName": {
            "type": "string",
            "description": "Name of the domain."
          },
          "displayGroupName": {
            "type": "string",
            "description": "Category name of cookie for that domain."
          },
          "cookieCategoryID": {
            "type": "string",
            "description": "Category ID of the cookie."
          },
          "thirdParty": {
            "type": "boolean",
            "description": "Indiactes the type of the cookie. If set to true, then third party cookie else first party cookie for that domain."
          },
          "description": {
            "type": "string",
            "description": "Description of a cookie."
          }
        },
        "title": "DomainCookieInfo",
        "description": "Domain level information for a cookie"
      }
    }
  }
}
```