Web Search
POST
/api/search/webSearchSearch 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
| 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/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
| Field | Type | Description |
|---|---|---|
organic | Array | Search result list |
query | String | Actual search query |
Each object in organic array
| Field | Type | Description |
|---|---|---|
title | String | Web page title |
link | String | Web page link |
snippet | String | Search result snippet |
position | Integer | Result ranking position |
date | String | Page publish date (may be null) |