# Missing \_scroll\_id in search response when using Python library

**URL:** <https://discuss.elastic.co/t/missing-scroll-id-in-search-response-when-using-python-library/257288>\
**Category:** Elasticsearch\
**Created:** [December 1, 2020, 11:22pm UTC](https://discuss.elastic.co/t/missing-scroll-id-in-search-response-when-using-python-library/257288 "2020-12-01T23:22:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbunderson](https://avatars.discourse-cdn.com/v4/letter/b/ecccb3/32.png) [@bbunderson](https://discuss.elastic.co/u/bbunderson)\
**Post date:** [December 1, 2020, 11:22pm UTC](https://discuss.elastic.co/t/missing-scroll-id-in-search-response-when-using-python-library/257288/1 "2020-12-01T23:22:17Z")

</div>

The \_scroll\_id is missing from the search response when using the Python library version 7.9.0 but the response does contain the \_scroll\_id when I query the API using curl.

For example, the following Python code:

```auto
response = self._es_client.search(
            index=index_pattern,
            body=query_body,
            scroll="10m",
            size=size,
        )

```

Returns this:

```auto
{"hits": {"hits": [], "total": {"relation": "eq", "value": 0}, "max_score": 0.0}, "_shards": {"successful": 0, "failed": 0, "skipped": 0, "total": 0}, "took": 0, "timed_out": false}

```

The following Curl request:

```auto
curl -k -u $ES_USR:$ES_PASSWD "$DOMAIN/_search/?scroll=1m" -d '{"size": 100, "query": {"query_string": {"query": "query_body"}}}' -H 'Content-Type: application/json'

```

Returns this:

```auto
{"_scroll_id":"DnF1ZX...QnhFUQ==","took":23,"timed_out":false,"_shards":{"total":45,"successful":45,"skipped":0,"failed":0},"hits":{"total":{"value":0,"relation":"eq"},"max_score":null,"hits":[]}}

```

You can see that the response from the Python call does not contain the \_scroll\_id but the response from the Curl call does.

I am using a small three node cluster running version 7.4.0 and using the Python library version 7.9.0.

Any idea about why the \_scroll\_id is missing when using the Python search request?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 29, 2020, 11:22pm UTC](https://discuss.elastic.co/t/missing-scroll-id-in-search-response-when-using-python-library/257288/2 "2020-12-29T23:22:22Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
