title: Key Error in web scraping from POST Request
body: <pre><code>import json, csv
  import requests
  import pandas as pd
  
  params = {
  &quot;ApiKey&quot;: &quot;5f4bc74f-8d9a-41cb-ab85-a1b7cfc86622&quot;,
  &quot;CorrelationId&quot;: &quot;e4e14c46-53e6-463f-9bdc-f67785bd4915&quot;,
  &quot;SessionId&quot;: None,
  &quot;RequestTypeId&quot;: 2,
  &quot;RequestVerb&quot;: &quot;POST&quot;,
  &quot;Endpoint&quot;: &quot;https://api.myhome.ie/search&quot;,
  
  *AND MORE. Read note at bottom*
  }
  
  url = &quot;https://api.myhome.ie/search&quot;
  
  
  for x in range(2):
  
      params[&quot;Page&quot;] = x  # &lt;--- change to desired page
      data = requests.post(url, json=params).json()
  
      with open('data.csv', 'w+', newline='') as f:
  
          f.write(&quot;Property Type | Property Status | Display Address | Price \n&quot;)
  
          for result in data[&quot;SearchResults&quot;]:
              results = &quot;{} | {} | {} | {} | {}&quot;.format(result[&quot;PropertyType&quot;], result[&quot;PriceAsString&quot;], result[&quot;BedsString&quot;], result[&quot;PropertyStatus&quot;], result[&quot;DisplayAddress&quot;])
  
              fwriter = csv.writer(f,delimiter = '|')
              fwriter.writerow(result)
  </code></pre>
  <p>From the URL at <a href="https://www.myhome.ie/residential/dublin/property-for-sale" rel="nofollow noreferrer">https://www.myhome.ie/residential/dublin/property-for-sale</a>, why does the parameter PriceAsString keep throwing a key error? It does exist, everything else is working fine besides that</p>
  <p>NOTE: I had to remove the parameters else it wasn't letting me post this question because of too much code. Left the first 5</p>
  <p>EDIT: can get the code from <a href="https://stackoverflow.com/a/66721391/10976096">here</a> if you want to try to recreate</p>