Poll a job
Poll a job until its status is completed or failed. Results are retained for about an hour after completion, so fetch them within that window. Jobs are only visible to the API key that created them.
curl --request GET \
--url https://api-v2.pricepirate.com/api/jobs/{jobId} \
--header 'x-api-key: <api-key>'import requests
url = "https://api-v2.pricepirate.com/api/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/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/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/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/jobs/{jobId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-v2.pricepirate.com/api/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",
"title": "<string>",
"availability_code": "<string>",
"direct_sale": true
}
],
"source": "<string>",
"country": "<string>",
"fetched_at": "<string>",
"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>"
}Autorisierungen
Pfadparameter
Abfrageparameter
When 1 / true / yes, results comes back empty while status is pending — progress fields (done / total / summary) are unaffected, and a terminal poll always carries the full array. Only relevant for Idealo search jobs; inert for other sources.
"1"
Antwort
Job view (partial while pending, full when terminal)
- Option 1
- Option 2
The job view. Idealo search jobs report progress (done / total / summary) and progressive results with classified offers; other sources return their results when the job completes.
false pending, completed, failed Show child attributes
Show child attributes
Queries that have reached a terminal result. Counts queries, not result items — a search-by-term query returning 20 tiles is 1 done, not 20 — so done never exceeds total.
Number of queries the job was created with.
Show child attributes
Show child attributes
War diese Seite hilfreich?
curl --request GET \
--url https://api-v2.pricepirate.com/api/jobs/{jobId} \
--header 'x-api-key: <api-key>'import requests
url = "https://api-v2.pricepirate.com/api/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/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/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/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/jobs/{jobId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-v2.pricepirate.com/api/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",
"title": "<string>",
"availability_code": "<string>",
"direct_sale": true
}
],
"source": "<string>",
"country": "<string>",
"fetched_at": "<string>",
"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>"
}