This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

WolframAlpha

WolframAlpha
sends query to Wolfram|Alpha and imports the output.
WolframAlpha
imports the output according to the specified format.
  • The following formats are supported:
"FullOutput"a fully formatted version of Wolfram|Alpha output
"MathematicaParse"a Mathematica expression corresponding to the query
"MathematicaResult"pure standard Mathematica result (if any)
"Result"result in the form generated by =
"URL"Wolfram|Alpha API URL for the query
"XML"raw XML data
"MathematicaForms"list of Mathematica expressions in the output, in held form
"PodInformation"a list of all known information about each pod
"PodCells"a list of pod contents, rendered as Mathematica cells
"PodImages"a list of pod contents, rendered as bitmaps
"PodPlaintext"a list of pod contents, as plain text
"PodTitles"a list of available pod titles
"PodIDs"a list of available pod IDs
"PodStates"a list of available pod states
"SessionInfo"a list of session values that may be sent to the Wolfram|Alpha server to compute the result
"DataRules"a list of available exposed data
"Validate"whether the query can be interpreted by Wolfram|Alpha
{"podid"}a list of available properties for a given pod
{{"podid",subpodid}}a list of available properties for the given pod and subpod
{"podid","property"}the values of a given property for the given pod
{{"podid",subpodid},"property"}the value of a given property for the given pod and subpod
  • When the second argument is a list, any element of that list can itself be a list, or All, indicating that all matching properties should be returned.
  • The following options can be given:
AppearanceElementsAutomaticelements to include in the displayed results
AsynchronousFalsewhether to use asynchronous features of the API
ExcludePodsNonespecific pod IDs to exclude from the results
IncludePodsAllspecific pod IDs to include in the results
InputAssumptions{}assumptions to include in the API call
PodStates{}information about the state of pods
PodWidthAutomaticthe width parameters of content returned by the API
TimeConstraint30how many seconds to allow for the API call
  • Asynchronous->True sets the flag in the API, but then automatically resolves asynchronous content with subsequent calls to Import.
  • Asynchronous->All will set the flag, and leave any asynchronous content unresolved.
  • PodWidth->w sets the API's parameter to w.
  • PodWidth can be set to a list of up to four numbers, corresponding to the API parameters , , , and .
  • TimeConstraint->t does not constrain the time spent for asynchronous downloads.
  • If TimeConstraint is set to a list of values, the second element is used for the API's setting, the third for , and the fourth for .
Get the results from a simple query:
Get just the content of the results, formatted as Mathematica cells:
Get a particular piece of information from a particular pod and subpod:
Get the results from a simple Wolfram|Alpha query:
In[1]:=
Click for copyable input
Out[1]=
 
Get just the content of the results, formatted as Mathematica cells:
In[1]:=
Click for copyable input
Out[1]=
 
Get a particular piece of information from a particular pod and subpod:
In[1]:=
Click for copyable input
Out[1]=
You can use the element to get a list of available pods for a given query:
A particular pod ID can then be used to drill down into that pod, to see what pieces of data are available:
Summon content containing a single 3D graphic:
The default AppearanceElements setting includes :
Prevent the use input links from appearing by changing the AppearanceElements setting:
By default, WolframAlpha[query] makes a synchronous query:
Asynchronous->True uses asynchronous features of the API, but still resolves all content before displaying:
Asynchronous->All may cause some content to resolve after it is displayed:
Give specific pod IDs to exclude from the results:
Use to query the available values that can be given to ExcludePods:
Give specific pod IDs to include in the results:
Use to query the available values that can be given to IncludePods:
Specify assumptions about formula values:
The default return value may have modifiable states:
The setting for PodStates typically includes the full history of all states that have been set:
By default, WolframAlpha returns content that is sized as it would be on the web:
When PodWidth specifies wider content, more content can fit on a default line:
Time series data, such as that used for a stock's closing price, is returned by as a list of pairs of dates and values:
The second column of this data contains the actual prices:
Use any of Mathematica's built-in functions to do arbitrary data analysis:
Display results in a MenuView:
Use several calls to WolframAlpha to get a sequence of images, and animate the result:
New in 8