Returns a list of live news from query
curl --request GET \
--url https://api.ydc-index.io/livenews \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.ydc-index.io/livenews"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.ydc-index.io/livenews', 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://api.ydc-index.io/livenews",
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: <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://api.ydc-index.io/livenews"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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://api.ydc-index.io/livenews")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ydc-index.io/livenews")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"news": {
"query": {
"original": "Your query about news",
"spellcheck_off": false
},
"results": [
{
"age": "6h",
"description": "Any news for you!",
"meta_url": {
"hostname": "www.wsj.com",
"netloc": "wsj.com",
"path": "> world > china-to-block-its-rare-earth-experts-from-spilling-their-secrets-8d69b75f",
"scheme": "https"
},
"page_age": "2025-06-25T11:41:00",
"source_name": "WSJ",
"thumbnail": {
"src": "https://images.wsj.net/im-42431776?width=700&height=449"
},
"title": "Exclusive | China Is Tracking Down Its Rare-Earth Experts—and Taking Away Passports",
"type": "news_result",
"url": "https://www.wsj.com/world/china-to-block-its-rare-earth-experts-from-spilling-their-secrets-8d69b75f?gaa_at=eafs&gaa_n=ASWzDAiVjqRNxFmx5h0MkVKtlAuVL0B8yQIDw3q7BheARNdP_8kbbzG50lB9&gaa_ts=685c3985&gaa_sig=x_9tkHwj_WnP29wU-sgBvg0clotjEVKnMak6vgU98b6mdtl5vl0Iu8k96Ep4H_YZRrt-38wFlodzzWcHrWYNWQ%3D%3D",
"metadata": {},
"article_id": "<string>"
}
],
"type": "news",
"metadata": {
"request_uuid": "942ccbdd-7705-4d9c-9d37-4ef386658e90"
}
}
}API Reference
Live News
GET
/
livenews
Returns a list of live news from query
curl --request GET \
--url https://api.ydc-index.io/livenews \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.ydc-index.io/livenews"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.ydc-index.io/livenews', 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://api.ydc-index.io/livenews",
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: <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://api.ydc-index.io/livenews"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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://api.ydc-index.io/livenews")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ydc-index.io/livenews")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"news": {
"query": {
"original": "Your query about news",
"spellcheck_off": false
},
"results": [
{
"age": "6h",
"description": "Any news for you!",
"meta_url": {
"hostname": "www.wsj.com",
"netloc": "wsj.com",
"path": "> world > china-to-block-its-rare-earth-experts-from-spilling-their-secrets-8d69b75f",
"scheme": "https"
},
"page_age": "2025-06-25T11:41:00",
"source_name": "WSJ",
"thumbnail": {
"src": "https://images.wsj.net/im-42431776?width=700&height=449"
},
"title": "Exclusive | China Is Tracking Down Its Rare-Earth Experts—and Taking Away Passports",
"type": "news_result",
"url": "https://www.wsj.com/world/china-to-block-its-rare-earth-experts-from-spilling-their-secrets-8d69b75f?gaa_at=eafs&gaa_n=ASWzDAiVjqRNxFmx5h0MkVKtlAuVL0B8yQIDw3q7BheARNdP_8kbbzG50lB9&gaa_ts=685c3985&gaa_sig=x_9tkHwj_WnP29wU-sgBvg0clotjEVKnMak6vgU98b6mdtl5vl0Iu8k96Ep4H_YZRrt-38wFlodzzWcHrWYNWQ%3D%3D",
"metadata": {},
"article_id": "<string>"
}
],
"type": "news",
"metadata": {
"request_uuid": "942ccbdd-7705-4d9c-9d37-4ef386658e90"
}
}
}NOTE: The You.com news API is currently available to exclusive early access partners.To express interest in early access, please reach out via email to api@you.com.
ATTENTION: The correct cURL code to use in your API call is in the playground. Click on Try it in the bar above to open the playground.
Description
This endpoint retrieves responses from news media websites that are relevant to the user’s query.Authorizations
The unique API Key required to authorize API access. Learn how to get yours in the “Get your API key” section of the documentation.
Query Parameters
Search query used to retrieve relevant news from the web.
Example:
"Your query about news"
Specifies the maximum number of news results to return.
Required range:
1 <= x <= 40Response
A JSON object containing news results.
Show child attributes
Show child attributes