> For the complete documentation index, see [llms.txt](https://docs.serphouse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.serphouse.com/yahoo-apis/yahoo-news-api.md).

# Yahoo News API

Retrieve real-time news results from the Yahoo News search page, providing access to the latest headlines, breaking news, and stories from trusted publishers.

{% hint style="danger" %}
Requires authentication
{% endhint %}

<mark style="color:green;">`POST`</mark> `https://api.serphouse.com/yahoo-news`

#### Path Parameters

| Name         | Type   | Description                          |
| ------------ | ------ | ------------------------------------ |
| responseType | String | responseType can be 'html' or 'json' |

#### Headers

| Name                                            | Type   | Description              |
| ----------------------------------------------- | ------ | ------------------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer \<YOUR\_API\_KEY> |
| Content-Type<mark style="color:red;">\*</mark>  | String | application/json         |

#### Request Body

<table><thead><tr><th>Name</th><th>Type</th><th width="222">Description</th></tr></thead><tbody><tr><td>q<mark style="color:red;">*</mark></td><td>string</td><td>Search phrase that you want to search</td></tr><tr><td>domain<mark style="color:red;">*</mark></td><td>string</td><td>Choose yahoo domain.<br><br>You can retrieve the list of supported yahoo domains by making a separate request to the  <a href="https://docs.serphouse.com/extra-apis/domains-list">List of Search Engines</a></td></tr><tr><td>lang<mark style="color:red;">*</mark></td><td>string</td><td>You can set language for e.g. <code>lang_en</code> for english <code>lang_fr</code> for french.<br>Get the list of available languages by making a separate request to the <a href="/pages/T3o6bzC5LzinD9qIGamk">List of Language</a></td></tr><tr><td>device<mark style="color:red;">*</mark></td><td>string</td><td>Device can be <code>desktop</code> To extract desktop result <code>mobile</code> To extract mobile result</td></tr><tr><td>page</td><td>integer</td><td>Give specific page to get the result of that page number. By default it will get you first page.</td></tr><tr><td>no_trace</td><td>string | integer</td><td>Enterprise only. Enables NoTrace mode. Accepted values: <code>0</code>, <code>1</code>, <code>true</code>, and <code>false</code>. When enabled (<code>1</code> or <code>true</code>), search parameters, files, and metadata are not stored on our servers.</td></tr></tbody></table>

{% tabs %}
{% tab title="200: OK" %}

```json
{
    "status": "error",
    "msg": "Please try again",
    "error": ""
}
```

{% endtab %}

{% tab title="200: OK" %}

```json
{
    "status": "success",
    "msg": "Completed",
    "results": {
        "search_metadata": {
            "id": 245759563,
            "status": "success",
            "created_at": "2026-06-17T10:44:19.000000Z",
            "processed_at": "2026-06-17 10:44:19"
        },
        "search_parameters": {
            "domain": "in.yahoo.com",
            "lang": "lang_en",
            "country": "",
            "location": "",
            "q": "football world cup 2026",
            "device": "desktop",
            "url": "https://in.news.search.yahoo.com/search?q=football+world+cup+2026&vl=lang_en&gl=&pz=100&fl=1",
            "page": "1",
            "num": 10,
            "ie": "UTF-8",
            "tbm": "nws"
        },
        "results": {
            "search_information": [
                {
                    "total_results": "3,795"
                }
            ],
            "news": [
                {
                    "position": 1,
                    "img": "https://s.yimg.com/fz/api/res/1.2/b.ERIE2F5nFPirQmpUL9Jg--~C/YXBwaWQ9c3JjaGRkO2ZpPWZpbGw7aD05MjtweG9mZj0wO3B5b2ZmPTA7cT04MDt3PTE2NA--/https://s.yimg.com/am/60d/b527c27be30b998801d67e28c70bd4d4",
                    "url": "https://www.news18.com/sports/football/fifa-world-cup-2026-england-vs-croatia-live-streaming-when-and-where-to-watch-in-india-10155682.html",
                    "title": "FIFA World Cup 2026, England Vs Croatia Live Streaming: When And Where To Watch In India",
                    "channel": "News18",
                    "block_position": "left",
                    "snippet": "England vs Croatia FIFA World Cup 2026 Live Streaming: All you need to know about the captivating...",
                    "time": "· 1 hour ago"
                },
                {
                    "position": 2,
                    "img": "https://s.yimg.com/fz/api/res/1.2/2chbOR0kf9C6z.520QFNhQ--~C/YXBwaWQ9c3JjaGRkO2ZpPWZpbGw7aD05MjtweG9mZj0wO3B5b2ZmPTA7cT04MDt3PTE2NA--/https://s.yimg.com/am/60d/bad52e93cf900b894681537edda47f41",
                    "url": "https://www.oneindia.com/sports/football/fifa-world-cup-2026-argentina-vs-algeria-live-lionel-messi-arg-vs-alg-8120689.html",
                    "title": "Argentina vs Algeria FIFA World Cup 2026 Highlights: Lionel Messi Hits A Hat Trick Of Goals; ARG 3-0...",
                    "channel": "One India",
                    "block_position": "left",
                    "snippet": "FIFA World Cup 2026 Argentina vs Algeria LIVE: Leading Argentina from the front, Lionel Messi scored...",
                    "time": "· 10 hours ago"
                },
                {
                    "position": 3,
                    "img": "https://s.yimg.com/fz/api/res/1.2/TCuSAwuCB72jyI2vp4kv8g--~C/YXBwaWQ9c3JjaGRkO2ZpPWZpbGw7aD05MjtweG9mZj0wO3B5b2ZmPTA7cT04MDt3PTE2NA--/https://s.yimg.com/am/60d/27be3deb76b2ebd0d5c99a218abe40fa",
                    "url": "https://www.india.com/sports/fifa-world-cup-2026-portugal-vs-dr-congo-live-streaming-info-when-where-how-to-watch-live-football-match-score-tv-telecast-mobile-app-online-cristiano-ronaldo-8449006/",
                    "title": "FIFA World Cup 2026, ⁠Portugal vs DR Congo: Cristiano Ronaldo set to equal Lionel Messi's record, ey...",
                    "channel": "Latest India News",
                    "block_position": "left",
                    "snippet": "Cristiano Ronaldo can become the first-ever footballer to score in six different editions of the...",
                    "time": "· 2 hours ago"
                },
                {
                    "position": 4,
                    "img": "https://s.yimg.com/fz/api/res/1.2/Fez6X.4VbXkAnnA3CvCqDA--~C/YXBwaWQ9c3JjaGRkO2ZpPWZpbGw7aD05MjtweG9mZj0wO3B5b2ZmPTA7cT04MDtzbT0xO3c9MTY0/https://media.zenfs.com/en/sb_nation_articles_115/2b37d815a133ad5c50bf13fcae17d56e",
                    "url": "https://www.bavarianfootballworks.com/fifa-world-cup/217561/gola-zone-relive-the-16-goals-scored-at-the-2026-fifa-world-cup-mbappe-olise-messi-jordan-iraq-haaland",
                    "title": "Gola-zone: Relive the 16 goals scored on Matchday 6 at the 2026 FIFA World Cup!",
                    "channel": "SB Nation",
                    "block_position": "left",
                    "snippet": "The first five days were packed with non-stop football action, and I don’t know where to start. Whet...",
                    "time": "· 14 minutes ago"
                },
                {
                    "position": 5,
                    "img": "https://s.yimg.com/fz/api/res/1.2/71R0yjIuFxkINzCom7PvFw--~C/YXBwaWQ9c3JjaGRkO2ZpPWZpbGw7aD05MjtweG9mZj0wO3B5b2ZmPTA7cT04MDt3PTE2NA--/https://s.yimg.com/am/60d/be474cc5b31e448be327b19d9fa86bc3",
                    "url": "https://economictimes.indiatimes.com/us/sports/news/who-is-luca-zidane-french-great-zinedine-zidanes-son-steps-into-the-spotlight-with-algeria-at-world-cup/articleshow/131785633.cms",
                    "title": "Who is Luca Zidane? French great Zinedine Zidane's son steps into the spotlight with Algeria at ...",
                    "channel": "The Economic Times",
                    "block_position": "left",
                    "snippet": "French football legend Zinedine Zidane's son Luca Zidane has stepped into the spotlight after...",
                    "time": "· 7 hours ago"
                },
                {
                    "position": 6,
                    "img": "https://s.yimg.com/fz/api/res/1.2/gfDdVuReJtCiITf4rYuOlw--~C/YXBwaWQ9c3JjaGRkO2ZpPWZpbGw7aD05MjtweG9mZj0wO3B5b2ZmPTA7cT04MDtzbT0xO3c9MTY0/https://media.zenfs.com/en/the_comeback_288/23cd3885d270fe0cbb8a6359b4544b75",
                    "url": "https://thecomeback.com/soccer/world-cup-donald-trump-trophy-decision-sparks-outrage.html",
                    "title": "‘This is pathetic’: World Cup’s ‘ridiculous’ Donald Trump decision sparks outrage",
                    "channel": "The Comeback",
                    "block_position": "left",
                    "snippet": "Last summer, United States President Donald Trump was at the center of a rather awkward moment when...",
                    "time": "· 34 minutes ago"
                },
                {
                    "position": 7,
                    "img": "https://s.yimg.com/fz/api/res/1.2/DUAulnKvc572XdstkmqD0g--~C/YXBwaWQ9c3JjaGRkO2ZpPWZpbGw7aD05MjtweG9mZj0wO3B5b2ZmPTA7cT04MDt3PTE2NA--/https://s.yimg.com/am/60d/7c6bffaec51f82c02db5002aa837b075",
                    "url": "https://www.bbc.com/sport/football/articles/cevld1m8nxno",
                    "title": "World Cup 2026: Adrien Rabiot raises concerns about New York New Jersey Stadium pitch",
                    "channel": "BBC News",
                    "block_position": "left",
                    "snippet": "France midfielder Adrien Rabiot has raised concerns about the quality of the pitch at the New York...",
                    "time": "· 38 minutes ago"
                },
                {
                    "position": 8,
                    "img": "https://s.yimg.com/fz/api/res/1.2/2dh9S66vmHEneENSci6L1w--~C/YXBwaWQ9c3JjaGRkO2ZpPWZpbGw7aD05MjtweG9mZj0wO3B5b2ZmPTA7cT04MDt3PTE2NA--/https://s.yimg.com/am/60d/e120db34d760c27c1f5436cd46e5d868",
                    "url": "https://www.news18.com/sports/football/fifa-world-cup-2026-portugal-vs-dr-congo-live-streaming-kick-off-time-and-all-you-need-to-know-ws-l-10155079.html",
                    "title": "FIFA World Cup 2026, Portugal vs DR Congo: Live Streaming, Kick-Off Time And All You Need To Know",
                    "channel": "News18",
                    "block_position": "left",
                    "snippet": "Cristiano Ronaldo and Portugal kick off their FIFA World Cup 2026 campaign against DR Congo, aiming...",
                    "time": "· 3 hours ago"
                },
                {
                    "position": 9,
                    "img": "https://s.yimg.com/fz/api/res/1.2/VU6KV9gzU0xoLmyfERvdYw--~C/YXBwaWQ9c3JjaGRkO2ZpPWZpbGw7aD05MjtweG9mZj0wO3B5b2ZmPTA7cT04MDt3PTE2NA--/https://s.yimg.com/am/60d/086742ff5d30cbe7b416833f2c822aeb",
                    "url": "https://news.abplive.com/sports/football/fifa-world-cup-2026-june-18-schedule-full-fixtures-match-timings-ist-and-live-streaming-details-1850817",
                    "title": "FIFA World Cup 2026 June 18 Schedule: Full Fixtures, Match Timings (IST), Live Stream Details",
                    "channel": "ABP News",
                    "block_position": "left",
                    "snippet": "FIFA World Cup 2026 June 18 Schedule: Get the complete FIFA World Cup 2026 match ...",
                    "time": "· 2 hours ago"
                },
                {
                    "position": 10,
                    "img": "https://s.yimg.com/fz/api/res/1.2/rkGvgFptC00ACk9n.zem5Q--~C/YXBwaWQ9c3JjaGRkO2ZpPWZpbGw7aD05MjtweG9mZj0wO3B5b2ZmPTA7cT04MDt3PTE2NA--/https://s.yimg.com/am/60d/d56686bf35d70a06ff9e392cc6a49773",
                    "url": "https://www.cnbctv18.com/sports/54-million-tune-in-as-fifa-world-cup-2026-smashes-opening-match-viewership-records-19927253.htm",
                    "title": "54 million tune in as FIFA World Cup 2026 smashes opening match viewership records - CNBC TV18",
                    "channel": "CNBC TV18",
                    "block_position": "left",
                    "snippet": "The United States delivered its most significant television audiences in FIFA World Cup history. The...",
                    "time": "· 15 minutes ago"
                }
            ]
        }
    }
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```json
{
    "status": "error",
    "msg": "validation_error",
    "error": {
        "q": [
            "The q field is required."
        ]
    }
}
```

{% endtab %}

{% tab title="402: Payment Required" %}

```json
{
    "status": "error",
    "msg": "Your SERPHouse account has either run out of available credits (try upgrading your Plan), or there is a payment problem.",
    "error": ""
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```json
{
    "status": "error",
    "msg": "Missing required fields.",
    "error": ""
}
```

{% endtab %}

{% tab title="401: Unauthorized" %}

```json
{
    "status": "error",
    "msg": "Unauthenticated"
}
```

{% endtab %}
{% endtabs %}

## Example request:

{% tabs %}
{% tab title="BASH" %}

<pre class="language-bash"><code class="lang-bash">curl --location --request <a data-footnote-ref href="#user-content-fn-1">POST </a>'https://api.serphouse.com/yahoo-news' \
--header 'Authorization: Bearer &#x3C;YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "data": {
        "q": "football world cup 2026",
        "domain": "in.yahoo.com",
        "lang": "lang_en", 
        "device": "desktop"
    }
}'
</code></pre>

