# Wikipedia summary

> Lead extract of an English Wikipedia article.

Source: https://docs.tune.toys/nodes/addon.wikipedia.summary/

Wikipedia summary fetches the title, short description, lead extract and thumbnail of one English Wikipedia article. It needs no key.

## What it does

The node is generated from the `wikipedia` addon manifest. It requests `GET https://en.wikipedia.org/api/rest_v1/page/summary/<title>` and runs it like a [Web request](https://docs.tune.toys/nodes/web.request/). `response` is JSON with fields such as `title`, `description`, `extract` (plain text) and `thumbnail`.

The article title comes from the `title` port when cabled, otherwise from the node's `title` field (spaces may be underscores). With `trigger` cabled each trigger asks; otherwise a new title asks; with no cable at all it asks once at start. An unknown article answers HTTP 404 on `status` and `error`.

A Toy using this node requires the network and the `wikipedia` addon, enabled in Settings → Addons. Wikipedia text is CC BY-SA 4.0: credit Wikipedia and share alike when you reuse it, and follow the Wikimedia API usage guidelines.

## When to use it

Use it to bring words into a piece: an extract read by a text widget, a description that sets the mood of an [LLM chat](https://docs.tune.toys/nodes/ai.chat/) prompt.

## Ports

<!-- ports:start -->

| Port       | Direction | Signal         | Lanes |
| ---------- | --------- | -------------- | ----- |
| `trigger`  | Input     | Data (trigger) | 1     |
| `title`    | Input     | Data (string)  | 1     |
| `response` | Output    | Data (json)    | 1     |
| `status`   | Output    | Data (integer) | 1     |
| `error`    | Output    | Data (string)  | 1     |
| `done`     | Output    | Data (trigger) | 1     |

<!-- ports:end -->

## Parameters

<!-- parameters:start -->

This node has no numeric parameters.

<!-- parameters:end -->

<!-- data:start -->

- `title`: text.

<!-- data:end -->

The only setting is the `title` text field (up to 255 characters), used while the `title` port has no cable.

## Tips

- Pick the text with [Convert](https://docs.tune.toys/nodes/data.convert/) and path `/extract`.
- Use [Wikipedia search](https://docs.tune.toys/nodes/addon.wikipedia.search/) first when you do not know the exact title.

## See also

[Wikipedia search](https://docs.tune.toys/nodes/addon.wikipedia.search/), [Convert](https://docs.tune.toys/nodes/data.convert/), [Console log](https://docs.tune.toys/nodes/log.console/), [Data cables](https://docs.tune.toys/concepts/data-cables/).
