API Documentation
Automate myeventwatch from code or AI agents: list, create, delete monitors, fetch events, check quota.
Quickstart
- Go to Settings → API Keys, enter a name and click Generate key.
- Keys start with
ew_and are shown only once — copy it now. - Send every request with header
Authorization: Bearer your_key, then call the endpoints below:
curl -H "Authorization: Bearer ew_your_key" \
https://myeventwatch.com/api/v1/monitors
Authentication
All /api/v1/* endpoints require the HTTP header Authorization: Bearer <your_key>. If a key leaks, Revoke it in Settings and generate a new one.
API quotas by plan
| plan | Calls / month | Write |
|---|---|---|
| Free | 1,000 | ✗ |
| X Only | 5,000 | ✓ |
| Web+Market | 5,000 | ✓ |
| Starter | 10,000 | ✓ |
| Pro | 50,000 | ✓ |
| Max | 200,000 | ✓ |
Check monthly usage anytime in Settings → API Keys, or query GET /api/v1/quota programmatically.
Endpoints
GET /api/v1/monitors
List all monitors of the current user.
{
"monitors": [
{"id": 19, "name": "PAYP", "type": "stock_price",
"enabled": true, "interval_minutes": 1}
]
}
POST /api/v1/monitors
Create a monitor. JSON body with required type and name. Optional params (per-type) and interval_minutes (default 60, not below your plan minimum).
curl -X POST https://myeventwatch.com/api/v1/monitors \
-H "Authorization: Bearer ew_your_key" \
-H "Content-Type: application/json" \
-d '{
"type": "stock_price",
"name": "AAPL",
"params": {"symbol": "AAPL", "target": 250},
"interval_minutes": 10
}'
Monitor types: website, stock_price, crypto, market, twitter, youtube, rss, reminder
Monitor parameters by type
Each monitor type accepts different params. Copy-paste these examples and adjust:
# Stock price alert: notify when AAPL crosses $250
{"type": "stock_price", "name": "AAPL",
"params": {"symbol": "AAPL", "target": 250},
"interval_minutes": 10}
# Stock: alert when TSLA drops below $200 OR rises above $300
{"type": "stock_price", "name": "TSLA range",
"params": {"symbol": "TSLA", "below": 200, "above": 300},
"interval_minutes": 10}
# X/Twitter: new posts from a handle
{"type": "twitter", "name": "@elonmusk",
"params": {"handle": "elonmusk"},
"interval_minutes": 10}
# YouTube: new videos from a channel
{"type": "youtube", "name": "Channel name",
"params": {"channel_url": "https://www.youtube.com/@channel"},
"interval_minutes": 60}
# Website: track changes via CSS selector
{"type": "website", "name": "Price page",
"params": {"url": "https://example.com/pricing",
"selector": ".price"},
"interval_minutes": 60}
# Reminder: one-time alert at a specific time (ISO 8601 UTC)
{"type": "reminder", "name": "Call mom",
"params": {"remind_at": "2026-10-15T12:00:00Z",
"repeat": "none"},
"interval_minutes": 60}
GET /api/v1/monitors/<id>
Get details of one monitor.
DELETE /api/v1/monitors/<id>
Delete a monitor (irreversible).
GET /api/v1/monitors/<id>/events?limit=20
Recent trigger events for a monitor, limit max 100, default 20.
GET /api/v1/quota
Monthly API usage: quota, used, left, current plan, write access. Check before batch jobs.
{
"plan": "pro",
"quota": 50000,
"used": 123,
"left": 49877,
"can_write": true
}
Client examples
Python
import requests
KEY = "ew_your_key"
BASE = "https://myeventwatch.com/api/v1"
h = {"Authorization": f"Bearer {KEY}"}
# List monitors
r = requests.get(f"{BASE}/monitors", headers=h)
print(r.json())
# Create a monitor
r = requests.post(f"{BASE}/monitors", headers=h, json={
"type": "website",
"name": "My blog",
"params": {"url": "https://example.com"},
"interval_minutes": 60,
})
print(r.status_code, r.json())
# Check quota
r = requests.get(f"{BASE}/quota", headers=h)
print(r.json()) # {"quota": 50000, "used": 123, ...}
JavaScript / Node.js
const KEY = "ew_your_key";
const BASE = "https://myeventwatch.com/api/v1";
const headers = { "Authorization": `Bearer ${KEY}` };
// List monitors
const res = await fetch(`${BASE}/monitors`, { headers });
const data = await res.json();
console.log(data.monitors);
Claude Code / AI Agents
In Claude Code or other AI agents, store the key as an env var and curl it from any bash step:
# In your agent script, set the key as an env var:
export MYEVENTWATCH_API_KEY="ew_your_key"
# Then call the API from any tool-use or bash step:
curl -s -H "Authorization: Bearer $MYEVENTWATCH_API_KEY" \
https://myeventwatch.com/api/v1/monitors | jq '.monitors[].name'
Connectors
Prefer not to write HTTP? Add myeventwatch as a Connector so the AI operates directly. Download myeventwatch_mcp.py, pip install mcp, then register in Claude Code:claude mcp add myeventwatch -- python /path/to/myeventwatch_mcp.py -e MYEVENTWATCH_API_KEY=ew_your_key
Or add to Claude Desktop / Cursor MCP config (Settings → Connectors → Add custom connector).
{
"mcpServers": {
"myeventwatch": {
"command": "python",
"args": ["/path/to/myeventwatch_mcp.py"],
"env": {"MYEVENTWATCH_API_KEY": "ew_your_key"}
}
}
}
Rate limits & errors
Two layers: 60 requests/minute (anti-abuse) and monthly quota (by plan). Exceeding either returns:
| Code | Meaning | What to do |
|---|---|---|
401 | Bad or missing key | Check header format, full key copied, not revoked |
403 | Free tier is read-only | Any paid plan unlocks writes |
402 | Monthly quota exhausted, or type not allowed for plan | Wait for reset or upgrade |
429 | Over 60 calls this minute | Slow down, retry with exponential backoff (1s, 2s, 4s…) |
404 | Monitor not found or not yours | Verify the id via GET /monitors |
Best practices
- Store keys in env vars or a secrets manager, never in git.
- Check
/quotabefore batch jobs to avoid a mid-run 402. - On 429, back off and retry — don’t hammer.
- Keep cron intervals ≥ 5 min to stay under both limits.