You can call Image Search API operations by sending URL-based HTTP or HTTPS requests. Each URL must include request parameters. This topic describes the syntax of HTTP or HTTPS requests and provides the endpoints of Image Search.
Endpoints
Region | Region | Public endpoint | VPC endpoint |
---|---|---|---|
China (Shanghai) | cn-shanghai | imagesearch.cn-shanghai.aliyuncs.com | imagesearch-vpc.cn-shanghai.aliyuncs.com |
Singapore (Singapore) | ap-southeast-1 | imagesearch.ap-southeast-1.aliyuncs.com | imagesearch-vpc.ap-southeast-1.aliyuncs.com |
China (Hong Kong) | cn-hongkong | imagesearch.cn-hongkong.aliyuncs.com | imagesearch-vpc.cn-hongkong.aliyuncs.com |
Japan (Tokyo) | ap-northeast-1 | imagesearch.ap-northeast-1.aliyuncs.com | imagesearch-vpc.ap-northeast-1.aliyuncs.com |
Germany (Frankfurt) | eu-central-1 | imagesearch.eu-central-1.aliyuncs.com | imagesearch-vpc.eu-central-1.aliyuncs.com |
Note
- You can select only the
China (Shanghai)
region on the China site (aliyun.com). - You can use a virtual private cloud (VPC) endpoint to call the Image Search API from ECS instances in the same VPC.
- If you use a VPC endpoint to call the Image Search API, you do not have to consume public bandwidth. For more information, see Use VPC endpoints to call the Image Search API.
Communication protocols
You can send requests over HTTP or HTTPS. We recommend that you send requests over HTTPS for enhanced security.
Methods
You can send HTTP POST requests.
Request parameters
Make sure that all the requests contain common request parameters and operation-specific request parameters.
Character encoding
All requests and responses are encoded in UTF-8
.
Use VPC endpoints to call the Image Search API
SDK V3:
# Use a VPC endpoint
authConfig.endpoint = "imagesearch-vpc.cn-shanghai.aliyuncs.com";
# Add a configuration item
authConfig.endpointType = "internal";
SDK earlier than V3:
IClientProfile profile = DefaultProfile.getProfile("cn-shanghai", <accessKey>, <accessSecret>);
# Use a VPC endpoint
DefaultProfile.addEndpoint("cn-shanghai", "ImageSearch", "imagesearch-vpc.cn-shanghai.aliyuncs.com");
this.client = new DefaultAcsClient(profile);