Image Search
POST
/api/search/imageSearchSearch images by keywords and return image URLs and source page links. Suitable for image asset retrieval, content illustration, and other scenarios.
Request Parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
keywords | String | Yes | - | Search keywords |
num | Integer | No | 10 | Number of results to return |
Request Example
curl -X POST https://platform.iflow.cn/api/search/imageSearch \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"keywords": "kitten",
"num": 2
}'
Response Example
{
"success": true,
"code": "200",
"message": "success",
"exception": null,
"data": [
{
"url": "https://cdn.pixabay.com/photo/2024/02/28/07/42/european-shorthair-8601492_640.jpg",
"title": "kitten",
"refUrl": "https://pixabay.com/photos/european-shorthair-kitten-cat-8601492/"
},
{
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4d/Cat_November_2010-1a.jpg/1200px-Cat_November_2010-1a.jpg",
"title": "kitten",
"refUrl": "https://en.wikipedia.org/wiki/Kitten"
}
],
"extra": null
}
Response Fields
| Field | Type | Description |
|---|---|---|
url | String | Image URL |
refUrl | String | Source page URL |
title | String | Image title (may be empty) |