# Tabular Responses

Certain API endpoints might return you data in a tabular format, thus making it easier for you to render them in your template files.

You can get the `table` object from response object using `data.table`.

```javascript
{
    "data": {
        "dates": {
            "from": "2016-12-20T00:00:00",
            "to": "2016-12-22T23:59:59"
        },
        "observer": {
            "location": {
                "longitude": -84.39733,
                "latitude": 33.775867,
                "elevation": 1000
            }
        },
        "table": {
            .... table object
        }
    }
}
```

A typical `table` object response will include a `header` and `rows`. The `header` contains the column names, while the `rows` contain the row data.

Each row object consists of a `cells` array and an `entry` object. The `entry` is the label for the current row. While cells are the values for the corresponding columns of the row.

For more information on how to render this type of data refer to the [samples repository](https://github.com/AstronomyAPI/Samples)

```javascript
{
    "header": [
        "Column 1",
        "Column 2"
    ],
    "rows": [
        {
            "cells": [
                {
                    .. Row 1, Col 1
                },
                {
                    .. Row 1, Col 2
                }
            ],
            "entry": {
                "id": "Row 1"
            }
        },
        {
            "cells": [
                {
                    .. Row 2, Col 1
                },
                {
                    .. Row 2, Col 2
                }
            ],
            "entry": {
                "id": "Row 2"
            }
        },
        {
            "cells": [
                {
                    .. Row 3, Col 1
                },
                {
                    .. Row 3, Col 2
                }
            ],
            "entry": {
                "id": "Row 3"
            }
        }
    ]
}
```


---

# Agent Instructions: 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:

```
GET https://docs.astronomyapi.com/requests-and-response/tabular-responses.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
