A random article summary

Returns the summary of a random article.

Request

GEThttps://wikipedia-search.p.apihiver.com/v1/random
String. Wikipedia language code, e.g. en, hi, mr, ta (default en).
Language
Client
1curl --request GET \
2  --url 'https://wikipedia-search.p.apihiver.com/v1/random?lang=%7Blang%7D' \
3  --header 'Accept: application/json' \
4  --header 'X-API-Key: YOUR_API_KEY'

A random article summary: Wikipedia Search API reference

Returns the summary of a random article. This endpoint is part of the Wikipedia Search API: Search Wikipedia in 300+ languages, get article summaries with images, 'on this day' events, random articles and autocomplete.

Example response (200, application/json)

Success.

1{
2  "url": "https://en.wikipedia.org/wiki/Pondicherry_Lighthouse",
3  "title": "Pondicherry Lighthouse",
4  "extract": "Pondicherry Lighthouse is a central government institution under ministry of ports, shipping and waterways, providing navigational aids to the mariners. The old lighthouse was constructed in Pondicherry in the nineteenth century by the French rulers. A new lighthouse was constructed in 20th century by the government of India. The old lighthouse had first beamed light on 1 September 1836. The new l…",
5  "thumbnail": "https://thumb.wikimedia.org/wikipedia/commons/thumb/f/ff/New_and_old_lighthouses_-_Pondichery.jpg/330px-New_and_old_lighthouses_-_Pondichery.jpg?utm_source=en.wikipedia.org&utm_campaign=api&utm_content=thumbnail",
6  "attribution": "Content from Wikipedia, CC BY-SA 4.0",
7  "description": "Lighthouse in India"
8}

Errors

  • 400 — A required parameter is missing or a value has the wrong format.
    1{
    2  "error": {
    3    "code": "INVALID_INPUT",
    4    "message": "A parameter has the wrong format — the message names it."
    5  }
    6}

Gateway errors (missing key, no subscription, rate limits) are listed in Error codes.