Making POST/PUT requests
To make a POST request, just use POST method along with optional body to Scraping Fish API:
- cURL
- Python
- JavaScript
curl -X POST \
--data '{"key1":"value1","key2":"value2"}' \
'https://scraping.narf.ai/api/v1/?api_key=[your API key]&url=https://httpbin.org/post'
import requests
url = "https://httpbin.org/post"
api_key = "[your API key]"
print(requests.post(f"https://scraping.narf.ai/api/v1/?api_key={api_key}&url={url}", json={"key1": "value1", "key2": "value2"}).content)
import axios from "axios";
const url = "https://httpbin.org/post";
const apiKey = "[your API key]";
const response = await axios.post(
`https://scraping.narf.ai/api/v1/?api_key=${apiKey}&url=${url}`, {key1: "value1", key2: "value2"}
);
console.log(response.data);
You can issue a PUT request in analogous way. Remember that you might also need to add a header like "Content-Type: application/json"
.