[P010]Image Search Get Image Url
Obtain the url accessible to the public network by uploading an image.
Support JPG and PNG, File size limit is 4MB .The path is valid for 9 hour and will be emptied after expiration.
Response Schema
Structure of the API response data
| Field Name | Type | Example | Description |
|---|---|---|---|
data | object | - | response data |
url | string | https://img1.baidu.com/it/u=3787347995,722716643&fm=26&fmt=auto | url |
expire | integer<int32> | 32400 | period of validity,Unit:second |
statusRequired | boolean | false | Status |
error_msg | string | The request parameter format is incorrect! | Error Message |
error_codeRequired | integer | 0 | Error Code |
Success Response Example
Example of a successful API response
JSON
{
"data": {
"url": "https://img1.baidu.com/it/u=3787347995,722716643&fm=26&fmt=auto",
"expire": 32400
},
"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 |
|---|---|
67200001 | API call exceeds the total limit set by the platform! |
67200002 | Quota exceeds the limit! |
67200003 | Access token expired or authentication error! |
67200004 | No permission or API package quota has exceeded the limit! |
67200005 | Insufficient balance, call failed! |
67200006 | This client has expired and call failed! |
67200007 | Exceeded the call limit, call failed! |
HTTP Status Codes
| Status Code | Description |
|---|---|
0 | Success |