represents a response record to be given in a specified format when requested during the execution of a function specified by APIFunction, FormFunction, etc.


includes only the response record elements elemi.


  • ResponseForm[expr,"fmt"] is equivalent to ExportForm[EvaluationData[expr],"fmt"].
  • By default, the elements included in the response record are:
  • "Result"the result of processing expr
    "Success"whether the evaluation is considered successful
  • Typical formats include:
  • Nonegive a response containing only the result
    "JSON"record in JSON format
    "XML"record in XML format
    "HTML"record in HTML format suitable for display
    "WL"record in Wolfram Language form as text
  • The format specified by ResponseForm takes precedence over a response form setting given in APIFunction, FormFunction, etc.
  • The format specified by ResponseForm cannot be overridden by parameters given in the URL used to call an APIFunction etc.
  • ResponseForm has attribute HoldFirst.


Basic Examples  (3)

Use a custom response format:

Create an API that gives its response directly:

Execute an API and import the result:

Introduced in 2014