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

# P002 Analytics Query Search

`POST /search/patent/query-search-patent/v2`

## Request

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

Search PatSnap's global patent database using standard text queries. Read about the search syntax supported in PatSnap here - https://analytics.patsnap.com/search_helper. This includes patent count, patent number, patent ID, etc

## Request body

- P002QuerySearchPatentV2Request
  - `query_text` string, required: Analytics query, maximum length 3,000 characters
  - `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
  - `sort` unknown[]: <p>Field order, field can support: PBDT_YEARMONTHDAY, APD_YEARMONTHDAY, ISD,SCORE; order can support: desc, asc. The default ranking is the most relevant by Score</p><p>PBDT_YEARMONTHDAY: Publication date</p><p>APD_YEARMONTHDAY: Application date</p><p>ISD: Issue date</p><p>Score: relevancy</p>
    - unknown
  - `offset` integer: offset value; limit + offset <= 20000 (the max number of Semantic Search is 1000)
  - `limit` integer: limit of returned response; must be <= 1,000
  - `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 p002 analytics query search response.

- P002QuerySearchPatentV2Response
  - `data` P002QuerySearchPatentV2SearchPatentV2Response
    - `results` P002QuerySearchPatentV2PatentBaseV2Response[]: result
      - `pn` string: patent number
      - `apdt` integer: Application Date
      - `apno` string: Application Number
      - `pbdt` integer: Publication Date
      - `title` string: Title
      - `inventor` string: Inventor
      - `authority` string: Intellectual Property Office
      - `patent_id` string: patent id
      - `current_assignee` string: Current Assignee
      - `original_assignee` string: Original Assignee (Applicant)
    - `result_count` integer: Received result count
    - `total_search_result_count` integer: Total search result count
  - `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)
