'How to find correct "json" parameters on Request POST?

I am new to webscrapping and am trying to access an employee database on a website. To do this, I noticed that when I hit the search field the site sends a request and when I copy the link and convert the curl command to python, I get something like this:

headers = { ... }

json_data = {
    'tokenRecaptcha': ...,
    'filter': '...',
    'page': ...,
}

response = requests.post(''https://.../api/.../...'', headers=headers, json=json_data)

I'm using 2captcha to get a valid token for Recaptcha and it is working well.

I want to access the entire employee base of the company, but the search is limited with this location "filter" (asks for the zip code). If I send the request without the "filter" line it returns only the first 4 people, and if I change the "page" parameter it returns an error. I also tried using * as a wildcard in the "filter" field, but it returned an empty list. I wonder if there is any way to find out what parameters are possible to send in the "json" field, or some other way to search the entire base without having to iterate through all the zip codes and pages.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source