API Documentation
โ† All tools
GET/api/v1/patents/aggregate

Patent Aggregates

patentsPayload key: buckets

Fast pre-computed aggregate patent counts (patent_agg_* tables), grouped by year, CPC code and/or company - group_by accepts a comma-separated subset of 'year','cpc','company'. IMPORTANT: country and legal_status are NOT supported here (HTTP 400) - use patents.search for those. The year range defaults to the current year and the two preceding calendar years; pass publication_date_from/to to widen it. Company filters accept an exact raw assignee string, 'organizations/<key>', 'ror:<id>' or 'lei:<id>'; unresolved company values and unknown CPC prefixes return HTTP 400 naming the value (never silently dropped). meta.total_buckets is the number of buckets returned, not the number of groups. Requires a Pro workspace (returns HTTP 402 otherwise). Use patents.search for listings and patents.yoy-growth for growth deltas.

When to use it

  • patents per year for a company or CPC class
  • CPC / company distribution within a portfolio (one call, multiple group_by values)
  • quick portfolio sizing without fetching listings

Getting started

Base URL

https://app.caelrith.com/api/v1/tools

Authentication

Include your API key in the x-api-key header.

Parameters

Query parameters

ParameterTypeRequiredDescription
group_bystringNoComma-separated subset of 'year', 'cpc', 'company' (e.g. 'year,company'; default 'year'). Each dimension produces one bucket per value with a 'count'.
company_idstringNoOrganization to filter on. Accepts an exact raw assignee string (as it appears in a patent's assignees array), 'organizations/<key>', 'ror:<id>', 'lei:<id>', or a bare ROR/LEI id. Takes precedence over company_name. Unresolved values return HTTP 400 (never silently ignored).
company_namestringNoResolved organization name, used as a fallback when company_id is not provided.
cpc_codestringNoCPC classification code or prefix (e.g. 'A61K').
include_descendantsstringNoWhen true (default), a cpc_code prefix expands to every code starting with it; set false for exact-code matches only.
Allowed values: true, false
publication_date_fromstringNoYYYY-MM-DD; restricts the counted window (defaults to the current year and the two preceding calendar years).
publication_date_tostringNoYYYY-MM-DD; restricts the counted window.
limitintegerNoMaximum number of buckets to return (1-500, default 100).
Range: 1 to 500
sort_by_countstringNoSort buckets by count (default desc).
Allowed values: desc, asc

Example request

curl -H "x-api-key: YOUR_API_KEY" \
  "https://app.caelrith.com/api/v1/patents/aggregate"

Response envelope

Successful responses wrap the payload in a success flag.

{
  "success": true,
  "buckets": { /* payload */ },
  "meta": { /* pagination, totals */ }
}

Response shape

List responsePATENTS

Payload: data โ€” Patent Counts

Exact total: meta.total_buckets

Common row fields

FieldDescription
yearYear
cpcCPC
companyCompany
countCount

Empty results: No matching rows (HTTP 200)

Rows are pre-computed buckets: {year|count}, {cpc|count} or {company|count} depending on group_by - the row's 'count' is the number of patents. meta.total_buckets is the number of buckets RETURNED after limit (max 500) - a page size, not the true number of groups; the EXACT TOTAL line is that returned bucket count, NOT a patent count. Unresolved company values and unknown CPC prefixes are rejected with HTTP 400 naming the value (never silently dropped); meta.filters.company_id_resolved / company_cluster_size echo the resolved anchor (null / 0 when absent). country / legal_status are rejected with HTTP 400 - use patents.search for those.

Catalog version 0.0.0-generated ยท generated from the API source