[P075]Search the patent nested version with a search formula
https://connect.patsnap.com/search/patent/nested-search-patentSearch 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, and patent ID.
The limit for one-dimensional analysis of field type does not exceed 500
The limit for two-dimensional analysis of field type does not exceed 100
It supports up to two-dimensional analysis
aggregate does not support nesting
The number of Facets at the same level shall not exceed 5
Request Parameters
List of parameters supported by this API endpoint
| Name | Type | Example | Description |
|---|---|---|---|
facet | array | Please check the form: Facet | Nested statistical configuration Supports four types: field - Field statistics range - Range statistics query - Query statistics aggregate - Aggregate statistics 1. field (Field statistics)
2. range (Range statistics)
3. query (Query statistics)
4. aggregate (Aggregate statistics)
|
limit | integer<int32> | 10 | Return the number of documents. |
offset | integer<int32> | - | offset |
query_text Required | string | TTL:car | Search expression text. Refer to : https://analytics.patsnap.com/search_helper |
sort | array | [
{
"field": "SCORE",
"order": "DESC"
}
] | sort |
stemming | boolean | - | Whether to enable word segmentation, after enabling it, support the same stem query (for example: "cars" can be searched by "car"). By default, it is not enabled. Currently, only fields related to TTL/ABST/CLMS/DESC are supported |
end | integer<int32> | 2018 | Range end value (not included) (when type is range) |
expr | string | avg(PV) | aggregate expressions support nesting. aggregate function currently supports five types: avg/min/max/sum/unique (when type is query) |
facet | array | [
{
"end": 2018,
"gap": 1,
"tag": "apd_year",
"type": "range",
"field": "APD_YEAR",
"start": 2000
}
] | Nested statistical configuration |
field | string | ANCS | The name of the field to be counted (when type is field and range). Refer to : https://analytics.patsnap.com/search_helper |
gap | integer<int32> | 1 | Range step value, default is 1 (when type is range) |
limit | integer<int32> | 10 | How many statistical results need to be returned (when type is field) |
mincount | integer<int32> | 1 | The minimum value that can be returned for statistics is set to 1 by default (when type is field) |
num_buckets | boolean | - | Count number of buckets for the facet, which defaults to false. The returned format is tag_num_buckets (when type is field) |
offset | integer<int32> | 10 | The offset of the statistics, used for pagination, is set to 0 by default (when type is field) |
query | string | PV:[0 TO 100000] | Queries that need to be statistically analyzed (when type is query) |
start | integer<int32> | 2000 | Range starting value (when type is range) |
tag Required | string | ancs | The current statistics of custom aliases (alias names cannot be name or count) |
type Required | string | field | Retrieval statistical type: field - Statistics of field values, equivalent to the traditional facet field range - range statistics for numerical fields will be automatically completed, equivalent to the traditional range facet query - Statistics on query, equivalent to the traditional facet query aggregate - Perform statistics such as min/max/sum on fields |
field | string | SCORE | sort field |
order | string | DESC | sort order |
Response Schema
Structure of the API response data
| Field Name | Type | Example | Description |
|---|---|---|---|
data | object | - | response data |
facets | object | {
"PUM_PROP_ID_CN": [
{
"name": "af1d2b97-6078-514c-a2f1-9d930de64767",
"count": 158
},
{
"name": "6979882c-f05c-516e-9bab-723396999f87",
"count": 80
}
],
"PUM_PROP_ID_CN_num_buckets": 131
} | statistical result(Dynamic key, defined based on the tag in the input parameter) |
num_found | integer<int32> | 1000 | Total search result count |
id_mapping | object | AnsEntity | When ANS is triggered, ANS information will be returned. |
status Required | boolean | false | Status |
error_msg | string | The request parameter format is incorrect! | Error Message |
error_code Required | integer | 0 | Error Code |
Success Response Example
Example of a successful API response
{
"data": {
"facets": {
"PUM_PROP_ID_CN": [
{
"name": "af1d2b97-6078-514c-a2f1-9d930de64767",
"count": 158
},
{
"name": "6979882c-f05c-516e-9bab-723396999f87",
"count": 80
}
],
"PUM_PROP_ID_CN_num_buckets": 131
},
"num_found": 1000,
"id_mapping": "AnsEntity"
},
"status": true,
"error_code": 0
}Error Codes
List of possible error codes returned by this endpoint
Business Errors
| Error Code | Description |
|---|---|
68300004 | Invalid parameter! |
68300005 | Search api failure! |
68300006 | Analytic basic access error! |
68300007 | Bad request! |
68300008 | Service error, please try again later! |
68300010 | The file does not comply with upload specifications! |
Platform Errors
| Error Code | Description |
|---|---|
67200000 | API call exceeds the total limit set by the platform! |
67200001 | API call exceeds the total limit set by the platform! |
67200002 | The current call rate is too fast, exceeding the current configuration limit QPS! |
67200003 | The key and secret parameters for applying for the token are incorrect or the client has been disabled! |
67200004 | The requested api does not have permission. Please contact our support personnel! |
67200005 | Insufficient account balance/number of calls! |
67200006 | The client has exceeded the activation validity period! |
67200007 | The current call exceeds the configured usage limit of the day! |
67200008 | Please check if the required apikey in the query parameter has been transmitted! |
67200009 | The apikey does not match the passed bearerToken. Please check if a valid token is being used! |
67200012 | The request is illegal! |
67200100 | The current server status is busy, request response timeout! |
67200101 | The API requested currently does not exist. Please check the request path! |
HTTP Status Codes
| Status Code | Description |
|---|---|
0 | Success |
201 | Created |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
Performance Metrics
Expected performance characteristics for this endpoint
Normal Response Time
5000 ms
Max Response Time
10000 ms