Understanding API Response Formats
Guide to parsing and handling API responses
Learn how to interpret and work with different API response formats, including JSON parsing and error handling.
Response Structure
Understand the typical structure of API responses, including success and error response formats.
Standard Response Format
Successful responses follow this general structure:
json
{
"data": {
// Response data varies by endpoint
},
"meta": {
"request_id": "req_12345",
"processing_time": 0.153
}
}
The data
object contains the actual response content, while the meta
object provides request metadata.
Pagination
Endpoints that return multiple items use cursor-based pagination:
json
{
"data": [
// Array of items
],
"meta": {
"request_id": "req_12345"
},
"pagination": {
"next_cursor": "cursor_abcdef",
"has_more": true
}
}
To fetch the next page, include the cursor
parameter in your next request: ?cursor=cursor_abcdef
Response Headers
Important response headers include:
X-Request-ID
: Unique identifier for the request (useful for support)X-RateLimit-*
: Rate limiting informationContent-Type
: Alwaysapplication/json
unless requesting other formats
Handling Different Data Types
Our API uses standard JSON data types:
- Strings: Text values enclosed in double quotes
- Numbers: Integer or decimal values without quotes
- Booleans:
true
orfalse
values - Arrays: Ordered lists in square brackets
[]
- Objects: Key-value pairs in curly braces
{}
- Null: Represented as
null
Dates and times are formatted as ISO 8601 strings: "2025-03-14T15:53:20Z"
Working with Binary Data
For endpoints that return binary data (like file downloads), we use Base64 encoding in JSON or set the appropriate Content-Type header for direct binary responses.
Was this article helpful?
Need Personalized Assistance?
Our support team is ready to help you resolve any outstanding questions.