Watch Endpoint
Set up URL monitoring in a single API call. The watch endpoint combines strategy generation and schedule creation, eliminating the need for multi-step orchestration.Create watch
Create a new watch to monitor a URL for changes.Request body
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | URL to monitor for changes |
description | string | Yes | What to extract from the page |
webhook_url | string | No | Webhook URL for change notifications |
interval_seconds | integer | No | How often to check (default: 3600, minimum: 60) |
name | string | No | Name for the strategy (auto-generated if not provided) |
Response
| Field | Type | Description |
|---|---|---|
strategy_id | UUID | ID of the created extraction strategy |
schedule_id | UUID | ID of the created schedule |
preview_data | array | Sample data extracted from the URL |
next_run_at | datetime | When the first scheduled scrape will run |
Example
What happens internally
The watch endpoint performs two operations in a single transaction:- Generates a strategy - Analyzes the page and creates extraction selectors using AI
- Creates a schedule - Sets up recurring scrapes with your specified interval
Managing your watch
After creation, use the standard endpoints to manage your watch:- Update schedule:
PATCH /api/schedules/{schedule_id} - Pause/resume:
PATCH /api/schedules/{schedule_id}with{"enabled": false} - Get changes:
GET /api/schedules/{schedule_id}/changes - Delete:
DELETE /api/schedules/{schedule_id} - Refine strategy:
POST /api/strategies/{strategy_id}/refine
Error responses
| Status | Description |
|---|---|
400 | Invalid request (missing required fields, interval too short) |
401 | Invalid or missing API key |
429 | Rate limit exceeded (watch endpoint is rate-limited) |
500 | Internal server error |
503 | Service temporarily unavailable (AI service issues) |
Next steps
Webhooks Guide
Receive change notifications
Pull-Based Monitoring
Poll for changes instead of webhooks
Schedule Endpoints
Manage your schedules
Strategy Endpoints
Refine extraction strategies