Core REST API/Reference/Search/Search result object

The search result object represents a wiki page matching the requested search.

Example

{
  "id": 9228,
  "key": "Earth",
  "title": "Earth",
  "excerpt": "<span class=\"searchmatch\">Earth</span> is the third planet from the Sun and the only astronomical object known to harbor life. About 29% of <span class=\"searchmatch\">Earth</span>'s surface is land consisting of continents",
  "matched_title": null,
  "description": "Third planet from the Sun in the Solar System",
  "thumbnail": {
    "mimetype": "image/jpeg",
    "size": null,
    "width": 200,
    "height": 200,
    "duration": null,
    "url": "//upload.wikimedia.org/wikipedia/commons/thumb/9/97/The_Earth_seen_from_Apollo_17.jpg/200px-The_Earth_seen_from_Apollo_17.jpg"
  }
}

Schema

id

integer

Page identifier
key

string

Page title in URL-friendly format
title

string

Page title in reading-friendly format
excerpt

string

For search content endpoint:
A few lines giving a sample of page content with search terms highlighted with <span class=\"searchmatch\"> tags. Excerpts may end mid-sentence.
For search titles endpoint:
Page title in reading-friendly format
matched_title

string

Title of the page redirected from, if the search term matched a redirect page, or null if search term did not match a redirect page
description

string

Short summary of the page or null if no description exists
thumbnail

object

Reduced-size version of the page's lead image or null if no lead image exists
Properties
mimetype

string

Media type for the image. For example: image/jpeg
size

integer

File size in bytes or null if not available
width

integer

Maximum recommended image width in pixels or null if not available
height

integer

Maximum recommended image height in pixels or null if not available
duration

integer

Length of the video, audio, or multimedia file or null for other media types
url

string

URL to download the file