Post Requests

POST Requests

Some advanced users will want to issue POST requests in order to scrape forms and API endpoints directly. You can do this by sending a POST request through Scraper API. The return value will be stringified, if you want to use it as JSON, you will want to parse it into a JSON object.

Sample Code

curl -d "key=YOUR_API_KEY&url=http://httpbin.org/anything&method=POST" -X POST "https://api.syphoon.com"

Result

{
  "args": {},
  "data": "{\"foo\":\"bar\"}",
  "files": {},
  "form": {},
  "headers": {
    "Accept": "application/json",
    "Accept-Encoding": "gzip, deflate",
    "Content-Length": "13",
    "Content-Type": "application/json; charset=utf-8",
    "Host": "httpbin.org",
    "Upgrade-Insecure-Requests": "1",
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
  },
  "json": {
    "foo": "bar"
  },
  "method": "POST",
  "origin": "XX.XXX.XXX.XXX, XX.XXX.XXX.XXX",
  "url": "https://httpbin.org/anything"
}