C/2/search/statuses/historical/create-en
第6行: | 第6行: | ||
rateLimit={{B_rate_limit-en}}| | rateLimit={{B_rate_limit-en}}| | ||
params={{api_args|q|false|string|Search keywords. Up to 1000 keywords with no more than 24 Chinese or English characters separated by half-width comma could be designated. The post with any matched keyword can be elected. This parameter must be URL encoded.}} | params={{api_args|q|false|string|Search keywords. Up to 1000 keywords with no more than 24 Chinese or English characters separated by half-width comma could be designated. The post with any matched keyword can be elected. This parameter must be URL encoded.}} | ||
− | {{api_args|ids|false|string|Search for posts from designated batch users. Up to 50 UIDs separated by | + | {{api_args|ids|false|string|Search for posts from designated batch users. Up to 50 UIDs separated by '~' could be transferred.}} |
− | {{api_args|province|false|int|Province ID to search. Refer to the Code List by Province and City for details. All posts from designated province will be returned if parameter | + | {{api_args|province|false|int|Province ID to search. Refer to the Code List by Province and City for details. All posts from designated province will be returned if parameter 'q' is empty.}} |
− | {{api_args|city|false|int|Province ID to search. Refer to the Code List by Province and City for details. All posts from designated province will be returned if parameter | + | {{api_args|city|false|int|Province ID to search. Refer to the Code List by Province and City for details. All posts from designated province will be returned if parameter 'q' is empty.}} |
{{api_args|starttime|true|int64|Start time for searching. The value of this parameter is timestamp (accurate to second)}} | {{api_args|starttime|true|int64|Start time for searching. The value of this parameter is timestamp (accurate to second)}} | ||
{{api_args|endtime|true|int64|End time for searching. The value of this parameter is timestamp (accurate to second, no later than the last second of the previous day}} | {{api_args|endtime|true|int64|End time for searching. The value of this parameter is timestamp (accurate to second, no later than the last second of the previous day}} | ||
第18行: | 第18行: | ||
{{api_args|haslink|false|int|是否包含链接,0:不包含链接、1:只包含链接,默认为空(全部)。}} | {{api_args|haslink|false|int|是否包含链接,0:不包含链接、1:只包含链接,默认为空(全部)。}} | ||
{{api_args|hasat|false|int|是否包含@,0:不包含@、1:只包含@,默认为空(全部)。}}--> | {{api_args|hasat|false|int|是否包含@,0:不包含@、1:只包含@,默认为空(全部)。}}--> | ||
− | {{api_args|hasv|false|int|Whether is the post from | + | {{api_args|hasv|false|int|Whether is the post from 'V' users? 0 for false; 1 for true, default as null means both.}} |
{{api_args|onlynum|false|int|Only return the total amount ? 0 for true; 1-100 for the designated percentage. For instance, 80 stands for returning 80% of the eligible data(by uniform sampling). Default as 100.}}| | {{api_args|onlynum|false|int|Only return the total amount ? 0 for true; 1-100 for the designated percentage. For instance, 80 stands for returning 80% of the eligible data(by uniform sampling). Default as 100.}}| | ||
result= | result= | ||
第49行: | 第49行: | ||
*This search task could be trace back to 2012, and interval between start time and end time should be no more than one month. | *This search task could be trace back to 2012, and interval between start time and end time should be no more than one month. | ||
*The latest data could be retrieved with no more than 1 day delay. | *The latest data could be retrieved with no more than 1 day delay. | ||
− | *The parameter | + | *The parameter 'province' and 'city' refers to the province and city where the post IP located. |
*For the repost, search is based on the repost content instead of the original content. | *For the repost, search is based on the repost content instead of the original content. | ||
− | *One of the three parameters: | + | *One of the three parameters: 'q', 'province', 'ids' must be assigned. |
− | *This interface does not support fuzzy search. It executes exact match query according to the parameter | + | *This interface does not support fuzzy search. It executes exact match query according to the parameter 'q'. |
− | *The parameter | + | *The parameter 'province' must be designated when parameter 'city' is assigned.| |
− | otherInfo=*If you designate the time parameter later than 2012 and still receive error | + | otherInfo=*If you designate the time parameter later than 2012 and still receive error 'start time cannot be earlier than 2012', please add three 0 at the end of the value to change the format to millisecond instead of second. |
}}{{#a:showgrade}} | }}{{#a:showgrade}} |
2015年7月16日 (四) 11:43的版本
search/statuses/historical/create-en
Create the task of searching for historical data
URL
https://c.api.weibo.com/2/search/statuses/historical/create-en.json
Supported Formats
JSON
HTTP Request Method
POST
Login Requirement
true
See Login and Authorization for details.
Authorized Access Limitation
Request for all the business API:
- 50000 times per hour per IP;
- 50000 times per hour per IP;
Request Parameters
Requires | Type and Range | Description | |
---|---|---|---|
source | false | string | This parameter is not needed when using OAuth, and is required when using other authorization methods. The value of this parameter is AppKey. |
access_token | false | string | This parameter is required when using OAuth, and is not needed when using other authorization methods. You will get the access_token after obtaining OAuth. |
q | false | string | Search keywords. Up to 1000 keywords with no more than 24 Chinese or English characters separated by half-width comma could be designated. The post with any matched keyword can be elected. This parameter must be URL encoded. |
ids | false | string | Search for posts from designated batch users. Up to 50 UIDs separated by '~' could be transferred. |
province | false | int | Province ID to search. Refer to the Code List by Province and City for details. All posts from designated province will be returned if parameter 'q' is empty. |
city | false | int | Province ID to search. Refer to the Code List by Province and City for details. All posts from designated province will be returned if parameter 'q' is empty. |
starttime | true | int64 | Start time for searching. The value of this parameter is timestamp (accurate to second) |
endtime | true | int64 | End time for searching. The value of this parameter is timestamp (accurate to second, no later than the last second of the previous day |
type | false | int | Designate the post type: 0 for the original post; 1 for the repost; default as null/empty means both. |
hasv | false | int | Whether is the post from 'V' users? 0 for false; 1 for true, default as null means both. |
onlynum | false | int | Only return the total amount ? 0 for true; 1-100 for the designated percentage. For instance, 80 stands for returning 80% of the eligible data(by uniform sampling). Default as 100. |
Notes
- Search task cannot be created business data quota less than 1000. Otherwise, task can be created with 1000 quota deducted as the base fee.
- The data returns in reverse chronological order.
- This search task could be trace back to 2012, and interval between start time and end time should be no more than one month.
- The latest data could be retrieved with no more than 1 day delay.
- The parameter 'province' and 'city' refers to the province and city where the post IP located.
- For the repost, search is based on the repost content instead of the original content.
- One of the three parameters: 'q', 'province', 'ids' must be assigned.
- This interface does not support fuzzy search. It executes exact match query according to the parameter 'q'.
- The parameter 'province' must be designated when parameter 'city' is assigned.
Response
JSON Example
//成功返回 { "id": "3567122345", //任务创建者ID "q": "昆明暴力事件,三元食品", "ids": "324344545~12121343~789078912", "province": "11", "city": "5", "starttime": "1389628800", "endtime": "1389690595", "type": 1, "hasv": 1, "onlynum": 80, "task_id": "100", //任务ID "secret_key": "384323434" //任务创建成功后,返回密钥,用于查看任务执行状态、及下载结果数据 } //失败返回 { "request": "/2/search/statuses/historical/create.json", "error_code": "2111XX", "error": "error message." }
Please see Error Code Description for details of error information.
Field Description
none
Others
- If you designate the time parameter later than 2012 and still receive error 'start time cannot be earlier than 2012', please add three 0 at the end of the value to change the format to millisecond instead of second.