Monitor API
List monitors
List the monitors in your API organization, newest first.
GET
/
v1
/
monitors
from perplexity import Perplexity
client = Perplexity()
monitors = client.monitors.list(limit=20)
for monitor in monitors.data:
print(monitor.id, monitor.name, monitor.status)
import Perplexity from '@perplexity-ai/perplexity_ai';
const client = new Perplexity();
const monitors = await client.monitors.list({ limit: 20 });
for (const monitor of monitors.data) {
console.log(monitor.id, monitor.name, monitor.status);
}
curl "https://api.perplexity.ai/v1/monitors?limit=20" \
--header "Authorization: Bearer $PERPLEXITY_API_KEY" | jq
{
"object": "list",
"data": [
{
"id": "<string>",
"object": "monitor",
"name": "<string>",
"goal": "<string>",
"targets": [
{
"type": "search",
"query": "<string>",
"max_results": 10,
"filters": {
"freshness": [
"published"
],
"include_domains": [
"<string>"
],
"exclude_domains": [
"<string>"
]
},
"judge": {
"threshold": 0
}
}
],
"schedule": {
"type": "interval",
"interval": "<string>"
},
"metadata": {},
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"webhook": {
"url": "<string>",
"events": [
"monitor.changes.detected"
],
"secret": "<string>"
},
"pause_reason": "user",
"current_run_id": "<string>",
"next_run_at": "2023-11-07T05:31:56Z",
"last_run": {
"id": "<string>",
"status": "queued",
"change_count": 123,
"finished_at": "2023-11-07T05:31:56Z"
}
}
],
"has_more": true
}{
"error": {
"message": "<string>",
"type": "invalid_request",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request",
"code": 123,
"param": "<string>"
}
}The response contains monitors in
data and a has_more flag. When has_more is true, pass the id of the last monitor in data as after to get the next page. See Manage monitors for other lifecycle operations.
from perplexity import Perplexity
client = Perplexity()
monitors = client.monitors.list(limit=20)
for monitor in monitors.data:
print(monitor.id, monitor.name, monitor.status)
import Perplexity from '@perplexity-ai/perplexity_ai';
const client = new Perplexity();
const monitors = await client.monitors.list({ limit: 20 });
for (const monitor of monitors.data) {
console.log(monitor.id, monitor.name, monitor.status);
}
curl "https://api.perplexity.ai/v1/monitors?limit=20" \
--header "Authorization: Bearer $PERPLEXITY_API_KEY" | jq
Authorizations
Query Parameters
Was this page helpful?
⌘I
from perplexity import Perplexity
client = Perplexity()
monitors = client.monitors.list(limit=20)
for monitor in monitors.data:
print(monitor.id, monitor.name, monitor.status)
import Perplexity from '@perplexity-ai/perplexity_ai';
const client = new Perplexity();
const monitors = await client.monitors.list({ limit: 20 });
for (const monitor of monitors.data) {
console.log(monitor.id, monitor.name, monitor.status);
}
curl "https://api.perplexity.ai/v1/monitors?limit=20" \
--header "Authorization: Bearer $PERPLEXITY_API_KEY" | jq
{
"object": "list",
"data": [
{
"id": "<string>",
"object": "monitor",
"name": "<string>",
"goal": "<string>",
"targets": [
{
"type": "search",
"query": "<string>",
"max_results": 10,
"filters": {
"freshness": [
"published"
],
"include_domains": [
"<string>"
],
"exclude_domains": [
"<string>"
]
},
"judge": {
"threshold": 0
}
}
],
"schedule": {
"type": "interval",
"interval": "<string>"
},
"metadata": {},
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"webhook": {
"url": "<string>",
"events": [
"monitor.changes.detected"
],
"secret": "<string>"
},
"pause_reason": "user",
"current_run_id": "<string>",
"next_run_at": "2023-11-07T05:31:56Z",
"last_run": {
"id": "<string>",
"status": "queued",
"change_count": 123,
"finished_at": "2023-11-07T05:31:56Z"
}
}
],
"has_more": true
}{
"error": {
"message": "<string>",
"type": "invalid_request",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request",
"code": 123,
"param": "<string>"
}
}