Skip to main content

Overview

History keeps a record of every API call your account makes (scrape, extract, search, monitor ticks, crawl jobs, schema generations) and lets you fetch the full result back later by ID. The most common use case is retrieving the formatted content of a crawled page — the Crawl service returns each page as a scrapeRefId, and History is what you call with that ID to get the markdown, HTML, JSON extraction, or screenshot the underlying scrape produced.

Getting Started

Quick Start

Parameters

List (GET /api/history) Get (GET /api/history/:id)
Get your API key from the dashboard.
Send SGAI-Session-Id with each REST API request in the same workflow:
The session ID is optional, accepts 1–128 characters after trimming, and is returned as sessionId on history entries. Search by any case-insensitive portion of the value, such as sessionId=import. The dashboard also displays and filters by session ID. When a crawl request includes the header, its child scrape entries inherit the same session ID.

Fetching crawled page content

This is the canonical pattern: start a crawl, poll until done, then call History for each page.

Linking children to a parent crawl

Every child scrape entry produced by a crawl has requestParentId set to the parent crawl’s id. So you can also list all pages from a single crawl by filtering on the client:

Entry shape

Async Support (Python)

Key Features

Crawl Page Content

Resolve scrapeRefIds from crawl results to fetch each page’s formatted content.

Replay Past Requests

Fetch the full result of any past call without re-running it (no extra credits).

Session Filtering

Group related calls and find them with a case-insensitive partial session ID match.

Parent Linking

requestParentId ties child requests back to the crawl or workflow that spawned them.

Integration Options

Official SDKs

Support & Resources

API Reference

Detailed endpoint documentation

Crawl Service

The most common source of scrapeRefIds

Community

Join our Discord community

GitHub

Check out our open-source projects