{% endtab %}

{% tab title="RUBY" %}

```ruby
require "uri"
require "json"
require "net/http"

url = URI("https://api.serphouse.com/yahoo-news")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Bearer <YOUR_API_KEY>"
request.body = JSON.dump({
  "data": {
    "q": "football world cup 2026",
    "domain": "in.yahoo.com",
    "lang": "lang_en",
    "device": "desktop"
  }
})

response = https.request(request)
puts response.read_body
```

{% endtab %}

{% tab title="PYTHON" %}

```python
import requests
import json

url = "https://api.serphouse.com/yahoo-news"

payload = json.dumps({
  "data": {
    "q": "football world cup 2026",
    "domain": "in.yahoo.com",
    "lang": "lang_en",
    "device": "desktop"
  }
})
headers = {
  'Authorization': 'Bearer <YOUR_API_KEY>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

```

{% endtab %}

{% tab title="NODE.JS" %}

```javascript
var axios = require('axios');
var data = JSON.stringify({
  "data": {
    "q": "football world cup 2026",
    "domain": "in.yahoo.com",
    "lang": "lang_en",
    "device": "desktop"
  }
});

var config = {
  method: 'post',
  url: 'https://api.serphouse.com/yahoo-news',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': 'Bearer <YOUR_API_KEY>'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

```

