Web Search
The web search API is used to obtain candidate pages, summaries and related information by keyword. It is suitable for real-time information retrieval, information collection, content analysis and search enhancement applications.
Method and Path
http
POST /v1/web-search/searchExample request
bash
curl https://moonnexai.com/v1/web-search/search \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"query": "MoonNexAI API documentation",
"area": "global",
"count": 10,
"format": "json"
}'Common field
| field | Type | Annotations |
|---|---|---|
query | string | Search for keywords. |
area | string | Optional. global or cn. |
freshness | string | Optional. Day, Week, Month, Year. |
includeImages | boolean | Optional. Do you have a picture result? |
page | integer | Optional. Page number. |
count | integer | Optional. Number of pages per page. |
format | string | Optional. json, markdown, md, text, txt. |
Use recommendations
- Search API is suitable for candidate pages and abstracts.
- If text content is required, the target URL is passed to Page Reading.
- The result of the same keyword can be cached and the repetition of request reduced.