# 1688 API-Image URL conversion

## API Overview

- Convert image URL into a recognizable format for image search API
- See More

## API URL

`POST https://api.tmapi.io/1688/tools/image/convert_url`

## Request Parameters

### Body

> Content-Type: application/json

| Field | Type | Explanation | Required |
| --- | --- | --- | --- |
| url | string | Image URL to be converted | true |
| search_api_endpoint | string | API endpoint for image search. Default: /search/image. Supported endpoints: [/search/image](/docs/ali/search/search-items-by-image-url.md), [/global/search/image](/docs/ali/multi-language-apis/search-items-by-image-url.md), [/global/search/image/v2](/docs/ali/multi-language-apis/search-items-by-image-url-v2.md)<br/>Default value: /search/image | false |

> The converted result is typically in image path format and can be directly used as a parameter for image search API

## Security Auth

> Please go to [Console-Account Center](https://console.tmapi.io/account/center) to get your apiToken.

> Add your apiToken to the request parameters. Please refer to the examples below.

## Request Example

```bash

curl --request POST 'https://api.tmapi.io/1688/tools/image/convert_url?apiToken=xxxxxx' \
+  --header 'Content-Type: application/json' \
+  --data-raw '{
  "url": "",
  "search_api_endpoint": "/search/image"
}'

```

## Response Example

```json

{
  "code": 200,
  "msg": "success",
  "data": {
    "image_url": "/search/imgextra/1692942898123_q7ftzxs9.jpg"
  }
}

```