Skip to main content

Just want working code?

Stop reading. Skip to the Monitors coding agent reference and copy paste to your agent.

What Are Monitors?

Monitors run Exa searches on a cron schedule and deliver results to a webhook endpoint. Each run finds and synthesizes results, with automatic deduplication so you only see new content across runs. Use them to track competitor announcements, new funding rounds, regulatory changes, research publications, or any topic you want to follow over time.

Key Capabilities

FeatureWhat It Does
Scheduled searchRuns your query on a cron schedule using Exa search
Automatic deduplicationDate filtering and semantic dedup ensure each run surfaces only new content
Structured outputUse outputSchema to get results as plain text summaries or structured JSON objects
Contents optionsRequest text, highlights, or summaries alongside search results
Webhook deliveryGet notified in real time when runs complete
Manual triggerRun on demand without waiting for the next scheduled time

Common Use Cases

Get notified when new companies raise funding in a specific sector.
monitor = exa.monitors.create(params={
    "name": "Series A Tracker",
    "search": {
        "query": "AI startups that raised Series A funding",
        "numResults": 10
    },
    "trigger": {
        "type": "cron",
        "expression": "0 9 * * 1",
        "timezone": "America/New_York"
    },
    "webhook": {
        "url": "https://example.com/webhook"
    }
})
Extract structured data from competitor coverage using an output schema.
monitor = exa.monitors.create(params={
    "name": "Competitor News",
    "search": {
        "query": "Acme Corp product launches and partnerships",
        "numResults": 5
    },
    "outputSchema": {
        "type": "object",
        "properties": {
            "headline": {"type": "string"},
            "category": {
                "type": "string",
                "enum": ["product_launch", "partnership", "hiring", "other"]
            },
            "summary": {"type": "string"}
        },
        "required": ["headline", "category", "summary"]
    },
    "trigger": {
        "type": "cron",
        "expression": "0 8 * * *",
        "timezone": "Etc/UTC"
    },
    "webhook": {
        "url": "https://example.com/webhook"
    }
})
Follow new publications in a field, with token-efficient highlights included.
monitor = exa.monitors.create(params={
    "name": "LLM Research Tracker",
    "search": {
        "query": "new large language model training techniques and architectures",
        "numResults": 10,
        "contents": {
            "highlights": {
                "maxCharacters": 4000
            }
        }
    },
    "trigger": {
        "type": "cron",
        "expression": "0 12 * * 1,4",
        "timezone": "Etc/UTC"
    },
    "webhook": {
        "url": "https://example.com/webhook"
    }
})

Human Quickstart

Get your API key from the Exa Dashboard.
pip install exa-py
from exa_py import Exa
import os

exa = Exa(os.getenv("EXA_API_KEY"))

# Create a monitor
monitor = exa.monitors.create(params={
    "name": "AI Funding Tracker",
    "search": {
        "query": "AI startups that raised Series A funding",
        "numResults": 10
    },
    "webhook": {
        "url": "https://example.com/webhook"
    }
})

print(f"Monitor ID: {monitor.id}")

# Store the webhook secret securely — only returned on creation
print(f"Webhook secret: {monitor.webhook_secret}")

# Trigger a run manually
exa.monitors.trigger(monitor.id)

# Poll for results
import time
while True:
    runs = exa.monitors.runs.list(monitor.id)
    latest = runs.data[0]
    if latest.status in ("completed", "failed"):
        break
    time.sleep(2)

# Print results
if latest.status == "completed" and latest.output:
    run = exa.monitors.runs.get(monitor.id, latest.id)
    for result in run.output.results:
        print(f"- {result['title']}: {result['url']}")

Next