Monitor API
Topic monitoring with alerts for content changes and new developments.
Monitor API
Set up persistent monitors that track topics and alert you when new relevant content appears.
Create Monitor
POST /api/v1/monitor/topics
Create a new topic monitor.
Body Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
topic | string | required | Topic to monitor |
keywords | string[] | required | Keywords to track |
sources | string[] | — | Specific domains to monitor |
check_interval_minutes | integer | 60 | Check frequency (5-1440) |
webhook_url | string | — | URL for alert notifications |
deep_analysis | boolean | false | Enable AI analysis of new content |
Example Request
curl -X POST 'https://api.unsearch.dev/api/v1/monitor/topics' \
-H 'X-API-Key: sk_live_xxxxx' \
-H 'Content-Type: application/json' \
-d '{
"topic": "AI regulation",
"keywords": ["AI", "regulation", "policy", "governance"],
"check_interval_minutes": 60,
"webhook_url": "https://your-app.com/webhook",
"deep_analysis": true
}'Response
{
"id": "mon_abc123",
"topic": "AI regulation",
"keywords": ["AI", "regulation", "policy", "governance"],
"sources": null,
"check_interval_minutes": 60,
"webhook_url": "https://your-app.com/webhook",
"deep_analysis": true,
"status": "active",
"last_checked": null,
"alerts_sent": 0,
"created_at": "2025-03-01T12:00:00Z"
}List Monitors
GET /api/v1/monitor/topics
List all active monitors.
Response
[
{
"id": "mon_abc123",
"topic": "AI regulation",
"keywords": ["AI", "regulation"],
"status": "active",
"last_checked": "2025-03-01T13:00:00Z",
"alerts_sent": 5,
"created_at": "2025-03-01T12:00:00Z"
}
]Get Monitor Details
GET /api/v1/monitor/topics/{monitor_id}
Get full details for a specific monitor.
Pause Monitor
POST /api/v1/monitor/topics/{monitor_id}/pause
{ "status": "paused", "monitor_id": "mon_abc123" }Resume Monitor
POST /api/v1/monitor/topics/{monitor_id}/resume
{ "status": "active", "monitor_id": "mon_abc123" }Trigger Manual Check
POST /api/v1/monitor/topics/{monitor_id}/check
Force an immediate check for a monitor instead of waiting for the next scheduled check.
{ "status": "checking", "monitor_id": "mon_abc123" }Get Monitor Results
GET /api/v1/monitor/topics/{monitor_id}/results
Get recent results for a monitor.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 10 | Max results to return |
Response
[
{
"id": "res_001",
"monitor_id": "mon_abc123",
"timestamp": "2025-03-01T14:00:00Z",
"new_results": [
{
"title": "EU AI Act Implementation Update",
"url": "https://example.com/eu-ai-act",
"snippet": "The European Union has announced..."
}
],
"analysis": "A significant regulatory development..."
}
]Delete Monitor
DELETE /api/v1/monitor/topics/{monitor_id}
{ "deleted": true, "monitor_id": "mon_abc123" }Webhook Payload
When a monitor detects new content, it sends a POST to your webhook URL:
{
"monitor_id": "mon_abc123",
"topic": "AI regulation",
"new_results": [
{
"title": "New AI Policy",
"url": "https://example.com",
"snippet": "..."
}
],
"analysis": "AI analysis if deep_analysis is enabled...",
"timestamp": "2025-03-01T14:00:00Z"
}