Jobs
Poll a job
Poll a job until it is terminal. While status is pending the response is 202 with Location and Retry-After; once status is completed or failed it is 200. The body is the same job view either way. Results are retained for about an hour after completion, so fetch them within that window. Jobs are visible to every API key of the account that created them, and to no other account.
Poll a job
curl --request GET \
--url https://api-v2.pricepirate.com/api/v2/jobs/{jobId} \
--header 'x-api-key: <api-key>'import requests
url = "https://api-v2.pricepirate.com/api/v2/jobs/{jobId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api-v2.pricepirate.com/api/v2/jobs/{jobId}', 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://api-v2.pricepirate.com/api/v2/jobs/{jobId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-v2.pricepirate.com/api/v2/jobs/{jobId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-v2.pricepirate.com/api/v2/jobs/{jobId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-v2.pricepirate.com/api/v2/jobs/{jobId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"error": false,
"job_id": "<string>",
"status": "pending",
"source": "<string>",
"operation": "<string>",
"country": "<string>",
"created_at": "<string>",
"results": [
{
"query": "<string>",
"status": "found",
"result": {
"id": "<string>",
"name": "<string>",
"url": "<string>",
"ean": "<string>",
"brand": "<string>",
"description": "<string>",
"image_urls": [
"<string>"
],
"review_rating": 123,
"review_count": 123,
"categories": [
"<string>"
],
"category_ids": [
"<string>"
],
"price_avg": 123,
"price_max": 123,
"price_min": 123,
"offers_count": 123,
"offers": [
{
"sellerId": "<string>",
"shop_name": "<string>",
"shop_url": "<string>",
"shop_type": "<string>",
"marketplace_name": "<string>",
"shop_review_rating": 123,
"shop_review_count": 123,
"position": "<string>",
"condition": "<string>",
"currency": "<string>",
"price": 123,
"shipping": 123,
"total": 123,
"free_return": true,
"voucher": true,
"availability_text": "<string>",
"classification": "same_variant",
"confidence": "high",
"platform_data": "<unknown>",
"title": "<string>",
"availability_code": "<string>",
"direct_sale": true
}
],
"source": "<string>",
"country": "<string>",
"fetched_at": "<string>",
"platform_data": "<unknown>",
"page_type": "product",
"available_since": "<string>",
"last_updated": "<string>"
},
"error": "<string>",
"errorCode": "invalid_query"
}
],
"done": 123,
"total": 123,
"summary": {
"found": 123,
"not_found": 123,
"error": 123,
"classifications": {
"same_variant": 123,
"likely_same_variant": 123,
"same_family_different_variant": 123,
"different_product": 123,
"unclear": 123,
"product_page_match": 123,
"multipack": 123,
"bundle": 123
}
}
}{
"error": false,
"job_id": "<string>",
"status": "pending",
"source": "<string>",
"operation": "<string>",
"country": "<string>",
"created_at": "<string>",
"results": [
{
"query": "<string>",
"status": "found",
"result": {
"id": "<string>",
"name": "<string>",
"url": "<string>",
"ean": "<string>",
"brand": "<string>",
"description": "<string>",
"image_urls": [
"<string>"
],
"review_rating": 123,
"review_count": 123,
"categories": [
"<string>"
],
"category_ids": [
"<string>"
],
"price_avg": 123,
"price_max": 123,
"price_min": 123,
"offers_count": 123,
"offers": [
{
"sellerId": "<string>",
"shop_name": "<string>",
"shop_url": "<string>",
"shop_type": "<string>",
"marketplace_name": "<string>",
"shop_review_rating": 123,
"shop_review_count": 123,
"position": "<string>",
"condition": "<string>",
"currency": "<string>",
"price": 123,
"shipping": 123,
"total": 123,
"free_return": true,
"voucher": true,
"availability_text": "<string>",
"classification": "same_variant",
"confidence": "high",
"platform_data": "<unknown>",
"title": "<string>",
"availability_code": "<string>",
"direct_sale": true
}
],
"source": "<string>",
"country": "<string>",
"fetched_at": "<string>",
"platform_data": "<unknown>",
"page_type": "product",
"available_since": "<string>",
"last_updated": "<string>"
},
"error": "<string>",
"errorCode": "invalid_query"
}
],
"done": 123,
"total": 123,
"summary": {
"found": 123,
"not_found": 123,
"error": 123,
"classifications": {
"same_variant": 123,
"likely_same_variant": 123,
"same_family_different_variant": 123,
"different_product": 123,
"unclear": 123,
"product_page_match": 123,
"multipack": 123,
"bundle": 123
}
}
}{
"error": true,
"message": "<string>"
}{
"error": true,
"message": "<string>"
}{
"error": true,
"message": "<string>"
}{
"error": true,
"message": "<string>"
}Abfrageparameter
Antwort
Terminal job view (completed or failed) with full results
The job view, with progress and progressive results.
⌘I
Poll a job
curl --request GET \
--url https://api-v2.pricepirate.com/api/v2/jobs/{jobId} \
--header 'x-api-key: <api-key>'import requests
url = "https://api-v2.pricepirate.com/api/v2/jobs/{jobId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api-v2.pricepirate.com/api/v2/jobs/{jobId}', 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://api-v2.pricepirate.com/api/v2/jobs/{jobId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-v2.pricepirate.com/api/v2/jobs/{jobId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-v2.pricepirate.com/api/v2/jobs/{jobId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-v2.pricepirate.com/api/v2/jobs/{jobId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"error": false,
"job_id": "<string>",
"status": "pending",
"source": "<string>",
"operation": "<string>",
"country": "<string>",
"created_at": "<string>",
"results": [
{
"query": "<string>",
"status": "found",
"result": {
"id": "<string>",
"name": "<string>",
"url": "<string>",
"ean": "<string>",
"brand": "<string>",
"description": "<string>",
"image_urls": [
"<string>"
],
"review_rating": 123,
"review_count": 123,
"categories": [
"<string>"
],
"category_ids": [
"<string>"
],
"price_avg": 123,
"price_max": 123,
"price_min": 123,
"offers_count": 123,
"offers": [
{
"sellerId": "<string>",
"shop_name": "<string>",
"shop_url": "<string>",
"shop_type": "<string>",
"marketplace_name": "<string>",
"shop_review_rating": 123,
"shop_review_count": 123,
"position": "<string>",
"condition": "<string>",
"currency": "<string>",
"price": 123,
"shipping": 123,
"total": 123,
"free_return": true,
"voucher": true,
"availability_text": "<string>",
"classification": "same_variant",
"confidence": "high",
"platform_data": "<unknown>",
"title": "<string>",
"availability_code": "<string>",
"direct_sale": true
}
],
"source": "<string>",
"country": "<string>",
"fetched_at": "<string>",
"platform_data": "<unknown>",
"page_type": "product",
"available_since": "<string>",
"last_updated": "<string>"
},
"error": "<string>",
"errorCode": "invalid_query"
}
],
"done": 123,
"total": 123,
"summary": {
"found": 123,
"not_found": 123,
"error": 123,
"classifications": {
"same_variant": 123,
"likely_same_variant": 123,
"same_family_different_variant": 123,
"different_product": 123,
"unclear": 123,
"product_page_match": 123,
"multipack": 123,
"bundle": 123
}
}
}{
"error": false,
"job_id": "<string>",
"status": "pending",
"source": "<string>",
"operation": "<string>",
"country": "<string>",
"created_at": "<string>",
"results": [
{
"query": "<string>",
"status": "found",
"result": {
"id": "<string>",
"name": "<string>",
"url": "<string>",
"ean": "<string>",
"brand": "<string>",
"description": "<string>",
"image_urls": [
"<string>"
],
"review_rating": 123,
"review_count": 123,
"categories": [
"<string>"
],
"category_ids": [
"<string>"
],
"price_avg": 123,
"price_max": 123,
"price_min": 123,
"offers_count": 123,
"offers": [
{
"sellerId": "<string>",
"shop_name": "<string>",
"shop_url": "<string>",
"shop_type": "<string>",
"marketplace_name": "<string>",
"shop_review_rating": 123,
"shop_review_count": 123,
"position": "<string>",
"condition": "<string>",
"currency": "<string>",
"price": 123,
"shipping": 123,
"total": 123,
"free_return": true,
"voucher": true,
"availability_text": "<string>",
"classification": "same_variant",
"confidence": "high",
"platform_data": "<unknown>",
"title": "<string>",
"availability_code": "<string>",
"direct_sale": true
}
],
"source": "<string>",
"country": "<string>",
"fetched_at": "<string>",
"platform_data": "<unknown>",
"page_type": "product",
"available_since": "<string>",
"last_updated": "<string>"
},
"error": "<string>",
"errorCode": "invalid_query"
}
],
"done": 123,
"total": 123,
"summary": {
"found": 123,
"not_found": 123,
"error": 123,
"classifications": {
"same_variant": 123,
"likely_same_variant": 123,
"same_family_different_variant": 123,
"different_product": 123,
"unclear": 123,
"product_page_match": 123,
"multipack": 123,
"bundle": 123
}
}
}{
"error": true,
"message": "<string>"
}{
"error": true,
"message": "<string>"
}{
"error": true,
"message": "<string>"
}{
"error": true,
"message": "<string>"
}