Basic Web 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 accessKey for calling the mass api |
RWxxxxxxxx0Gd |
Request Method
GET
Request Path
{basePath}/search/{endpointPath}/base
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 to include 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. |
offset |
Short |
No |
A zero-based offset indicating the number of search results to skip before returning results. The default value is 0. Use this parameter together with the count parameter to paginate results. |
q |
string |
No |
The user's search query term. This term cannot be empty. The query term can contain Bing advanced operators. |
mkt |
string |
No |
The market from which the results originate. Usually, the mkt is the country where the user makes the request. However, if the user is not in a country where Bing provides results, it may be a different country. The market must be in the form of -. For example, en-US. The string is case-insensitive. |
cc |
string |
No |
A 2-character country/region code indicating the country/region from which the results originate. |
safeSearch |
string |
No |
Used to filter adult content in web pages, images, and videos. The following are the possible filter values: Off — Returns content that includes adult text and images but not adult videos. Moderate — Returns web pages that include adult text but not adult images or videos. Strict — Does not return adult text, images, or videos. |
setLang |
string |
No |
The language used for user interface strings. You can use a 2-letter or 4-letter code to specify the language. It is recommended to use the 4-letter code. To specify a 2-letter code, set this parameter to an ISO 639-1 language code. To specify a 4-letter code, use the form of -. For example, use en-US for American English. |
textDecorations |
Boolean |
No |
A boolean value used to determine whether the display strings in the results should contain decoration tags (such as highlighted characters for hits). If true, the strings may contain tags. The default value is false. |
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. |
thumbnailUrl |
String |
The URL of the image thumbnail |
datePublished |
String |
The time when the web page was published. 2020-03-02T16:51:00.0000000Z |
dateLastCrawled |
String |
The time when the web page was last crawled. 2024-09-08T23:18:00.0000000Z |
siteName |
String |
The source of the web page |
Example
Request
curl --location --request GET 'https://searchapi.cloudsway.net/search/{endpointPath}/base?q=trump&safeSearch=Off' \
--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": "trump"
},
"webPages": {
"value": [
{
"name": "Donald Trump - Wikipedia",
"url": "https://en.wikipedia.org/wiki/Donald_Trump",
"datePublished": "2008-10-09T07:36:33.0000000",
"displayUrl": "https://en.wikipedia.org/wiki/Donald_Trump",
"snippet": "Donald John Trump was born on June 14, 1946, at Jamaica Hospital in the New York City borough of Queens, the fourth child of Fred Trump and Mary Anne MacLeod Trump .[1] He is of German and Scottish descent.[2] He grew up with his older siblings, Maryanne, Fred Jr., and Elizabeth, and his younger brother, Robert, in a mansion in the Jamaica."
}
]
}
}