Skip to main content

Web Search

POST
/api/search/webSearch

Search the web by keywords and return relevant page titles, snippets, and links. Results are returned in an LLM-friendly structured format, suitable for AI Agent, RAG, 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/webSearch \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"keywords": "Java Spring Boot tutorial",
"num": 2
}'

Response Example

{
"success": true,
"code": "200",
"message": "success",
"exception": null,
"data": {
"organic": [
{
"title": "Spring Boot Tutorial - Baeldung",
"link": "https://www.baeldung.com/spring-boot",
"snippet": "Spring Boot is an opinionated, easy to get-started addition to the Spring platform – highly useful for creating stand-alone, production-grade applications with minimum effort.",
"position": 1,
"date": null
},
{
"title": "Spring Boot Tutorial - GeeksforGeeks",
"link": "https://www.geeksforgeeks.org/spring-boot/",
"snippet": "Spring Boot is a Java framework that makes it easier to create and run Java applications. It simplifies the configuration and setup process, allowing developers to focus more on writing code for their applications.",
"position": 2,
"date": null
}
],
"query": "Java Spring Boot tutorial"
},
"extra": null
}

Response Fields

data Object

FieldTypeDescription
organicArraySearch result list
queryStringActual search query

Each object in organic array

FieldTypeDescription
titleStringWeb page title
linkStringWeb page link
snippetStringSearch result snippet
positionIntegerResult ranking position
dateStringPage publish date (may be null)