Skip to content

Turn an API response into a table

This guide takes you from a web address to a CSV file: you fetch a JSON response, show its array as a table, filter it to the rows you want, count a column’s values, and save the rows. The steps use JSONPlaceholder, a free test API whose /todos endpoint returns 200 to-do items.

You need a network connection. The response opens read-only; see Work with a pasted or fetched document.

  1. Press Ctrl+U, or choose File → Fetch from URL….

  2. In URL, type https://jsonplaceholder.typicode.com/todos. Leave the method on GET.

  3. Select Fetch, or press Ctrl+Enter.

The response opens in a new tab named todos, and a notice shows the HTTP status, HTTP 200, with the size of the response and the time the request took. The tree shows the root array, [200], already open: one object per to-do, each with userId, id, title, and completed.

If your API needs a token or headers, see Headers and authentication; to reuse a request from your browser, see Paste a cURL command.

Select Table in the view switcher. The root of this response is an array, so the table shows it at once: one row per to-do, one column per key, and the footer reads “Records 1–100 of 200”. Use Next in the footer to see the next 100 rows.

Many APIs wrap the array in an object, for example { "data": [ … ], "page": 1 }. For those, right-click the array in the tree, here data, and choose View Array as Table. See Open an array as a table.

  1. Count a column’s values

    Right-click a cell in the completed column and choose Value frequency of completed. The panel lists false 110 and true 90.

  2. Filter the rows

    Click false in the panel. The table keeps the 110 open to-dos, and the footer reads “Records 1–100 · 110 matches of 200”.

    To filter by hand instead, see Filter rows.

  3. Sort the rows

    Click the userId header to sort the open to-dos by user. Click it again to reverse the order.

  1. Select Export CSV in the footer.

  2. Choose a file name, for example open-todos.csv, and select Save.

The file has the visible columns and the rows that match the filter, in their current order, and a notice confirms “Exported 110 records”. Each cell holds the value itself, so a title reads delectus aut autem without JSON quotes. See Export a table as CSV.

To export full values with SQL:

  1. Press Ctrl+E. The query bar opens on the SQL tab, where doc is the root array.

  2. Type this query and press Ctrl+Enter:

    SELECT * FROM doc WHERE NOT completed ORDER BY userId
  3. Select Export every row, and choose a file name ending in .csv.

For an array inside the response, right-click it and choose Query Array with SQL first. See SQL queries.

  • Table view: hide and pin columns, and group rows with totals
  • Chart view: draw the same array as a bar, line, or pie chart
  • Export types: generate TypeScript or other types for the response