400 means you are sending the request the server is unable to understand. Without looking into the request, or source code at least, there is no possibility to tell what goes wrong. It may be GET vs POST, HTTP vs HTTPS, misnamed/missing parameters, no login and lots of other things. Use some tool like Postman to make a valid HTTP request first. This may help you to understand what are you missing or doing wrong.
The server may have anti-DOS features like requirement to login, mandatory headers or similar. If they do not want a bot working with they site, it is probably better not to attempt without permission.