Get results optimized for conversational audio delivery with the Spoken Results API.
The Spoken Results API returns text results phrased in full sentence form. This API is ideal for applications that use a text-to-speech component to deliver a spoken result to the user. It is implemented in a standard REST protocol using HTTP GET requests.
To get started, you must register a Wolfram ID and sign in to the Wolfram|Alpha Developer Portal. Upon logging in, go to the My Apps tab to start creating your first app.
Click the Sign up to get your first AppID button to start the app creation process. After a one-time survey about intended usage, the AppID creation dialog will appear. Give your application a name and a simple description to register an AppID. Each application must have its own unique AppID.
Now that you have an AppID, you can make your first query. The base URL for queries is:
Every query requires two pieces of information—an AppID and an input value—in order to be processed correctly. The appid parameter tells your query which AppID to use:
Next, use the i parameter to specify the URL-encoded input for your query. For instance, here is a query for "How far is Los Angeles from New York?":
When executed with a valid AppID, this URL will return a single line of conversational text with a computed response to your query:
The distance from the center of New York City, New York to the center of Los Angeles, California is about 2464 miles
You can add URL-encoded parameters to customize output. Since the output for this API is plain text, only basic parameters are available.
Use this parameter to manually select what system of units to use for measurements and quantities (either "metric" or "imperial"). By default, the system will use your location to determine this setting. Adding "units=metric" to our sample query displays the resulting distance in kilometers instead of miles:
The result is now given in kilometers instead of miles:
The distance from the center of New York City, New York to the center of Los Angeles, California is about 3966 kilometers
This parameter specifies the maximum amount of time (in seconds) allowed to process a query, with a default value of "5". Although it is primarily used to optimize response times in applications, the timeout parameter may occasionally affect what value is returned by the Spoken Results API.
This status is returned if a given input value cannot be interpreted by this API. This is commonly caused by input that is misspelled, poorly formatted or otherwise unintelligible. Because this API is designed to return a single result, this message may appear if no sufficiently short result can be found. You may occasionally receive this status when requesting information on topics that are restricted or not covered.
This status indicates that the API did not find an input parameter while parsing. In most cases, this can be fixed by checking that you have used the correct syntax for including the i parameter.
This error is returned when a request contains an invalid option for the appid parameter. Double-check that your AppID is typed correctly and that your appid parameter is using the correct syntax.
This error is returned when a request does not contain any option for the appid parameter. Double-check that you have entered an AppID and that your appid parameter is using the correct syntax.
free non-commercial development account
flexible commercial licensing with low monthly plans available