Get Job Results
curl --request GET \
--url https://api.skop.dev/scrape/results/{job_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.skop.dev/scrape/results/{job_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.skop.dev/scrape/results/{job_id}', 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.skop.dev/scrape/results/{job_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.skop.dev/scrape/results/{job_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.skop.dev/scrape/results/{job_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.skop.dev/scrape/results/{job_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"message": "<string>",
"documents": [
{
"name": "<string>",
"url": "<string>",
"source_page": "<string>",
"document_type": "<string>",
"confidence_score": 0.5,
"file_size_mb": 123,
"extracted_at": "2023-11-07T05:31:56Z"
}
],
"metadata": {
"job_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"original_website": "<string>",
"original_prompt": "<string>",
"parameters": {
"single_page": false,
"timeout": 1800,
"confidence_threshold": 0.1,
"file_type": "document",
"max_file_size_mb": 100
}
},
"total_documents_found": 123,
"total_documents_downloaded": 123,
"total_pages_crawled": 123,
"success_rate": 0.5,
"cost": 123,
"total_runtime_seconds": 123,
"runtime_minutes": 123,
"has_errors": true,
"errors": [
{
"error_id": "<string>",
"agent_name": "<string>",
"error_type": "<string>",
"error_message": "<string>",
"page_url": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"is_recoverable": true
}
],
"warnings": [
"<string>"
]
}{
"error": true,
"message": "<string>",
"status_code": 123,
"path": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}API Endpoints
Get Job Results
Get the final results and extracted documents from a completed job
GET
/
scrape
/
results
/
{job_id}
Get Job Results
curl --request GET \
--url https://api.skop.dev/scrape/results/{job_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.skop.dev/scrape/results/{job_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.skop.dev/scrape/results/{job_id}', 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.skop.dev/scrape/results/{job_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.skop.dev/scrape/results/{job_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.skop.dev/scrape/results/{job_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.skop.dev/scrape/results/{job_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"message": "<string>",
"documents": [
{
"name": "<string>",
"url": "<string>",
"source_page": "<string>",
"document_type": "<string>",
"confidence_score": 0.5,
"file_size_mb": 123,
"extracted_at": "2023-11-07T05:31:56Z"
}
],
"metadata": {
"job_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"original_website": "<string>",
"original_prompt": "<string>",
"parameters": {
"single_page": false,
"timeout": 1800,
"confidence_threshold": 0.1,
"file_type": "document",
"max_file_size_mb": 100
}
},
"total_documents_found": 123,
"total_documents_downloaded": 123,
"total_pages_crawled": 123,
"success_rate": 0.5,
"cost": 123,
"total_runtime_seconds": 123,
"runtime_minutes": 123,
"has_errors": true,
"errors": [
{
"error_id": "<string>",
"agent_name": "<string>",
"error_type": "<string>",
"error_message": "<string>",
"page_url": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"is_recoverable": true
}
],
"warnings": [
"<string>"
]
}{
"error": true,
"message": "<string>",
"status_code": 123,
"path": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}Returns the final results of a completed scraping job, including all extracted documents.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
job_id | string | Unique job identifier |
Example Request
const getResults = async (jobId) => {
const response = await fetch(`https://api.skop.dev/scrape/results/${jobId}`, {
headers: {
'Authorization': 'Bearer sk-your-api-key'
}
})
return await response.json()
}
Response (200 OK)
{
"job_id": "job_123456789",
"status": "completed",
"message": "Job completed successfully. Found 12 document(s).",
"documents": [
{
"name": "Board Meeting Minutes - January 2024",
"url": "https://example.com/docs/minutes-jan-2024.pdf",
"source_page": "https://example.com/meetings",
"document_type": "pdf",
"confidence_score": 0.95,
"file_size_mb": 2.3,
"extracted_at": "2024-01-15T10:25:00Z"
}
],
"metadata": {
"job_id": "job_123456789",
"created_at": "2024-01-15T10:00:00Z",
"started_at": "2024-01-15T10:01:00Z",
"completed_at": "2024-01-15T10:28:00Z",
"estimated_completion": "2024-01-15T10:30:00Z",
"original_website": "https://example.com",
"original_prompt": "Find all board meeting minutes from 2024",
"parameters": {
"single_page": false,
"timeout": 1800,
"confidence_threshold": 0.7
},
"current_agent": null,
"agents_completed": ["coordinator", "navigator", "scraper"],
"total_pages_crawled": 4,
"total_documents_found": 15,
"errors": [],
"warnings": ["Some documents were too large to download"],
"final_status": "completed"
},
"total_documents_found": 15,
"total_documents_downloaded": 12,
"total_pages_crawled": 4,
"success_rate": 0.8,
"cost": 2.16,
"total_runtime_seconds": 1680,
"runtime_minutes": 28.0,
"errors": [],
"warnings": ["Some documents were too large to download"],
"has_errors": false
}
Response Fields
| Field | Type | Description |
|---|---|---|
job_id | string | Job identifier |
status | string | Job status (should be completed) |
message | string | Summary message with document count |
documents | array | Array of extracted document objects |
metadata | object | Job metadata and original parameters |
total_documents_found | number | Total documents discovered |
total_documents_downloaded | number | Successfully downloaded documents |
total_pages_crawled | number | Pages processed during scraping |
success_rate | number | Success rate (0.0-1.0) |
cost | number | Total cost in USD for this job |
total_runtime_seconds | number | Job execution time in seconds |
runtime_minutes | number | Job execution time in minutes |
has_errors | boolean | Whether any errors occurred |
errors | array | List of error objects (if any) |
warnings | array | List of warning messages (if any) |
Document Object Fields
| Field | Type | Description |
|---|---|---|
name | string | Human-readable document name |
url | string | Direct URL to the document file |
source_page | string | Web page where document was found |
document_type | string | File type (pdf, doc, docx, txt, etc.) |
confidence_score | number | AI confidence score (0.0-1.0) |
file_size_mb | number | File size in megabytes |
extracted_at | string | ISO 8601 extraction timestamp |
Error Responses
| Status | Description |
|---|---|
404 | Job not found or access denied |
500 | Internal server error |
Example Usage
const processJob = async (jobId) => {
// Wait for job completion
let status
do {
await new Promise(resolve => setTimeout(resolve, 5000))
status = await fetch(`https://api.skop.dev/scrape/status/${jobId}`, {
headers: { 'Authorization': 'Bearer sk-your-api-key' }
}).then(r => r.json())
} while (status.is_active)
// Get results if completed successfully
if (status.status === 'completed') {
const results = await getResults(jobId)
console.log(`Found ${results.documents.length} documents:`)
results.documents.forEach(doc => {
console.log(`- ${doc.name} (${doc.confidence_score.toFixed(2)} confidence)`)
})
return results
} else {
console.error('Job failed:', status.message)
return null
}
}
Authorizations
API key in format 'sk-xxxxxxxxxxxxx' or 'sk_xxxxxxxxxxxxx'
Path Parameters
Unique job identifier
Pattern:
^job_[a-z0-9]+$Response
Job results with extracted documents
Job identifier
Pattern:
^job_[a-z0-9]+$Current status of the job
Available options:
pending, in_progress, completed, failed, cancelled Summary message with document count
Array of extracted document objects
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Total documents discovered
Successfully downloaded documents
Pages processed during scraping
Success rate (0.0-1.0)
Required range:
0 <= x <= 1Total cost in USD for this job
Job execution time in seconds
Job execution time in minutes
Whether any errors occurred
List of error objects (if any)
Show child attributes
Show child attributes
List of warning messages (if any)
⌘I