---
title: "P003 Analytics Query Search and Filter"
method: POST
path: "/search/patent/query/v2"
tags: ["Patent Data Search"]
---

# P003 Analytics Query Search and Filter

`POST /search/patent/query/v2`

## Request

- Base URL: `https://connect.patsnap.com`
- URL: `https://connect.patsnap.com/search/patent/query/v2`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/patsnap/apis/patsnap-open-platform-api/docs/search/patent/query/v2/post.ts> (a function with typed inputs; its response is checked against the schema)

Receive the aggregated statistical results of specified field dimension, according to the search results of query.

## Request body

- P003QueryV2Request
  - `query` string, required: Enter the Analytics Query, with a maximum length of 12,000 characters.
  - `field` string, required: Filter field dimension, please enter the field code, up to 5 fields are supported, separated by comma.<p>AUTHORITY: Authority (https://analytics.patsnap.com/status)</p><p>PATENT_TYPE: Patent Type（A: Applications B: Patents U: Utility models D: Designs AB: Applications+Patents）</p><p>PUBLICATION_YEAR: Publication Year</p><p>APPLICATION_YEAR: Application Year</p><p>ISSUE_YEAR: Issue Year</p><p>PRIORITY_YEAR: Priority Year</p><p>CURRENT_ASSIGNEE: Current Assignee</p><p>ORIGINAL_ASSIGNEE: Original Assignee (Applicant)</p><p>ASSIGNEE: Std. Current Assignee</p><p>STD_ORIGINAL_ASSIGNEE: Std. Original Assignee (Applicant)</p><p>INVENTOR: Inventor</p><p>AGENCY: Agency</p><p>ANCS_TYPE: Std. Current Assignee Type（ACADEMY, COMPANY, GOVERNMENT, PERSON, HOSPITAL, BANK, OTHER）</p><p>IPC: IPC</p><p>IPC_SECTION: IPC-IPC Section</p><p>IPC_CLASS: IPC-IPC Class</p><p>IPC_SUB_CLASS: IPC-IPC Sub Class</p><p>IPC_MAIN_GROUP: IPC-IPC Group</p><p>CPC: Main CPC</p><p>CPC_SECTION: CPC-CPC Section</p><p>CPC_CLASS: CPC-CPC Class</p><p>CPC_SUB_CLASS: CPC-CPC Sub Class</p><p>CPC_MAIN_GROUP: CPC-CPC Group</p><p>SIMPLE_LEGAL_STATUS: Simple Legal Status (0:Inactive 1:Active 2:Pending 220:PCT designated stage expired 221:PCT designated stage 999:Undetermined)</p><p>LEGAL_STATUS: Legal Status (1:Published 2:Examining 3:Granted 8:Double 11:Withdrawn 13:Rejected 14:Revoked 15:Expired 16:Non-payment 21:Restoration 22:Ceased 23:P-Revoked 24:Discontinuation 30:Abandoned 222:Non-Entry PCT-NP (In time limit)） 223:PCT-NP (In time limit) 224:PCT-NP (Past time limit) 225:Non-Entry PCT-NP (Past time limit))</p><p>LEGAL_EVENT: Legal Events (61:Transfer 62:License 63:Pledge 64:Trust 65:Opposition 66:Re-examination 69:Customs 70:Litigation 71:Preservation 72:Invalid-procedure 73:Oral-procedure 74:Declassification 75:Dual filing（Double application）)</p>
  - `lang` string: Select the language, the default language is cn, you can choose cn、en or jp.
  - `collapse_type` string: Select the collapse type, "ALL" or Null value means no collapse; "APNO" means collapse according to application number; "DOCDB" means collapse according to simple family; "INPADOC" means collapse according to inpadoc family; "EXTEND" means collapse according to patsnap family
  - `collapse_by` string: <p>Select the sort field for patent collapse,</p><p>"APD" means order according to application date;</p><p>"PBD" means order according to publication date;</p><p>"AUTHORITY" means order according to authority;</p><p>"SCORE" means order according to the relevance score</p>
  - `collapse_order` string: Select the patent collapse ordering rule that is valid only if collapse_by is APD or PBD, setting OLDEST or LATEST to keep the earliest or latest one
  - `collapse_order_authority` unknown[]: Sets the order of patent collapse according to the input authorities priority list, valid only if collapse_by is AUTHORITY
    - unknown
  - `limit` integer, required: Returns the number of statistical results, 1 <= limit <= 100，default is 50
  - `offset` integer, required: 0 <= offset+limit <= 200
  - `stemming` integer: <p>Whether to turn on the stemming function, 1: turn on; 0: turn off. Off by default</p><p>Note: </p><p>Stemming ON will search for the original word and expand the search to consider singular, plural, and tense variations e.g. a search for "come" will expand to "comes", "came", "coming" and so on.</p><p>Stemming OFF will only search for exact matches of the keywords entered.</p><p>The use of wildcards in keywords within a search query will impact the effect of stemming.</p><p>Stemming ON only supports English words. Stemming does not apply to Assignees, Inventors, or any other person-related fields.</p>

## Response `200`

Successful p003 analytics query search and filter response.

- P003QueryV2Response
  - `data` P003QueryV2MapStringListSearchPatentFieldResponse[]: response data (unresolved $ref)
  - `status` boolean, required: Status
  - `error_msg` string: Error Message
  - `error_code` integer, required: Error Code

## Other responses

- `201`: Created.
- `401`: Unauthorized.
- `403`: Forbidden.
- `404`: Not Found.

---

[API](https://skmtc.dev/patsnap/apis/patsnap-open-platform-api.md) - [All operations](https://skmtc.dev/patsnap/apis/patsnap-open-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/patsnap/apis/patsnap-open-platform-api/revisions/c2264a0de595?raw)
