Skip to content
  • Auto
  • Light
  • Dark
Get An API Key

List

Returns a list of live news from query
client.livenews.list(LivenewListParamsquery, RequestOptionsoptions?): newsNewsLivenewListResponse
get/livenews

Returns a list of live news from query

Parameters
queryqstringLivenewListParams
Hide ParametersShow Parameters
qstring

Search query used to retrieve relevant news from index

Returns
LivenewListResponse
Hide ParametersShow Parameters
newsqueryQueryresultsarraytypestringmetadataMetadataNews
Hide ParametersShow Parameters
queryoriginalstringspellcheck_offbooleanQuery
Hide ParametersShow Parameters
originalstring
spellcheck_offboolean
resultsarray
Array<Result>
Hide ParametersShow Parameters
agestring
titlestring
typestring
urlstring
formaturi
article_idunion
optional
string | null
descriptionstring
optional
meta_urlhostnamestringnetlocstringpathstringschemestringMetaURL
optional
Hide ParametersShow Parameters
hostnamestring
netlocstring
pathstring
schemestring
metadataRecord<string, unknown>
optional
page_agestring
optional
formatdate-time
source_namestring
optional
thumbnailsrcstringThumbnail
optional
Hide ParametersShow Parameters
srcstring
formaturi
typestring
metadatarequest_uuidstringMetadata
optional
Hide ParametersShow Parameters
request_uuidstring
formatuuid
import YouAPI from 'you-api';

const client = new YouAPI({
  apiKey: 'My API Key',
});

const livenews = await client.livenews.list({ q: 'q' });

console.log(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"
    }
  }
}