GET
/
scrape
/
results
/
{job_id}
Get Job Results
curl --request GET \
  --url https://api.skop.dev/scrape/results/{job_id} \
  --header 'Authorization: Bearer <token>'
{
  "job_id": "<string>",
  "status": "pending",
  "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>"
  ]
}
Returns the final results of a completed scraping job, including all extracted documents.

Path Parameters

ParameterTypeDescription
job_idstringUnique 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

FieldTypeDescription
job_idstringJob identifier
statusstringJob status (should be completed)
messagestringSummary message with document count
documentsarrayArray of extracted document objects
metadataobjectJob metadata and original parameters
total_documents_foundnumberTotal documents discovered
total_documents_downloadednumberSuccessfully downloaded documents
total_pages_crawlednumberPages processed during scraping
success_ratenumberSuccess rate (0.0-1.0)
costnumberTotal cost in USD for this job
total_runtime_secondsnumberJob execution time in seconds
runtime_minutesnumberJob execution time in minutes
has_errorsbooleanWhether any errors occurred
errorsarrayList of error objects (if any)
warningsarrayList of warning messages (if any)

Document Object Fields

FieldTypeDescription
namestringHuman-readable document name
urlstringDirect URL to the document file
source_pagestringWeb page where document was found
document_typestringFile type (pdf, doc, docx, txt, etc.)
confidence_scorenumberAI confidence score (0.0-1.0)
file_size_mbnumberFile size in megabytes
extracted_atstringISO 8601 extraction timestamp

Error Responses

StatusDescription
404Job not found or access denied
500Internal 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

Authorization
string
header
required

API key in format 'sk-xxxxxxxxxxxxx' or 'sk_xxxxxxxxxxxxx'

Path Parameters

job_id
string
required

Unique job identifier

Response

200
application/json

Job results with extracted documents

The response is of type object.