# Difference in Results in Kibana and API

**URL:** <https://discuss.elastic.co/t/difference-in-results-in-kibana-and-api/106187>\
**Category:** Elasticsearch\
**Created:** [November 2, 2017, 12:07pm UTC](https://discuss.elastic.co/t/difference-in-results-in-kibana-and-api/106187 "2017-11-02T12:07:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![akash.01](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@akash.01](https://discuss.elastic.co/u/akash.01)\
**Post date:** [November 2, 2017, 12:07pm UTC](https://discuss.elastic.co/t/difference-in-results-in-kibana-and-api/106187/1 "2017-11-02T12:07:31Z")

</div>

Hi there,

I am learning to use Python API to query Elasticsearch. I was trying to run some queries in Kibana, I copied the same json request from the json blob of Kibana and used the same to query using python. Both results were different. I had 65 hits shown in Kibana whereas I had 1145 results when I queried using python API.

---

<div class="post-metadata">

**Author:** ![shanec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shanec/32/4004_2.png) [@shanec](https://discuss.elastic.co/u/shanec)\
**Post date:** [November 2, 2017, 11:31pm UTC](https://discuss.elastic.co/t/difference-in-results-in-kibana-and-api/106187/2 "2017-11-02T23:31:13Z")

</div>

Can you share both? Kibana's probably filtering something or applying index patterns to your search.

---

<div class="post-metadata">

**Author:** ![akash.01](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@akash.01](https://discuss.elastic.co/u/akash.01)\
**Post date:** [November 3, 2017, 3:58am UTC](https://discuss.elastic.co/t/difference-in-results-in-kibana-and-api/106187/3 "2017-11-03T03:58:23Z")

</div>

It was a problem with cached results. Kibana was somehow returning cached results again and again. It changed once I closed the browser and reran the query again opening a new instance of the browser.

---

<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 1, 2017, 3:58am UTC](https://discuss.elastic.co/t/difference-in-results-in-kibana-and-api/106187/4 "2017-12-01T03:58:29Z")

</div>

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