List
Returns a list of live news from query
livenews.list(LivenewListParams**kwargs) -> newsNewsLivenewListResponse
get/livenews
Returns a list of live news from query
Parameters
qstr
Search query used to retrieve relevant news from index
Returns
LivenewListResponseclass
from you_api import YouAPI
client = YouAPI(
api_key="My API Key",
)
livenews = client.livenews.list(
q="q",
)
print(livenews.news)
200 Example
{
"news": {
"query": {
"original": "China",
"spellcheck_off": false
},
"results": [
{
"age": "6h",
"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",
"article_id": "article_id",
"description": "",
"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"
},
"metadata": {
"foo": "bar"
},
"page_age": "2019-12-27T18:11:19.117Z",
"source_name": "WSJ",
"thumbnail": {
"src": "https://images.wsj.net/im-42431776?width=700&height=449"
}
}
],
"type": "news",
"metadata": {
"request_uuid": "942ccbdd-7705-4d9c-9d37-4ef386658e90"
}
}
}