GET
/
v1
/
searchscraper
/
{request_id}
{
  "400": {},
  "404": {},
  "request_id": "<string>",
  "status": "<string>",
  "user_prompt": "<string>",
  "result": {},
  "reference_urls": [
    {}
  ],
  "error": "<string>"
}

Path Parameters

request_id
string
required
The unique identifier of the search request to retrieve.Example: “123e4567-e89b-12d3-a456-426614174000”

Response

request_id
string
The unique identifier of the search request.
status
string
Status of the request. One of: “queued”, “processing”, “completed”, “failed”
user_prompt
string
The original search query that was submitted.
result
object
The search results. If an output_schema was provided in the original request, this will be structured according to that schema.
reference_urls
array
List of URLs that were used as references for the answer.
error
string
Error message if the request failed. Empty string if successful.

Example Request

curl 'https://api.scrapegraphai.com/v1/searchscraper/123e4567-e89b-12d3-a456-426614174000' \
-H 'SGAI-APIKEY: YOUR_API_KEY'

Example Response

{
  "request_id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "completed",
  "user_prompt": "What is the latest version of Python and what are its main features?",
  "result": {
    "version": "3.12",
    "release_date": "October 2, 2023",
    "major_features": [
      "Improved error messages",
      "Per-interpreter GIL",
      "Support for the Linux perf profiler",
      "Faster startup time"
    ]
  },
  "reference_urls": [
    "https://www.python.org/downloads/",
    "https://docs.python.org/3.12/whatsnew/3.12.html"
  ],
  "error": ""
}

Error Responses

400
object
Returned when the request_id is not a valid UUID.
{
  "error": "request_id must be a valid UUID"
}
404
object
Returned when the request_id is not found.
{
  "error": "Request not found"
}