# Confluence content search API does not return the expected fields

**URL:** <https://community.developer.atlassian.com/t/confluence-content-search-api-does-not-return-the-expected-fields/49568>\
**Category:** Confluence Cloud\
**Tags:** cql, rest-api, confluence-cloud\
**Created:** [July 6, 2021, 9:11am UTC](https://community.developer.atlassian.com/t/confluence-content-search-api-does-not-return-the-expected-fields/49568 "2021-07-06T09:11:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wilson.lai](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/wilson.lai/32/35362_2.png) [@wilson.lai](https://community.developer.atlassian.com/u/wilson.lai)\
**Post date:** [July 6, 2021, 9:11am UTC](https://community.developer.atlassian.com/t/confluence-content-search-api-does-not-return-the-expected-fields/49568/1 "2021-07-06T09:11:34Z")

</div>

Hi devs,

We are trying to use the [Confluence Cloud content search API](https://developer.atlassian.com/cloud/confluence/rest/api-group-search/#api-api-search-get) to search for content in a specific instance. However, we notice that the expected results documented was not available in the response.

In the example response, we would expect the `totalSize` based on the searched CQL.

 ![Screenshot 2021-07-06 at 5.07.00 PM](https://global.discourse-cdn.com/atlassiandeveloper/original/3X/0/8/08a4c712eb158d45184e8ef4aa2933cd7200214c.png)

However, this is not the case for the response returned. Here’s an example of the response.

```json
{
    "results": [...results],
    "start": 0,
    "limit": 30,
    "size": 30,
    "_links": {
        "base": "https://example.atlassian.net/wiki",
        "context": "/wiki",
        "next": "/rest/api/content/search?next=true&expand=body.view&limit=30&start=30&cql=type%3Dpage",
        "self": "https://example.atlassian.net/wiki/rest/api/content/search?expand=body.view&cql=type%3Dpage"
    }
}

```

Would like to know if this is a known issue, or if there’s another workaround to get total size of pages in the instance?

---

<div class="post-metadata">

**Author:** ![JatinChopra](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/jatinchopra/32/41488_2.png) [@JatinChopra](https://community.developer.atlassian.com/u/JatinChopra)\
**Post date:** [July 6, 2021, 9:26pm UTC](https://community.developer.atlassian.com/t/confluence-content-search-api-does-not-return-the-expected-fields/49568/2 "2021-07-06T21:26:14Z")

</div>

I think you are hitting [content/search API](https://developer.atlassian.com/cloud/confluence/rest/api-group-content/#api-api-content-search-get) instead of [https://developer.atlassian.com/cloud/confluence/rest/api-group-search/#api-api-search-get](https://developer.atlassian.com/cloud/confluence/rest/api-group-search/#api-api-search-get)

---

<div class="post-metadata">

**Author:** ![wilson.lai](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/wilson.lai/32/35362_2.png) [@wilson.lai](https://community.developer.atlassian.com/u/wilson.lai)\
**Post date:** [July 12, 2021, 2:35am UTC](https://community.developer.atlassian.com/t/confluence-content-search-api-does-not-return-the-expected-fields/49568/3 "2021-07-12T02:35:56Z")

</div>

Hey @JatinChopra ,

Thanks for the response. Didn’t notice that there’s a different between the 2 APIs.
