Skip to main content

Manage Monitors

Update, pause, resume, and delete monitors.

Get Monitor Details

GET /v1/monitoring/:id

Example

curl -X GET https://api.scrapebit.com/v1/monitoring/mon_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"

Response

Returns the monitor with recent checks and alerts:

{
"success": true,
"data": {
"id": "mon_abc123",
"name": "Product Price",
"url": "https://shop.example.com/product/123",
"monitorType": "selector",
"selector": ".product-price",
"checkInterval": "hourly",
"status": "active",
"lastCheckAt": "2025-02-01T14:00:00Z",
"nextCheckAt": "2025-02-01T15:00:00Z",
"consecutiveErrors": 0,
"notifyOnlyOnChanges": true,
"alertChannels": [...],
"checks": [
{
"id": "chk_xyz789",
"status": "success",
"changeDetected": false,
"checkedAt": "2025-02-01T14:00:00Z",
"responseTimeMs": 1234
}
],
"alerts": [
{
"id": "alt_abc123",
"channelType": "email",
"success": true,
"sentAt": "2025-02-01T10:00:05Z"
}
],
"_count": {
"checks": 48,
"alerts": 3
}
}
}

Update Monitor

PATCH /v1/monitoring/:id

Request Body

ParameterTypeDescription
namestringDisplay name
urlstringURL to monitor
monitorTypestringfull_page, selector, api_response
selectorstringCSS selector (null to remove)
promptstringAI prompt (null to remove)
checkIntervalstringCheck frequency
statusstringactive or paused
notifyOnlyOnChangesbooleanOnly alert on changes
includeScreenshotbooleanInclude screenshots

Example

curl -X PATCH https://api.scrapebit.com/v1/monitoring/mon_abc123 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"checkInterval": "15min",
"name": "Critical Price Monitor"
}'

Pause Monitor

Temporarily stop checking without deleting the monitor.

POST /v1/monitoring/:id/pause

Example

curl -X POST https://api.scrapebit.com/v1/monitoring/mon_abc123/pause \
-H "Authorization: Bearer YOUR_API_KEY"

Response

{
"success": true,
"message": "Monitor paused"
}

Resume Monitor

Resume a paused monitor. The next check is scheduled based on the check interval.

POST /v1/monitoring/:id/resume

Example

curl -X POST https://api.scrapebit.com/v1/monitoring/mon_abc123/resume \
-H "Authorization: Bearer YOUR_API_KEY"

Response

{
"success": true,
"data": {
"id": "mon_abc123",
"status": "active",
"nextCheckAt": "2025-02-01T15:30:00Z",
"consecutiveErrors": 0,
...
}
}

Trigger Immediate Check

Run a check immediately without waiting for the next scheduled time.

POST /v1/monitoring/:id/check-now

Note: This uses 1 credit.

Example

curl -X POST https://api.scrapebit.com/v1/monitoring/mon_abc123/check-now \
-H "Authorization: Bearer YOUR_API_KEY"

Response

{
"success": true,
"data": {
"id": "chk_xyz789",
"status": "success",
"changeDetected": true,
"changeSummary": "Price changed from $299.99 to $249.99",
"checkedAt": "2025-02-01T14:35:00Z",
"responseTimeMs": 1523
},
"message": "Changes detected!"
}

Delete Monitor

Permanently delete a monitor and all its check/alert history.

DELETE /v1/monitoring/:id

Example

curl -X DELETE https://api.scrapebit.com/v1/monitoring/mon_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"

Response

{
"success": true,
"message": "Monitor deleted"
}

Get Check History

Retrieve the check history for a monitor.

GET /v1/monitoring/:id/checks

Query Parameters

ParameterTypeDescription
pageintegerPage number (default: 1)
limitintegerItems per page (default: 20)
changesOnlybooleanOnly show checks with changes

Example

curl -X GET "https://api.scrapebit.com/v1/monitoring/mon_abc123/checks?changesOnly=true" \
-H "Authorization: Bearer YOUR_API_KEY"

Get Alert History

Retrieve sent alerts for a monitor.

GET /v1/monitoring/:id/alerts

Example

curl -X GET https://api.scrapebit.com/v1/monitoring/mon_abc123/alerts \
-H "Authorization: Bearer YOUR_API_KEY"

Response

{
"success": true,
"data": [
{
"id": "alt_abc123",
"channelType": "email",
"success": true,
"sentAt": "2025-02-01T10:00:05Z",
"check": {
"checkedAt": "2025-02-01T10:00:02Z",
"changeSummary": "Price dropped from $299.99 to $249.99"
}
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 1,
"totalPages": 1
}
}