Converting API Call To Python Request

Hello there,
I'm a Kibana/Elasticsearch learner and question may be a bit easy.
From kibana DevTools I can get the data I want with :
GET _search
"_source": ["index-pattern.title"],
"query": {
"term": {
"type": "index-pattern"

I want to convert it to Python request or NodeJS doesnt matter. A documantation, an example or a kick to right way is appreciated more than anything. So what I'm looking for is convert the call mentioned to something like

`def search(uri, term):

 """Simple Elasticsearch Query"""

 query  = json.dumps({

     "query" : {

         "match" : {

             "content" : term




 response  = requests.get(uri, data = query)

 results  = json.loads(response.text)

 return results`


You can look at our es clients doc for this:


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