Options
Options
Specify Response Format
The userstack API can deliver API results either in JSON (default) or XML format. To change the response format, simply append the API's output parameter to your API request URL and set it to json or xml.
Example API Request - JSON:
Example API Request - XML:
API Response: Interested in seeing the API response? Jump to the API Response section.
Specify Response Fields
Since the file size of API responses can be extensive in size, especially when making Bulk Lookup requests, the userstack API features a fields parameter that can be used to request only certain parts of the API response to be included in the final result.
Using this parameter is simple. Please find some examples below.
Examples:
Example API Request:
Sign Up to Run API Request
Example API Response:
As you can see above, the API now returns only the fields specified in the API request, dramatically reducing the file size of the API response and speed of your application using userstack.
Enable Legacy Format
For customers transitioning from former UserAgent API, userstack is capable of delivering API results in a legacy format identical to the former response structure. To enable legacy format, simply append the API's legacy parameter to your API request URL and set it to 1.
Example API Request:
Example API Response: