addcontent

Type: boolean
Default: false
Context: prediction, search

About this parameter

Decorate the each result with content from the source page. This makes it possible to do more complicated redering, for example, events or news.

Usage examples

  window.__rekai.predict({
    addcontent: true
  }, (predictedData) => console.log(predictedData));

Default Response:

{
  "predictions": [
    {
      "title": "...",
      "url": "...",
      "pageid": "...",
      "type": "page"
    }
  ]
}

Response with addcontent: true:

{
  "predictions": [
    {
      "title": "...",
      "url": "...",
      "pageid": "xxxx",
      "type": "page",
      "h1": "...",
      "h2": "...",
      "ingress": "...",
      "imgurl": "...",
      "metadata": "...",
      "text": "...",
      "enddate": "...",
      "pubdate": "...",
      "ldjson": [...],
      "lang": "en",
      "imgalt": "...",
      "locationtext": "",
      "category": []
    }
  ]
}