Skip to main content

Create Monitor

Create a new website monitor to track changes.

Endpoint

POST /v1/monitoring

Request Body

ParameterTypeRequiredDescription
namestringYesDisplay name for the monitor (max 100 chars)
urlstringYesURL to monitor
monitorTypestringNoType of monitoring: full_page, selector, api_response. Default: full_page
selectorstringNoCSS selector to monitor (required for selector type)
promptstringNoAI prompt for custom change detection
checkIntervalstringNoCheck frequency. Default: hourly
notifyOnlyOnChangesbooleanNoOnly alert when changes detected. Default: true
includeScreenshotbooleanNoInclude screenshot with alerts. Default: false
alertChannelsarrayNoAlert channel configurations

Check Intervals

ValueDescription
5minEvery 5 minutes
15minEvery 15 minutes
30minEvery 30 minutes
hourlyEvery hour
6hoursEvery 6 hours
12hoursEvery 12 hours
dailyOnce per day
weeklyOnce per week

Alert Channel Object

ParameterTypeRequiredDescription
typestringYesChannel type: email, slack, webhook
emailstringConditionalEmail address (required for email type)
slackWebhookUrlstringConditionalSlack webhook URL (required for slack type)
webhookUrlstringConditionalWebhook URL (required for webhook type)
webhookHeadersobjectNoCustom headers for webhook

Example Requests

Full Page Monitor with Email Alert

curl -X POST https://api.scrapebit.com/v1/monitoring \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Competitor Homepage",
"url": "https://competitor.example.com",
"monitorType": "full_page",
"checkInterval": "daily",
"alertChannels": [
{
"type": "email",
"email": "alerts@mycompany.com"
}
]
}'

Price Monitor with Selector

curl -X POST https://api.scrapebit.com/v1/monitoring \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Product Price",
"url": "https://shop.example.com/product/123",
"monitorType": "selector",
"selector": ".product-price, .sale-price",
"checkInterval": "hourly",
"alertChannels": [
{
"type": "email",
"email": "pricing@mycompany.com"
},
{
"type": "slack",
"slackWebhookUrl": "https://hooks.slack.com/services/..."
}
]
}'

Stock Availability Monitor with Webhook

curl -X POST https://api.scrapebit.com/v1/monitoring \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "GPU Stock Alert",
"url": "https://store.example.com/rtx-4090",
"monitorType": "selector",
"selector": ".stock-status, .add-to-cart",
"checkInterval": "5min",
"alertChannels": [
{
"type": "webhook",
"webhookUrl": "https://api.myapp.com/stock-alert",
"webhookHeaders": {
"X-Custom-Token": "my-secret-token"
}
}
]
}'

AI-Powered Content Monitor

curl -X POST https://api.scrapebit.com/v1/monitoring \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "News Page Monitor",
"url": "https://news.example.com/tech",
"monitorType": "full_page",
"prompt": "Alert me if there are any articles about AI regulations or cryptocurrency",
"checkInterval": "hourly",
"alertChannels": [
{
"type": "email",
"email": "news@mycompany.com"
}
]
}'

Response

{
"success": true,
"data": {
"id": "mon_abc123xyz",
"name": "Product Price",
"url": "https://shop.example.com/product/123",
"monitorType": "selector",
"selector": ".product-price",
"checkInterval": "hourly",
"status": "active",
"nextCheckAt": "2025-02-01T15:00:00Z",
"consecutiveErrors": 0,
"notifyOnlyOnChanges": true,
"alertChannels": [
{
"id": "ch_xyz789",
"type": "email",
"email": "alerts@example.com",
"isEnabled": true
}
],
"createdAt": "2025-02-01T14:00:00Z"
}
}

Webhook Payload

When changes are detected, webhooks receive:

{
"event": "monitor.change_detected",
"timestamp": "2025-02-01T15:00:05Z",
"data": {
"monitorId": "mon_abc123xyz",
"monitorName": "Product Price",
"url": "https://shop.example.com/product/123",
"check": {
"id": "chk_def456",
"status": "success",
"changeDetected": true,
"changeSummary": "Price changed from $299.99 to $249.99",
"checkedAt": "2025-02-01T15:00:03Z",
"responseTimeMs": 1523
}
}
}

Error Responses

StatusErrorDescription
400Validation errorInvalid request body
402Insufficient creditsNeed at least 1 credit
401UnauthorizedInvalid or missing API key

Try It Out

POST/v1/monitoring

Create a new website monitor

Your API key is stored locally in your browser