Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.scrapegraphai.com/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Monitor watches a page on a cron schedule, fetches it in the formats you specify (markdown, JSON, screenshot…), and records change diffs between runs. Optionally push each tick to a webhook.
Try Monitor in our dashboard.

Pricing

Each tick is billed at the underlying Scrape format cost (1 credit for markdown, 2 for screenshot, 25 for branding; multiple formats are summed). When a tick detects a change versus the previous run, +5 credits are added on top. Enabling stealth in fetchConfig adds 5 credits per tick; render mode (auto / fast / js) does not affect the cost. See the pricing page for the full breakdown.

Getting Started

Quick Start

from scrapegraph_py import ScrapeGraphAI, MarkdownFormatConfig

# reads SGAI_API_KEY from env, or pass explicitly: ScrapeGraphAI(api_key="...")
sgai = ScrapeGraphAI()

res = sgai.monitor.create(
    "https://example.com",
    "*/30 * * * *",            # every 30 minutes
    name="Homepage watch",
    formats=[MarkdownFormatConfig()],
)

if res.status == "success":
    print("Monitor id:", res.data.cron_id)
else:
    print("Failed:", res.error)

Parameters

ParameterTypeRequiredDescription
urlstringYesThe URL to monitor.
namestringYesHuman-readable monitor name.
intervalstringYes5-field cron expression (e.g. "*/10 * * * *").
formatsarrayNoFormats to capture each tick (see Scrape formats).
webhookUrl / webhook_urlstringNoURL to receive tick payloads.
fetchConfig / fetch_configobjectNoFetch options (see Scrape · FetchConfig).
Get your API key from the dashboard.
{
  "cronId": "d9a09a07-5052-4262-a0b4-606cbd942287",
  "scheduleId": "scd_8752XzxtXmLmrvgGzwLVG42iGKaz",
  "interval": "*/30 * * * *",
  "status": "active",
  "config": {
    "url": "https://example.com",
    "name": "Homepage watch",
    "formats": [{ "mode": "normal", "type": "markdown" }],
    "interval": "*/30 * * * *",
    "fetchConfig": { "mode": "auto", "wait": 0, "scrolls": 0, "stealth": false, "timeout": 30000 }
  },
  "createdAt": "2026-04-19T14:51:02.203Z",
  "updatedAt": "2026-04-19T14:51:02.203Z"
}

Managing Monitors

# List all
sgai.monitor.list()

# Inspect one
sgai.monitor.get(monitor_id)

# Change schedule or formats
sgai.monitor.update(monitor_id, interval="0 */6 * * *")

# Pause / resume / delete
sgai.monitor.pause(monitor_id)
sgai.monitor.resume(monitor_id)
sgai.monitor.delete(monitor_id)

# Recent ticks + diffs
activity = sgai.monitor.activity(monitor_id)
for tick in activity.data.ticks:
    print(tick.created_at, "changed" if tick.changed else "no change")

Structured extraction on every tick

Use the json format inside a monitor to extract the same typed payload on each run — then activity will include diffs between runs.
from scrapegraph_py import ScrapeGraphAI, JsonFormatConfig

sgai = ScrapeGraphAI()

res = sgai.monitor.create(
    "https://time.is/",
    "*/10 * * * *",
    name="Time Monitor",
    formats=[JsonFormatConfig(
        prompt="Extract the current time",
        schema={
            "type": "object",
            "properties": {"time": {"type": "string"}},
            "required": ["time"],
        },
    )],
)

Async Support (Python)

import asyncio
from scrapegraph_py import AsyncScrapeGraphAI, MarkdownFormatConfig

async def main():
    async with AsyncScrapeGraphAI() as sgai:
        res = await sgai.monitor.create(
            "https://example.com",
            "0 * * * *",
            name="async watch",
            formats=[MarkdownFormatConfig()],
        )
        if res.status == "success":
            print(res.data.cron_id)

asyncio.run(main())

Common Cron Expressions

ExpressionSchedule
*/10 * * * *Every 10 minutes
*/30 * * * *Every 30 minutes
0 */6 * * *Every 6 hours
0 9 * * *Daily at 9 AM
0 9 * * 1Every Monday at 9 AM
0 0 1 * *First day of every month

Key Features

Scheduled Extraction

Any cron schedule, down to per-minute granularity.

Change Detection

Each tick records diffs vs. the previous run.

Webhooks

Push tick payloads to your own server via webhookUrl.

Structured Output

Combine with the json format for typed monitoring.

Integration Options

Official SDKs

Support & Resources

Documentation

Guides and tutorials

API Reference

Detailed API documentation

Community

Join our Discord community

GitHub

Check out our open-source projects