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

# P001 Analytics Query Search Count

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

## Request

- Base URL: `https://connect.patsnap.com`
- URL: `https://connect.patsnap.com/search/patent/query-search-count/v2`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/patsnap/apis/patsnap-open-platform-api/docs/search/patent/query-search-count/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, to get total search patent count of different queries. Read about the search syntax supported in PatSnap here - https://analytics.patsnap.com/search_helper.

## Request body

- P001QuerySearchCountV2Request
  - `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
  - `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_authority` unknown[]: Sets the order of patent collapse according to the input authorities priority list, valid only if collapse_by is AUTHORITY
    - unknown
  - `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 p001 analytics query search count response.

- P001QuerySearchCountV2Response
  - `data` P001QuerySearchCountV2SearchPatentCountResponse
    - `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)
