Skip to main content
Every Stemfard API response returns a consistent JSON object regardless of which endpoint you call. The fields present in a given response depend on the api_level you request and which optional parameters you enable. Understanding this structure helps you write resilient parsing logic and lets you display only the data your application actually needs.

Top-level fields

object
required
Request metadata returned with every response. Includes the result_name used to key the answer in result, the operation name, and other contextual identifiers.
object
required
Topic classification for the operation. Present in lite, standard, and detailed responses.
object
required
The computed answer. The key inside this object matches the result_name from metadata (default "ans"). Present in all API levels.
object
A human-readable statement of the problem. Present only in detailed responses.
object
The normalized version of your input parameters as interpreted by the API. Returned when you set request_params: true in the request. Available in detailed mode only.
object
Intermediate calculation data generated during computation. Present in detailed responses. Useful for debugging or displaying partial results.
array
An ordered array of step-by-step solution objects. Present in standard and detailed responses. Each element describes one step in the solution process. The format of step content (HTML, LaTeX, or speech) is controlled by the steps_output_formats request parameter.
Links to related Stemfard API endpoints. Only included in detailed responses when you set related: true in the request.
array
Curated links to educational resources and pathway endpoints relevant to the operation. Only included in detailed responses when you set learning_pathways: true in the request.
object
Usage hints and syntax guidance for the called endpoint. Present in detailed responses.
object
Computed properties of the result object (e.g., degree, domain, whether the result is a polynomial). Returned when you set properties: true in the request. Available in detailed mode only.

Field availability by level

Sample detailed response

The following example shows a complete detailed response with all optional fields enabled.
detailed response
The result object uses the value of result_name as its key. If you pass result_name: "f_prime" in the request, the answer appears as result.f_prime rather than result.ans.