# Wikipedia

{% hint style="info" %}
This widget supports multiple actions. For a more comprehensive understanding of its functionality, we recommend reviewing the following documentation carefully.

You need to pass both the `action` and other input parameters of the chosen action to your `module_config`
{% endhint %}

## Try it in the Widget Center

Click this [url](https://app.myshell.ai/robot-workshop/widget/1784203525992894464) to try this widget and copy the Pro Config template.

## Usage

### Get Full Wikipedia Article

<mark style="color:green;">`action`</mark> `search_title`

**Input Parameters**

<table><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>action</td><td><code>string</code></td><td>The action you want to perform</td><td>search_title</td><td>true</td></tr><tr><td>article</td><td><code>string</code></td><td>The title of the article you want to search</td><td>artificial intelligence</td><td>true</td></tr></tbody></table>

**Output Parameters**

| Name | Type     | Description                         | File Type |
| ---- | -------- | ----------------------------------- | --------- |
| data | `object` | The search results of the wikipedia |           |

**Output Example**

{% tabs %}
{% tab title="success" %}
{% code fullWidth="false" %}

```json
{
  "data": {
    "url": "https://object-storage-16oh.lepton.ai/ws-k8d7q1rw/wikipedia/output/2c99c27f01264bf8808d0f1fc8e770f7.json"
  }
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Summary Wikipedia Article

<mark style="color:green;">`action`</mark> `summary_title`

**Input Parameters**

<table><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>action</td><td><code>string</code></td><td>The action you want to perform</td><td>summary_title</td><td>true</td></tr><tr><td>article</td><td><code>string</code></td><td>The title of the article you want to search</td><td>artificial intelligence</td><td>true</td></tr></tbody></table>

**Output Parameters**

| Name | Type     | Description                         | File Type |
| ---- | -------- | ----------------------------------- | --------- |
| data | `object` | The search results of the wikipedia |           |

**Output Example**

{% tabs %}
{% tab title="success" %}
{% code fullWidth="false" %}

```json
{
  "data": {
    "content_urls": {
      "desktop": {
        "edit": "https://en.wikipedia.org/wiki/Artificial_intelligence?action=edit",
        "page": "https://en.wikipedia.org/wiki/Artificial_intelligence",
        "revisions": "https://en.wikipedia.org/wiki/Artificial_intelligence?action=history",
        "talk": "https://en.wikipedia.org/wiki/Talk:Artificial_intelligence"
      },
      "mobile": {
        "edit": "https://en.m.wikipedia.org/wiki/Artificial_intelligence?action=edit",
        "page": "https://en.m.wikipedia.org/wiki/Artificial_intelligence",
        "revisions": "https://en.m.wikipedia.org/wiki/Special:History/Artificial_intelligence",
        "talk": "https://en.m.wikipedia.org/wiki/Talk:Artificial_intelligence"
      }
    },
    "description": "Intelligence of machines",
    "description_source": "local",
    "dir": "ltr",
    "displaytitle": "\u003cspan class=\"mw-page-title-main\"\u003eArtificial intelligence\u003c/span\u003e",
    "extract": "Artificial intelligence (AI), in its broadest sense, is intelligence exhibited by machines, particularly computer systems. It is a field of research in computer science that develops and studies methods and software which enable machines to perceive their environment and uses learning and intelligence to take actions that maximize their chances of achieving defined goals. Such machines may be called AIs.",
    "extract_html": "\u003cp\u003e\u003cb\u003eArtificial intelligence\u003c/b\u003e (\u003cb\u003eAI\u003c/b\u003e), in its broadest sense, is intelligence exhibited by machines, particularly computer systems. It is a field of research in computer science that develops and studies methods and software which enable machines to perceive their environment and uses learning and intelligence to take actions that maximize their chances of achieving defined goals. Such machines may be called AIs.\u003c/p\u003e",
    "lang": "en",
    "namespace": {
      "id": 0,
      "text": ""
    },
    "pageid": 1164,
    "revision": "1220923766",
    "tid": "06f57629-0401-11ef-a344-e22c5cbd2b2b",
    "timestamp": "2024-04-26T19:13:13Z",
    "title": "Artificial intelligence",
    "titles": {
      "canonical": "Artificial_intelligence",
      "display": "\u003cspan class=\"mw-page-title-main\"\u003eArtificial intelligence\u003c/span\u003e",
      "normalized": "Artificial intelligence"
    },
    "type": "standard",
    "wikibase_item": "Q11660"
  }
}
```

{% endcode %}
{% endtab %}
{% endtabs %}
