> For the complete documentation index, see [llms.txt](https://docs.gridstatus.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gridstatus.io/developers/concepts/response-format.md).

# Response Format

## JSON vs CSV Response

The API supports JSON and CSV return formats. The default return format is JSON. JSON is generally easier to work with in code, while CSV is more suitable for downloading the data to a spreadsheet or other data analysis tools.

You can specify the return format by adding the `return_format` query parameter to your request. For example, to get the data in CSV format, you would add `?return_format=csv` to the end of your request.

#### JSON <a href="#json" id="json"></a>

There are two JSON return formats: `array_of_objects` and `array_of_arrays`. The `array_of_objects` format is the default format. The `array_of_arrays` format is useful for minimizing the size of the response.

#### CSV <a href="#csv" id="csv"></a>

The CSV return format is useful for downloading the data to a spreadsheet.

## Response Compression

The API compresses responses with **brotli** or **gzip** whenever your client sends an `Accept-Encoding` request header — independent of the return format above. On large dataset queries this reduces the transfer by up to \~20x (for example, a 60 MB JSON response drops to roughly 3 MB), so downloads are faster and use far less bandwidth.

Most HTTP clients — including the Grid Status Python client, `requests`, `httpx`, and web browsers — request and decompress responses automatically. If your integration does not, add the header explicitly (`Accept-Encoding: br, gzip`, or pass `--compressed` to curl). See [Best Practices](/developers/concepts/best-practices.md) for examples.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.gridstatus.io/developers/concepts/response-format.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
