How to Read and Debug JSON API Responses
When an integration breaks, the answer is usually in the response body. This guide shows how to capture a response, make it readable and find the fields that explain what went wrong.
Open the tool: JSON Formatter for API Responses
1. Capture the full response
Use your browser's DevTools Network tab for requests made by a web page, and curl for everything else. curl -i shows the status code and headers as well as the body, which often explains an error before you even read the JSON.
Copy the whole response. A truncated response from a log or terminal cannot be formatted, because the closing brackets are missing.
2. Check the status code first
| Status | Meaning | Look in the body for |
|---|---|---|
| 200, 201 | Success | The data you requested or created |
| 400, 422 | The request was invalid | A list of fields and validation messages |
| 401, 403 | Missing or insufficient permission | Hints about the token or scope |
| 404 | Not found | Whether the path or the ID is wrong |
| 429 | Too many requests | Retry-after time or rate limit details |
| 500 to 504 | Server or gateway error | A request ID to give to the API provider |
3. Make it readable
Paste the response into the JSON formatter. If it starts with headers or a JSONP callback, those are removed. If you see many \" sequences, the JSON was encoded twice and the formatter decodes it.
Switch to Tree view and fold the large arrays. Most APIs wrap results in a field such as data, items or results, with paging details in meta, links or next.
4. Follow pagination
Lists are usually split into pages. Look for fields such as next, next_cursor, page and total. Request the next page with the cursor or URL the API gives you instead of building it yourself, because cursors can change between calls.
5. Watch out for numbers and dates
IDs longer than 15 or 16 digits may be rounded by JavaScript. Use the string version of the ID if the API offers one. Dates are normally ISO 8601 strings such as 2026-01-15T09:30:00Z, where Z means UTC, so convert them to local time only when you display them.