# Wolfram Alpha Api

Integrate computational knowledge into applications via Wolfram|Alpha's APIs.

- **Category:** developer tools
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 11
- **Triggers:** 0
- **Slug:** `WOLFRAM_ALPHA_API`
- **Version:** 20260223_00

## Tools

### Async Pod Fetch

**Slug:** `WOLFRAM_ALPHA_API_ASYNC_POD_FETCH`

Fetch a single asynchronous pod from Wolfram|Alpha Full Results API. Use this tool to retrieve individual pod computations that were marked as async in a Full Results query. When you query the Full Results API with async=true, pods that take longer to compute return async URLs containing 'id' and 's' tokens. Use those tokens with this tool to fetch the computed pod content. Typical workflow: (1) Query Full Results API with async=true parameter, (2) Parse response for async pod URLs, (3) Extract id and s tokens from URLs like 'asyncPod.jsp?id=MSPa...&s=13', (4) Use this tool with those tokens.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `s` | string | Yes | Server/session token, typically a numeric string (e.g., '13', '42'). Obtained from async pod URLs in Full Results API responses alongside the id parameter. Pass exactly as provided without modification. |
| `id` | string | Yes | Pod identifier token starting with 'MSPa' (e.g., 'MSPa1071c679e3ea1d0h94h00002h3ggc950ehaibf9'). Obtained from async pod URLs in Full Results API responses when async=true. Pass exactly as provided without modification. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Establish Wolfram|Alpha Connection

**Slug:** `WOLFRAM_ALPHA_API_ESTABLISH_CONNECTION`

Tool to store Wolfram|Alpha AppID into the connection credential store. Use when establishing or updating your AppID so that subsequent actions automatically include this credential.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `appid` | string | Yes | Your Wolfram\|Alpha AppID (non-empty string). |
| `extra` | object | No | Optional additional parameters for future use. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Extract Recalculate URL & Tokens

**Slug:** `WOLFRAM_ALPHA_API_EXTRACT_RECALC_URL_TOKENS`

Tool to extract the recalculate URL and id/s tokens from full Wolfram|Alpha results. Use when you need to follow up with recalc.jsp or relatedQueries.jsp calls.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `appid` | string | No | Your Wolfram\|Alpha AppID. Required if raw_data is not provided. |
| `input` | string | No | Query string to send to Wolfram\|Alpha. Required if raw_data is not provided. |
| `raw_data` | string | No | Raw full results XML or JSON string. If provided, appid and input are ignored. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Full Results Recalculate

**Slug:** `WOLFRAM_ALPHA_API_FULL_RESULTS_RECALCULATE`

Recalculate a prior WolframAlpha Full Results query to retrieve additional computational results (pods). Use this action when: - A previous Full Results API query timed out or returned incomplete results - You have a recalculate URL or ID token from a previous query - You need to fetch more computational pods from the same query The action requires the 'id' token (obtained from EXTRACT_RECALC_URL_TOKENS or from a Full Results response). The 's' parameter is optional and often not needed. Returns raw XML containing the recalculated query results, which may include additional pods or error information.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `s` | string | No | Optional server token from the recalculate URL. Often not required or provided as null in API responses. |
| `id` | string | Yes | Required token from the recalculate URL or Full Results API response. Extract this using the EXTRACT_RECALC_URL_TOKENS action. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Full Results Related Queries

**Slug:** `WOLFRAM_ALPHA_API_FULL_RESULTS_RELATED_QUERIES`

Tool to fetch related query suggestions for a previous Full Results computation. Use after obtaining `id` and `s` from a Full Results API response.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `s` | string | No | Server token ('s') returned by the Full Results API call. Often optional/empty - defaults to empty string if not provided. |
| `id` | string | Yes | Query ID returned by the Full Results API call. This is typically found in the 'id' attribute of the queryresult or extracted from a recalculate URL. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Wolfram|Alpha AppID

