# aggregatePatents

**Identifier:** `lens_aggregatePatents`

**Provider:** [Lens](https://kirha.com/providers/lens.md)

Run statistical aggregations over the global patent dataset — counts by publication or priority year, top applicants/owners/inventors, jurisdiction and applicant country distribution, CPC/IPC and kind breakdowns, legal status, citation metrics, and year-by-jurisdiction/applicant breakdowns. Use for patent landscape analytics and competitive intelligence. Year breakdowns return the most recent 30 years with data. Use searchScholarlyWorks for the matching scientific literature.

## Run it with the CLI

```bash
kirha tools run lens_aggregatePatents \
  --input '{
    "aggregationType": "top_applicants"
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "lens_aggregatePatents",
  "input": {
    "aggregationType": "top_applicants"
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "aggregationSize": {
      "default": 10,
      "description": "Number of terms buckets; nested breakdowns are capped at 20 per year",
      "maximum": 100,
      "minimum": 1,
      "type": "number"
    },
    "aggregationType": {
      "enum": [
        "top_applicants",
        "top_owners",
        "top_inventors",
        "by_year",
        "by_earliest_priority_year",
        "by_jurisdiction",
        "by_applicant_country",
        "by_cpc",
        "by_ipc",
        "by_kind",
        "by_legal_status",
        "citation_metrics",
        "by_year_and_jurisdiction",
        "by_year_and_applicant"
      ],
      "type": "string"
    },
    "applicant": {
      "description": "Company or brand name, e.g., Pasqal also matches PASQAL SAS. If 0 results, list legal-name variants with aggregatePatents top_applicants",
      "type": "string"
    },
    "classificationCpc": {
      "description": "e.g., A61K31/00, G06N3",
      "type": "string"
    },
    "classificationIpc": {
      "description": "e.g., C12N15/00",
      "type": "string"
    },
    "dateFrom": {
      "description": "YYYY-MM-DD",
      "type": "string"
    },
    "dateTo": {
      "description": "YYYY-MM-DD",
      "type": "string"
    },
    "inventor": {
      "description": "e.g., Jennifer Doudna",
      "type": "string"
    },
    "jurisdiction": {
      "description": "e.g., US, EP, CN, JP, WO",
      "type": "string"
    },
    "legalStatus": {
      "enum": [
        "ACTIVE",
        "PENDING",
        "DISCONTINUED",
        "INACTIVE",
        "EXPIRED",
        "PATENTED",
        "UNKNOWN"
      ],
      "type": "string"
    },
    "organism": {
      "description": "Organism of disclosed biological sequences, e.g., Homo sapiens",
      "type": "string"
    },
    "owner": {
      "description": "Current owner (after assignments), e.g., Tesla",
      "type": "string"
    },
    "publicationType": {
      "enum": [
        "PATENT_APPLICATION",
        "GRANTED_PATENT"
      ],
      "type": "string"
    },
    "query": {
      "description": "Searches title, abstract and claims; all terms required. Supports OR, NOT, \"phrases\". e.g., CRISPR gene editing",
      "type": "string"
    }
  },
  "required": [
    "aggregationType"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "aggregationType": {
      "enum": [
        "top_applicants",
        "top_owners",
        "top_inventors",
        "by_year",
        "by_earliest_priority_year",
        "by_jurisdiction",
        "by_applicant_country",
        "by_cpc",
        "by_ipc",
        "by_kind",
        "by_legal_status",
        "citation_metrics",
        "by_year_and_jurisdiction",
        "by_year_and_applicant"
      ],
      "type": "string"
    },
    "buckets": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "count": {
            "type": "number"
          },
          "key": {
            "type": "string"
          },
          "subBuckets": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "count": {
                  "type": "number"
                },
                "key": {
                  "type": "string"
                }
              },
              "required": [
                "key",
                "count"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "key",
          "count"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "context": {
      "type": "string"
    },
    "metrics": {
      "additionalProperties": false,
      "properties": {
        "avgForwardCitations": {
          "type": "number"
        },
        "citedByPatentsCount": {
          "description": "Patents cited by at least one other patent",
          "type": "number"
        },
        "totalNplCitations": {
          "type": "number"
        },
        "uniqueSimpleFamilies": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "total": {
      "type": "number"
    }
  },
  "required": [
    "context",
    "total",
    "aggregationType"
  ],
  "type": "object"
}
```

## Related tools

Other Lens tools that this tool refers to, or that refer to it.

- [`searchPatents`](https://kirha.com/providers/lens/searchPatents.md)
- [`aggregateScholarlyWorks`](https://kirha.com/providers/lens/aggregateScholarlyWorks.md)
- [`searchScholarlyWorks`](https://kirha.com/providers/lens/searchScholarlyWorks.md)

-----

[All Lens tools](https://kirha.com/providers/lens.md) · [< Back to tools list](https://kirha.com/tools.md)