---
ai:
  exclude: true
search:
  tags:
    - Search
    - GET
seo:
  description: >-
    Search for entities in Confluence using the Confluence Query Language…
    Reference for the GET /rest/api/search endpoint in the Confluence Data
    Center API.
sidebar:
  label: Search for entities in confluence
  badge: GET
title: Search for entities in confluence
type: openapi-operation
---
Search for entities in Confluence using the [Confluence Query Language (CQL)](https://developer.atlassian.com/confdev/confluence-rest-api/advanced-searching-using-cql). For example:

Example request URI(s):

- `http://localhost:8080/confluence/rest/api/search?cql=creator=currentUser()&type%20in%20(space,page,user)&cqlcontext={"spaceKey":"TST", "contentId":"55"}`

- `http://localhost:8080/confluence/rest/api/search?cql=siteSearch~'example'%20AND%20label=docs&expand=content.space,space.homepage&limit=10`

`GET /rest/api/search`

**Request body** (`application/json`)

Request body example:

```json
"string"
```

**Responses**

- `200` — returns a full JSON representation of a list of search results.
- `400` — returned if the query cannot be parsed

Response example, 200:

```json
{
  "results": [
    {
      "title": "Page Title",
      "excerpt": "This is an excerpt of the page content",
      "url": "http://localhost:8080/confluence/display/SPACEKEY/Page+Title",
      "resultParentContainer": {
        "title": "Demo Title",
        "displayUrl": "http://localhost:8080/confluence/display/SPACEKEY/Page+Title"
      },
      "resultGlobalContainer": {
        "title": "Demo Title",
        "displayUrl": "http://localhost:8080/confluence/display/SPACEKEY/Page+Title"
      },
      "iconCssClass": "string",
      "lastModified": "2019-08-24T14:15:22Z",
      "friendlyLastModified": "string",
      "entity": {},
      "resultGlobalContainerRef": {
        "expanded": true,
        "idProperties": {}
      },
      "resultParentRef": {
        "expanded": true,
        "idProperties": {}
      },
      "entityRef": {
        "expanded": true,
        "idProperties": {}
      },
      "resourceType": {
        "name": "string",
        "type": "string",
        "url": "string"
      },
      "entityType": "string"
    }
  ],
  "start": 25,
  "limit": 25,
  "size": 25,
  "_links": {
    "base": "http://localhost:8085/rest/api",
    "self": "http://localhost:8085/rest/api",
    "context": "http://localhost:8085/rest/api",
    "next": "http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50",
    "prev": "http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"
  }
}
```
