# Wolfram Alpha

> Ask Wolfram|Alpha computational questions (maths, unit conversions, science, and facts) and use the answer in your workflows.

App · Research & Academia · 3 actions. Web page: https://docs.lodol.com/docs/integrations/wolfram-alpha

## Actions

### Ask a question

Ask Wolfram|Alpha a question and get its full breakdown: the headline answer plus every result section it produced.

**Inputs**

- Question (`query`, text, required): What to ask, in plain language -- for example 'distance from Earth to Mars' or 'integrate x^2 dx'.
- Units (`units`, text): Optional. Which measurement system to answer in. Defaults to whatever Wolfram|Alpha infers from the question. One of: `metric`, `imperial`.

**Outputs**

- `answer` (text): The headline answer, taken from the section Wolfram|Alpha marks as the primary result
- `pods` (list): Every result section, in the order Wolfram|Alpha returns them. The first restates the question.

**Example output**

```json
{
  "answer": "2464 miles",
  "pods": [
    {
      "pod_id": "Input",
      "primary": false,
      "text": "distance | from | New York City\nto | Denver",
      "title": "Input interpretation"
    },
    {
      "pod_id": "Result",
      "primary": true,
      "text": "2464 miles",
      "title": "Result"
    }
  ]
}
```

### Get a short answer

Ask Wolfram|Alpha a question and get a single short answer, such as '2464 miles'.

**Inputs**

- Question (`query`, text, required): What to ask, in plain language -- for example 'distance from Earth to Mars' or 'integrate x^2 dx'.
- Units (`units`, text): Optional. Which measurement system to answer in. Defaults to whatever Wolfram|Alpha infers from the question. One of: `metric`, `imperial`.

**Outputs**

- `answer` (text): The short answer, as a single line of plain text

**Example output**

```json
{
  "answer": "2464 miles"
}
```

### Get a spoken answer

Ask Wolfram|Alpha a question and get the answer phrased as a full sentence, suited to reading aloud or sending as a notification.

**Inputs**

- Question (`query`, text, required): What to ask, in plain language -- for example 'distance from Earth to Mars' or 'integrate x^2 dx'.
- Units (`units`, text): Optional. Which measurement system to answer in. Defaults to whatever Wolfram|Alpha infers from the question. One of: `metric`, `imperial`.

**Outputs**

- `answer` (text): The answer as a spoken-style sentence, for example 'The answer is about 2464 miles'

**Example output**

```json
{
  "answer": "The distance is about 2464 miles"
}
```
