Run a scraper
curl --request POST \
--url https://app.manypi.com/api/scrape/{scraperId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/product/42"
}
'import requests
url = "https://app.manypi.com/api/scrape/{scraperId}"
payload = { "url": "https://example.com/product/42" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://example.com/product/42'})
};
fetch('https://app.manypi.com/api/scrape/{scraperId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.manypi.com/api/scrape/{scraperId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://example.com/product/42'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.manypi.com/api/scrape/{scraperId}"
payload := strings.NewReader("{\n \"url\": \"https://example.com/product/42\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.manypi.com/api/scrape/{scraperId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/product/42\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.manypi.com/api/scrape/{scraperId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com/product/42\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"message": "<string>"
},
"metadata": {
"scraperId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"creditsRemaining": 123
}
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}Scraping
Run a scraper
Queue a scraper run. Asynchronous — the call returns 202 immediately with a runId, so a slow page never times your request out.
Poll GET /api/runs/{runId} until status is completed (or failed), then read the full result with GET /api/{scraperId}/data/{runId}. Or configure an outbound webhook to be notified when it completes.
The body takes url only. Run settings such as timeouts and retries are not configurable per call.
An API key needs the Run scrapers permission (scraper).
POST
/
api
/
scrape
/
{scraperId}
Run a scraper
curl --request POST \
--url https://app.manypi.com/api/scrape/{scraperId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/product/42"
}
'import requests
url = "https://app.manypi.com/api/scrape/{scraperId}"
payload = { "url": "https://example.com/product/42" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://example.com/product/42'})
};
fetch('https://app.manypi.com/api/scrape/{scraperId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.manypi.com/api/scrape/{scraperId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://example.com/product/42'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.manypi.com/api/scrape/{scraperId}"
payload := strings.NewReader("{\n \"url\": \"https://example.com/product/42\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.manypi.com/api/scrape/{scraperId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/product/42\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.manypi.com/api/scrape/{scraperId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com/product/42\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"message": "<string>"
},
"metadata": {
"scraperId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"creditsRemaining": 123
}
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}