title: Python JSON GET Request Like cURL
body: <p>I have a cURL command that I would like to port to Python.</p>
  
  <pre><code>curl -XGET "http://localhost:9200/nuix-7674bc4a60b74ea7bac8996a98b0cb94;item;schema-version=1/_search" -H 'Content-Type: application/json' -d'
  {
    "query": {
      "regexp": {
        "content": "(p)hotos"
      }
    }
  }'
  </code></pre>
  
  <p>It successfully returns a non-error response.</p>
  
  <p>Here is what I tried in Python 3.6 using the <code>requests</code> package.</p>
  
  <pre><code>import requests
  import json
  
  # api-endpoint
  url = "http://localhost:9200/nuix-7674bc4a60b74ea7bac8996a98b0cb94;item;schema-version=1/_search"
  
  # headers
  headers = {'Content-type': 'application/json'}
  
  # Define JSON String
  params = """
  {
      "query": {
          "regexp":{
              "content": "(p)hotos"
          }
      }
  }
  """
  
  params = json.loads(params)
  print(params)
  
  # sending get request and saving the response as response object
  response = requests.get(url=url, params=params, headers=headers)
  
  # extracting data in json format
  data = response.json()
  print(data['hits']['total'])
  print('DONE')
  </code></pre>
  
  <p>The response <code>response._content</code> states this error:</p>
  
  <pre><code>b'{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"request [/nuix-7674bc4a60b74ea7bac8996a98b0cb94;item;schema-version=1/_search] contains unrecognized parameter: [query]"}],"type":"illegal_argument_exception","reason":"request [/nuix-7674bc4a60b74ea7bac8996a98b0cb94;item;schema-version=1/_search] contains unrecognized parameter: [query]"},"status":400}'
  </code></pre>
  
  <p>What is the correct way to set <code>params</code>?</p>