Discover event names, property keys, JSON types, and example values before writing a query or SQL (GET /catalog). Use catalog when you do not already know the event name, property key, type, or a sample value that query or run_sql needs. properties and properties_received stay name lists and do not include types, presence, or examples.
Catalog is a Pro read and each successful call is one metered read. A free account gets 403 PRO_REQUIRED and that rejection is not metered. An agent session needs analytics:read. Missing analytics:read is 403 FORBIDDEN. A project outside the session is 404 PROJECT_NOT_FOUND and the body does not include that project's name.
Event counts, first_seen, and last_seen are exact in the window. Property types, presence, and examples come from at most 40 newest rows per event. properties_exact is true when count is at most 40 and the sample includes every counted row. type is string, number, boolean, object, array, null, or mixed. JSON integers and reals are number. true and false are boolean. A numeric string stays string. presence is present divided by sample_size, rounded to 4 decimal places. queryable means the key matches ^[A-Za-z0-9_]{1,128}$ and can be used as properties.<key> in query filters. groupable is that charset with length at most 64, for query group_by. examples has up to 3 values, each at most 80 characters. Example values are email-redacted: email-shaped text is replaced with [redacted-email], and a key whose name contains email replaces the whole example. Objects and arrays have no examples. There is no raw-example switch.
days is an integer from 1 to 90 and defaults to 7 on the server when omitted. Or pass date_from and date_to as YYYY-MM-DD, both required together. The inclusive span is at most 90 days, the same window as run_sql. Do not combine days with date_from or date_to. A bad window is 400 INVALID_WINDOW. limit is events per page, an integer from 1 to 18, default 10. property_limit is property keys per event, an integer from 1 to 40, default 25. Events are ordered by name. Property keys are alphabetical. Pass cursor from next_cursor to continue events, or properties_cursor from properties_next_cursor to continue one event's keys. Pass cursor or properties_cursor, not both. Send the same window the cursor was issued for. A bad limit, a bad cursor, a cursor from another window, or both cursors is 400 VALIDATION_ERROR. A project with saved context also includes project_context. It is omitted when the project has no stored context.
Errors: 400 MISSING_FIELDS, 400 INVALID_WINDOW, 400 VALIDATION_ERROR, 403 PRO_REQUIRED, 403 FORBIDDEN, 404 PROJECT_NOT_FOUND, 429 D1_BUDGET_EXHAUSTED, 429 D1_UPSTREAM_RATE_LIMITED (the body includes retry_after_seconds), 500 DATABASE_NOT_PROVISIONED, and 500 QUERY_FAILED.