{% endtab %}

{% tab title="JAVA" %}

```java

OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");

JSONObject jsonObject = new JSONObject();
JSONObject dataObject = new JSONObject();
dataObject.put("q", "football world cup 2026");
dataObject.put("domain", "in.yahoo.com");
dataObject.put("lang", "lang_en");
dataObject.put("device", "desktop");
jsonObject.put("data", dataObject);

String bodyJson = jsonObject.toString();
RequestBody body = RequestBody.create(mediaType,bodyJson);

Request request = new Request.Builder()
        .url("https://api.serphouse.com/yahoo-news")
        .method("POST", body)
        .addHeader("Content-Type", "application/json")
        .addHeader("Authorization", "Bearer <YOUR_API_KEY>")
        .build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());git
```

{% endtab %}

{% tab title="JAVASCRIPT" %}

```javascript
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "data": {
    "q": "football world cup 2026",
    "domain": "in.yahoo.com",
    "lang": "lang_en",
    "device": "desktop"
  }
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://api.serphouse.com/yahoo-news", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

{% endtab %}

{% tab title="GO" %}

```go
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api.serphouse.com/yahoo-news"
  method := "POST"

  payload := strings.NewReader(`{
    "data": {
        "q": "football world cup 2026",
        "domain": "in.yahoo.com",
        "lang": "lang_en",
        "device": "desktop"
    }
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("Authorization", "Bearer <YOUR_API_KEY>")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```

{% endtab %}

{% tab title="C#/.NET" %}

```csharp
var client = new RestClient("https://api.serphouse.com/yahoo-news");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer <YOUR_API_KEY>");
var body = @"{
	""data"": {
			""q"": ""football world cup 2026"",
			""domain"": ""in.yahoo.com"",
			""lang"": ""lang_en"",
			""device"": ""desktop""
	 }
}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```

{% endtab %}
{% endtabs %}

[^1]:
