UnSearch Docs

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

ParameterTypeDefaultDescription
topicstringrequiredTopic to monitor
keywordsstring[]requiredKeywords to track
sourcesstring[]Specific domains to monitor
check_interval_minutesinteger60Check frequency (5-1440)
webhook_urlstringURL for alert notifications
deep_analysisbooleanfalseEnable 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

ParameterTypeDefaultDescription
limitinteger10Max 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"
}

On this page