title: How to send request payload as parameter in python web scraping?
body: <p>I am doing web scraping in python using requests of the following <a href="https://easyauto123.com.au/buy/used-cars/filter/fuel-type" rel="nofollow noreferrer">website</a>.</p>
  <p>Here in inspect element when you will load the data of any fuel type, you will see a API being triggered by name <code>getFilteredInventery</code>.</p>
  <p>Suppose, you have selected Diesel, then I want to scrape all the data which is visible in response section of given API. But I cannot simply open it. In headers section you will see request payload and I think I have send it too as parameter.</p>
  <p>I surfed internet and I found out that I can send request payload as param in requests.</p>
  <p>This is my code:</p>
  <pre><code>payload = {&quot;Search&quot;: {&quot;FuelType&quot;: [&quot;Diesel&quot;]}, &quot;Sort&quot;: {&quot;Featured&quot;: &quot;true&quot;}}
  url = &quot;https://easyauto123.com.au/api/v1/getFilteredInventory&quot;
  page = requests.get(url, params=payload)
  data = page.json()
  </code></pre>
  <p>But the page is showing 400 error. So, how could I get this error solved?</p>
  <p>API Link: <a href="https://easyauto123.com.au/api/v1/getFilteredInventory" rel="nofollow noreferrer">https://easyauto123.com.au/api/v1/getFilteredInventory</a></p>