JustSERPDocs
Bing

Bing News

One page of Bing News stories for a query or a category, answered as the document: `search_metadata`, `search_parameters`, `search_information` (`query_displayed`, `page`) and `organic_results` (5-12 stories a page).

GET
/v1/bing/news

One page of Bing News stories for a query or a category, answered as the document: search_metadata, search_parameters, search_information (query_displayed, page) and organic_results (5-12 stories a page). A category is used as the query (Bing's category pages are searches). Time windows shorter than Bing's own (an hour, 24 hours, 7 and 30 days) ask for the next longer one and drop stories older than asked by their printed age. sort_by: most_recent orders the page's stories newest first; Bing's own date sort returns 1-2 stories and is not used. No trending list or related topics are answered. A search with no stories is organic_results: []. zero_retention is not handled.

Authorization

headerX-API-Key<token>

Your API key.

Query Parameters

cancel_token?string

A name you make up for this request (a UUID is fine), so you can later GET /v1/cancel with it. Only you know it, so only you can cancel. Use a new one for every request, retries included: a cancelled token stays cancelled for a few minutes.

Length1 <= length <= 128
q?string

What to search for.

Lengthlength <= 1000
category?string

A news category (sports); used as the query when there is no q.

device?"desktop"

Anything but desktop is a 400.

Default"desktop"
Value in"desktop"
market_code?string

language-country from Bing's list (en-us...). Not with country_code.

country_code?string

Two letters from Bing's list.

Default"US"
language?string

Bing's list.

Default"en"
time_period?string

Bing has windows of an hour, 24 hours, 7 and 30 days only: shorter ones ask for the next longer window and older stories are dropped.

Value in"last_minute""last_5_minutes""last_15_minutes""last_30_minutes""last_hour""last_4_hours""last_6_hours""last_24_hours""last_7_days""last_30_days"
sort_by?"most_recent"

The page's stories ordered newest first.

Value in"most_recent"
page?integer

first = (page-1)*num+1.

Range1 <= value
Default1
num?integer

Asked as count and the most the answer holds.

Range1 <= value <= 100

Response Body

The stories, as the document. When the page could not be parsed, the usual envelope.

application/json
  1. response

The Bing News document.

search_metadata*
search_parameters*

The request's own fields as sent, engine first, without cancel_token.

search_information*

The parser's own, e.g. yelp_search's; otherwise {}.

organic_results?array<>
[key: string]?any
Example Request
curl -X GET 'https://api.justserp.com/v1/bing/news?q=openai&time_period=last_24_hours&sort_by=most_recent'
Example Response
{  "search_metadata": {    "id": "string",    "status": "Success",    "created_at": "string",    "request_url": "string",    "html_url": "string"  },  "search_parameters": {},  "search_information": {    "query_displayed": "string",    "page": 0  },  "organic_results": [    {      "position": 0,      "title": "string",      "link": "string",      "source": "string",      "date": "string",      "snippet": "string",      "favicon": "string",      "thumbnail": "string"    }  ]}