**Slug:** `WOLFRAM_ALPHA_API_GET_APP_ID`

Tool to fetch the Wolfram|Alpha AppID from credentials. Use when you need to verify the current AppID before making API calls.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Query LLM API

**Slug:** `WOLFRAM_ALPHA_API_QUERY_LLM_API`

Tool to query Wolfram|Alpha LLM API for computed knowledge optimized for large language model consumption. Returns plain text results with query interpretations, computed data, and image URLs. Use when you need comprehensive computational knowledge formatted for AI agent processing.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `ip` | string | No | IP address for contextual location information. |
| `input` | string | Yes | Natural language query or mathematical expression to send to Wolfram\|Alpha (e.g., 'What is the capital of France?', 'integrate x^2', '10 densest metals'). |
| `units` | string ("metric" | "nonmetric") | No | Measurement system preference; "metric" or "nonmetric". |
| `latlong` | string | No | Latitude and longitude coordinates for location context (format: 'lat,long'). |
| `currency` | string | No | Currency preference for monetary results (e.g., 'USD', 'EUR'). |
| `location` | string | No | Location string for geographic context (e.g., city name). |
| `maxchars` | integer | No | Maximum character limit for the response (default: 6800 if omitted). |
| `timezone` | string | No | Timezone identifier for time-related queries (e.g., 'America/New_York'). |
| `assumption` | string | No | Disambiguates query interpretation (e.g., specific meaning or context). |
| `countrycode` | string | No | Country code for localization (e.g., 'US', 'FR'). |
| `languagecode` | string | No | Language code preference (e.g., 'en', 'es'). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Query Summary Box

**Slug:** `WOLFRAM_ALPHA_API_QUERY_SUMMARY_BOX`

Tool to query the Summary Boxes API for pre-generated XHTML boxes summarizing Wolfram|Alpha knowledge. Use when you need formatted summary information for subjects like countries, chemicals, dates, or people. Requires a valid summary box path from Query Recognizer API.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `path` | string | Yes | Path to the summary box, obtained from Query Recognizer API response (e.g., 'countries/e/l5/vw/el' for Norway). |
| `appid` | string | Yes | Your Wolfram\|Alpha AppID obtained from the Developer Portal. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Short Answers Result

**Slug:** `WOLFRAM_ALPHA_API_SHORT_ANSWERS_RESULT`

Tool to fetch a concise textual answer from Wolfram|Alpha. Use when you need a short, direct response.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `i` | string | Yes | Natural language query or mathematical expression to send to Wolfram\|Alpha (e.g., 'What is 2+2?', 'capital of France', 'integrate x^2'). |
| `appid` | string | Yes | Your Wolfram\|Alpha AppID. |
| `units` | string ("metric" | "imperial") | No | Measurement system to use; defaults by location. |
| `timeout` | integer | No | Maximum time (in seconds) to process the query; must be >= 1. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Spoken Result

**Slug:** `WOLFRAM_ALPHA_API_SPOKEN_RESULTS_RESULT`

Tool to retrieve a spoken-style single-sentence result from Wolfram|Alpha. Use when you need a concise, conversational answer to a natural-language query.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `i` | string | Yes | Natural-language input for the query. |
| `appid` | string | Yes | Your Wolfram\|Alpha AppID. |
| `units` | string ("metric" | "imperial") | No | Measurement system; "metric" or "imperial". Default determined by location. |
| `timeout` | integer | No | Maximum processing time in seconds; default is 5 if omitted. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Validate Query

**Slug:** `WOLFRAM_ALPHA_API_VALIDATE_QUERY`

Tool to validate a Wolfram|Alpha query, returning parsing assumptions and warnings. Use when you need to check query parse before a full computation.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `appid` | string | Yes | Your Wolfram\|Alpha AppID. |
| `input` | string | Yes | The user query string to validate. |
| `output` | string | No | Response format; must be 'json' for structured output. XML format is not currently supported by this action. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
