News Search
curl --request GET \
--url https://scrapebadger.com/v1/yahoo/news \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://scrapebadger.com/v1/yahoo/news"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://scrapebadger.com/v1/yahoo/news', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scrapebadger.com/v1/yahoo/news",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://scrapebadger.com/v1/yahoo/news"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://scrapebadger.com/v1/yahoo/news")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/yahoo/news")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"query": "<string>",
"market": "<string>",
"total_results": 123,
"total_results_text": "<string>",
"result_count": 123,
"results": [
{
"position": 123,
"title": "<string>",
"url": "<string>",
"source": "<string>",
"via": "<string>",
"snippet": "<string>",
"published": "<string>",
"thumbnail_url": "<string>"
}
]
}Search
News Search
Search Yahoo News — headline, publisher, syndication source, snippet and thumbnail per article.
GET
/
v1
/
yahoo
/
news
News Search
curl --request GET \
--url https://scrapebadger.com/v1/yahoo/news \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://scrapebadger.com/v1/yahoo/news"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://scrapebadger.com/v1/yahoo/news', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scrapebadger.com/v1/yahoo/news",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://scrapebadger.com/v1/yahoo/news"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://scrapebadger.com/v1/yahoo/news")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/yahoo/news")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"query": "<string>",
"market": "<string>",
"total_results": 123,
"total_results_text": "<string>",
"result_count": 123,
"results": [
{
"position": 123,
"title": "<string>",
"url": "<string>",
"source": "<string>",
"via": "<string>",
"snippet": "<string>",
"published": "<string>",
"thumbnail_url": "<string>"
}
]
}Search Yahoo News. Every article carries the resolved destination URL, the
publisher, the syndication source it ran through (
via), a snippet and a
thumbnail — plus Yahoo’s reported total match count for the query.
Credits: 5
Authorization
string
required
Your ScrapeBadger API key.
Query Parameters
string
required
Search keywords, e.g.
interest rates.Response
string
Echo of the requested query.
string
The market the results were fetched for.
integer
Yahoo’s reported total match count (approximate), e.g.
1420000.string
The count as displayed, e.g.
About 1,420,000 results.integer
Articles returned.
NewsArticle[]
Example
curl "https://scrapebadger.com/v1/yahoo/news?query=interest+rates" \
-H "X-API-Key: YOUR_API_KEY"
const res = await fetch(
"https://scrapebadger.com/v1/yahoo/news?" +
new URLSearchParams({ query: "interest rates" }),
{ headers: { "X-API-Key": process.env.SCRAPEBADGER_API_KEY } },
);
const data = await res.json();
import requests
res = requests.get(
"https://scrapebadger.com/v1/yahoo/news",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"query": "interest rates"},
)
data = res.json()
Response
{
"query": "interest rates",
"market": "us",
"total_results": 1420000,
"total_results_text": "About 1,420,000 results",
"result_count": 10,
"results": [
{
"position": 1,
"title": "Fed Holds Rates Steady as Inflation Cools",
"url": "https://www.reuters.com/markets/us/fed-holds-rates-steady",
"source": "Reuters",
"via": "via Yahoo Finance",
"snippet": "The Federal Reserve kept its benchmark interest rate unchanged...",
"published": "26 minutes ago",
"thumbnail_url": "https://s.yimg.com/uu/api/res/1.2/abc123--/news-thumb.jpg"
}
]
}
Timestamps
Yahoo News renders relative ages only —
26 minutes ago, 3 hours ago,
2 days ago — and shows no absolute date anywhere on the page. published
is that display string verbatim; there is no published_at or
published_utc field, unlike the
Bing news endpoint, which reads an RSS
feed. Derive absolute times from your own request time if you need them.⌘I

