Skip to main content

Image Search

POST
/api/search/imageSearch

Search images by keywords and return image URLs and source page links. Suitable for image asset retrieval, content illustration, and other scenarios.


Request Parameters

FieldTypeRequiredDefaultDescription
keywordsStringYes-Search keywords
numIntegerNo10Number 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

FieldTypeDescription
urlStringImage URL
refUrlStringSource page URL
titleStringImage title (may be empty)