---
title: "P055 Create export task by query"
method: POST
path: "/patent-search/export/V2"
tags: ["Monitor and Export API"]
---

# P055 Create export task by query

`POST /patent-search/export/V2`

## Request

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

Allows to search our global patent repository using the standard PatSnap search query and retrieve the resulting data in bulk. Query syntax can be as simple as a list of keywords or as complex as a 12,000 character boolean query. To find more information about PatSnap search syntax, refer to https://analytics.patsnap.com/search_helper. Allows to select what patent fields should be returned in response to the query and, thus, allows control over the size of the response payload to help optimize performance, fields that are allowed to be exported, the fields and field levels that are allowed to be exported (different levels of fields have different calling fees). please link the <a href="/tutorials/exportFields" target="_blank">export instructions</a>.

## Request body

- P055ExportV2Request
  - `collapse_by` string: <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: When collapse_type="APNO", and collapse_by="APD" or "PBD", the collapse_order can be set as "OLDEST" or "LATEST", means keep the patent date of oldest or latest one
  - `collapse_order_authority` unknown[]: <p>Setting the patent collapse ordering rule that is valid only if collapse_by is AUTHORITY</p><p>Sets the order of patent collapse according to the input authorities priority list, valid only if collapse_by is AUTHORITY</p>
    - unknown
  - `collapse_type` string: <p>"ALL" or Null value means no collapse;</p><p>"APNO" means collapse according to application number;</p><p>"DOCDB" means collapse according to simple family;</p><p>"INPADOC" means collapse according to inpadoc family;</p><p>"EXTEND" means collapse according to patsnap family</p>
  - `query_text` string, required: Patent search query, detailed syntax reference can be found at https://analytics.patsnap.com/search_helper
  - `fields` string, required: Fields that are allowed to be exported. See <a href="/devportal/data-reference/export-fields" target="_blank">export instructions</a> for details. Separate multiple export fields in English,.
  - `export_type` string, required: File formats that are allowed to be exported. You can choose json, csv, xls, pdf, full_text, xml. Only 1 can be selected.<p>For full_text export type, only the following four fields PN, ABST, CLMS, DESC are supported. The field DESC is only supported by the full_text export type. The field CLMS is only supported by the full_text/pdf export type. Result of the full_text export type is a ZIP file including some xml files named by PN.</p>
  - `rows` integer, required: rows >= 1 , Single maximum export (csv/xls/json/xml: 100k , pdf/full_text: 1k)
  - `apdt_from` string: Application date start. Format: 'yyyyMMdd', or * means time is unlimited
  - `apdt_to` string: Application date end. Format: 'yyyyMMdd', or * means time is unlimited
  - `pbdt_from` string: Publication date start. Format: 'yyyyMMdd', or * means time is unlimited
  - `pbdt_to` string: Publication date end. Format: 'yyyyMMdd', or * means time is unlimited
  - `lang` string: Select the language , the default language is en, you can choose cn, en, jp, de, fr, kr.
  - `trans_lang` string: Select the translation language , the default language is en, you can choose cn, en, jp.
  - `offset` integer: 0 <= rows + offset <= 100000, default is 0 If you want to get patents that are ranked lower than 100, you can set offset=100
  - `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 p055 create export task by query response.

- P055ExportV2Response
  - `data` P055ExportV2ExportTaskResponse
    - `count` integer: Export number of patents
    - `task_id` string: Task ID is valid for 24 hours
  - `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)
