serp Search
Parameter |
Description |
Example |
basePath |
The base path for calling the mass API |
https://searchapi.cloudsway.net/ |
endpointPath |
A randomly generated path for calling the mass API |
|
AccessKey |
The access key for calling the mass API |
RWxxxxxxxx0Gd |
Request Method
GET
Request Path
{basePath}/search/{endpointPath}/serp
Parameter |
Description |
Example |
Authorization |
AccessKey Bearer ${AccessKey} |
Bearer RWxxxxxxxx0Gd |
pragma |
string |
no-cache Do not enable caching |
Request Params
Field Name |
Type |
Required |
Description |
count |
string |
No |
The number of search results included in the returned results |
freshness |
string |
No |
Filter search results by the following case-insensitive time values: Day, Week, Month. To get articles discovered within a specific time range, specify a date range in the format YYYY-MM-DD..YYYY-MM-DD. For example, &freshness=2019-02-01..2019-05-30. |
q |
string |
No |
The user's search query term. This term cannot be empty. The query term can contain Bing advanced operators. |
Return Value
Response
Field Name |
Type |
Description |
queryContext |
object |
The result of image review |
webPages |
string |
The MIME type of the OpenSearch URL template for the Custom Search JSON API. |
QueryContext
Field Name |
Type |
Description |
originalQuery |
string |
The query string specified in the request. |
webPages
Field Name |
Type |
Description |
value |
WebPage[] |
A list of web pages related to the query. |
webPage
Field Name |
Type |
Description |
name |
String |
The name of the web page. Use this name and the URL to create a hyperlink that takes the user to the web page when clicked. |
snippet |
String |
A text snippet describing the content of the web page. |
url |
String |
The URL of the web page. Use this URL and the name to create a hyperlink that takes the user to the web page when clicked. |
## Example |
|
|
Request
curl --location --request GET 'https://searchapi.cloudsway.net/search/{endpointPath}/serp?q=cat' \
--header 'Authorization: Bearer ${AccessKey} ' \
--header 'pragma: no-cache' \
--header 'X-Search-Location;' \
--header 'User-Agent: Apifox/1.0.0 (https://apifox.com)'
Return Value
{
"queryContext": {
"originalQuery": "cat"
},
"webPages": {
"value": [
{
"name": "Cat - Reddit",
"url": "https://www.reddit.com/r/cat/",
"snippet": "As a cat subreddit, we only allow cat related things for example: videos, memes, pictures or advice. Any comment or post which isn't cat related will be removed. This rule doesn't include …"
}
]
}
}