Back to source list
Official
Cursor source integration documentation
Sync management and usage data from Cursor to any destination
Publisher
cloudquery
Latest version
v1.0.0
Type
Source
Platforms
Date Published
Loading plugin documentation
Sync management and usage data from Cursor to any destination
Publisher
cloudquery
Latest version
v1.0.0
Type
Source
Platforms
Date Published
Loading plugin documentation
CloudQuery's use of cookies
We use tracking cookies to understand how you use the product and help us improve it. Your consent is required before we can enable these cookies. You can opt out via the link in the footer.
Authorization header.api_key field in the plugin spec configuration:spec:
api_key: "${CURSOR_API_KEY}"
kind: source
spec:
name: "cursor"
path: "cloudquery/cursor"
registry: "cloudquery"
version: "v1.0.0"
tables: ["*"]
destinations: ["postgresql"]
spec:
api_key: "${CURSOR_API_KEY}"
kind: source
spec:
name: "cursor"
path: "cloudquery/cursor"
registry: "cloudquery"
version: "v1.0.0"
tables: ["*"]
destinations: ["postgresql"]
spec:
api_key: "${CURSOR_API_KEY}"
table_options:
cursor_daily_usage_data:
start_date: "2025-01-01"
cursor_usage_events:
start_date: "2025-01-01"
cursor_audit_logs:
start_time: "2025-01-01T00:00:00Z"
SELECT name, email, role FROM cursor_members WHERE is_removed IS NOT TRUE;
SELECT
m.name,
m.email,
m.role,
s.spend_cents / 100.0 AS spend_usd,
s.fast_premium_requests,
s.monthly_limit_dollars
FROM cursor_spend s
JOIN cursor_members m ON m.email = s.email
WHERE m.is_removed IS NOT TRUE
ORDER BY s.spend_cents DESC;
SELECT
model,
COUNT(*) AS request_count,
SUM(charged_cents) / 100.0 AS total_cost_usd
FROM cursor_usage_events
WHERE is_chargeable IS TRUE
GROUP BY model
ORDER BY total_cost_usd DESC
LIMIT 10;
SELECT
m.name,
e.user_email,
e.model,
COUNT(*) AS requests,
SUM(e.charged_cents) / 100.0 AS cost_usd
FROM cursor_usage_events e
JOIN cursor_members m ON m.email = e.user_email
WHERE e.is_chargeable IS TRUE
GROUP BY m.name, e.user_email, e.model
ORDER BY cost_usd DESC;
SELECT
m.name,
d.email,
COUNT(DISTINCT d.day) AS active_days,
SUM(d.agent_requests) AS total_agent_reqs,
SUM(d.chat_requests) AS total_chat_reqs,
SUM(d.composer_requests) AS total_composer_reqs
FROM cursor_daily_usage_data d
JOIN cursor_members m ON m.email = d.email
WHERE d.day >= CURRENT_DATE - INTERVAL '7 days'
AND d.is_active IS TRUE
GROUP BY m.name, d.email
ORDER BY active_days DESC, total_agent_reqs DESC;
SELECT
a.event_type,
m.name,
a.user_email,
a.ip_address,
a.timestamp
FROM cursor_audit_logs a
LEFT JOIN cursor_members m ON m.email = a.user_email
ORDER BY a.timestamp DESC
LIMIT 50;
kind: source
spec:
name: "cursor"
path: "cloudquery/cursor"
registry: "cloudquery"
version: "v1.0.0"
tables: ["*"]
destinations: ["postgresql"]
spec:
api_key: "${CURSOR_API_KEY}"
kind: source
spec:
name: "cursor"
path: "cloudquery/cursor"
registry: "cloudquery"
version: "v1.0.0"
tables: ["*"]
destinations: ["postgresql"]
spec:
api_key: "${CURSOR_API_KEY}"
table_options:
cursor_daily_usage_data:
start_date: "2025-01-01"
cursor_usage_events:
start_date: "2025-01-01"
cursor_audit_logs:
start_time: "2025-01-01T00:00:00Z"
api_key (string) (required)concurrency (integer) (optional, default: 10000)scheduler (string) (optional, default: dfs)dfs (depth-first search), round-robin, shuffle and shuffle-queue.table_options (object) (optional)cursor_daily_usage_datastart_date (string) (optional) - Start date in YYYY-MM-DD format. Used for the initial sync when no incremental cursor is available.end_date (string) (optional) - End date in YYYY-MM-DD format. Defaults to today.cursor_usage_eventsstart_date (string) (optional) - Start date in YYYY-MM-DD format. Used for the initial sync when no incremental cursor is available.end_date (string) (optional) - End date in YYYY-MM-DD format. Defaults to today.cursor_audit_logsstart_time (string) (optional) - Start time in ISO 8601 format (e.g. 2024-01-15T00:00:00Z). Used for the initial sync when no incremental cursor is available.end_time (string) (optional) - End time in ISO 8601 format (e.g. 2024-12-31T23:59:59Z). Defaults to now.cursor_spendmonth (string) (optional) - Month for spend data in YYYY-MM format. Defaults to the current month.