# ElasticSearch curl return nothing data

**URL:** <https://discuss.elastic.co/t/elasticsearch-curl-return-nothing-data/214023>\
**Category:** Elasticsearch\
**Created:** [January 7, 2020, 10:21am UTC](https://discuss.elastic.co/t/elasticsearch-curl-return-nothing-data/214023 "2020-01-07T10:21:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ramon\_Mateo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ramon_mateo/32/46306_2.png) [@Ramon\_Mateo](https://discuss.elastic.co/u/Ramon_Mateo)\
**Post date:** [January 7, 2020, 10:21am UTC](https://discuss.elastic.co/t/elasticsearch-curl-return-nothing-data/214023/1 "2020-01-07T10:21:19Z")

</div>

Hi  
I stay trying to execute search by curl. When i execute this query on devtools in kibana i get this response:

{  
"took" : 58,  
"timed\_out" : false,  
"\_shards" : {  
"total" : 5,  
"successful" : 5,  
"skipped" : 0,  
"failed" : 0  
},  
"hits" : {  
"total" : 158196,  
"max\_score" : 1.0,

But when i pass to curl and execute on terminal the curl only return {"took":8,"timed\_out":false,"\_shards":{"total":5,"successful":5,"skipped":0,"failed":0},"hits":{"total":0,"max\_score":null,"hits":}}bash-4.2$

The curl is this:

curl -XGET "[http://elasticsearch:9200/my\_index/\_search](http://elasticsearch:9200/my_index/_search)" -H 'Content-Type: application/json' -d'  
{  
"query": {  
"range": {  
"@timestamp": {  
"gte": "2019-02-01",  
"lte": "2019-03-01",  
"format": "yyyy-MM-dd"  
}  
}  
}  
}'

What is wrong? Thanks for advanced.

---

<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:** [February 4, 2020, 10:21am UTC](https://discuss.elastic.co/t/elasticsearch-curl-return-nothing-data/214023/2 "2020-02-04T10:21:20Z")

</div>

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