POST requests
Forward a POST request to the target URL by POSTing your body to the Web Scraping API with api_key and url as query parameters. Useful for form submissions and JSON API endpoints.
Endpoint
Section titled “Endpoint” POST https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=<TARGET_URL>
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | string | yes | Your Web Scraping API key |
url | string | yes | Target URL to POST to |
The request body is forwarded verbatim to the target URL.
Example request
Section titled “Example request”curl -X POST "https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=https%3A%2F%2Fhttpbin.org%2Fpost" \ -H "Content-Type: application/json" \ --data '{"foo":"bar"}'import requests
r = requests.post( "https://scrape.shifter.io/v1", params={"api_key": "YOUR_API_KEY", "url": "https://httpbin.org/post"}, json={"foo": "bar"},)print(r.json())import fetch from 'node-fetch';
const url = 'https://scrape.shifter.io/v1?' + new URLSearchParams({ api_key: 'YOUR_API_KEY', url: 'https://httpbin.org/post',});const res = await fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ foo: 'bar' }),});console.log(await res.json());Example response
Section titled “Example response”{ "args": {}, "data": "{\"foo\":\"bar\"}", "headers": { "Content-Type": "application/json", "Host": "httpbin.org" }, "json": { "foo": "bar" }, "origin": "185.162.168.36", "url": "https://httpbin.org/post"}