# Read table

Read table is a read in the HeadHoncho API. Rows of one raw table for one company and a date range, exactly as the provider reported them. No joins, no derived figures.

Page: https://headhoncho.app/docs/api/read_table | Part of the HeadHoncho API docs: https://headhoncho.app/docs/api | Machine-readable: https://headhoncho.app/docs/api/openapi.json

## The request

Reference for **Read table**, HeadHoncho API v1. It is a read, sent to the base address `https://api.headhoncho.app`.

`GET /api/v1/data/tables/{key}`

The key or app needs the **Raw data** area at **read**. It counts as a read call: 300 a minute for each key or connected app. See [rate limits](https://headhoncho.app/docs/api/errors#rate-limits).

Send your key as `Authorization: Bearer hh_live_...`. See [API keys](https://headhoncho.app/docs/api/keys).

## Parameters

| Name | Kind | Required | Description | Example |
| --- | --- | --- | --- | --- |
| `key` | text, in the path | Yes | A table key from List tables. | `google_ads.spend_by_day` |
| `company_id` | id, in the query | No | Default: the first company the credential reaches. | `cmp_14f5` |
| `from` | date, in the query | No | For tables with a date column. Default: this month. | `2026-10-01` |
| `to` | date, in the query | No | The last day, inclusive. | `2026-10-14` |
| `order` | text, in the query | No | A column key. Default: the table's own order. | `date` |
| `direction` | text, in the query | No | asc or desc. One of `asc`, `desc`. | `desc` |
| `limit` | number, in the query | No | 1 to 1000. Default 200. | `200` |
| `offset` | number, in the query | No | Rows to skip. Default 0. | `0` |

## What comes back

table (its definition), rows, total, limit, offset, and the caveat the screen prints beside this table, because a row that leaves without its sentence will be misread.

It never changes a record. It only reads the companies the key reaches.

## Errors that apply

| Code | Status | What it means |
| --- | --- | --- |
| [`missing_key`](https://headhoncho.app/docs/api/errors#missing_key) | 401 | Send your key as Authorization: Bearer hh_live_... |
| [`unknown_key`](https://headhoncho.app/docs/api/errors#unknown_key) | 401 | That key is not one we issued, or it was revoked. |
| [`expired_token`](https://headhoncho.app/docs/api/errors#expired_token) | 401 | That token has expired. Refresh it, or connect the app again. |
| [`no_access`](https://headhoncho.app/docs/api/errors#no_access) | 403 | This credential does not reach that. Ask the person who made it for access. |
| [`not_found`](https://headhoncho.app/docs/api/errors#not_found) | 404 | No such record in the companies this credential reaches. |
| [`out_of_scope`](https://headhoncho.app/docs/api/errors#out_of_scope) | 404 | No such company in the companies this credential reaches. |
| [`invalid`](https://headhoncho.app/docs/api/errors#invalid) | 422 | Some fields were refused. See fields. |
| [`rate_limited`](https://headhoncho.app/docs/api/errors#rate_limited) | 429 | Too many calls this minute. Wait and try again. |
| [`not_connected`](https://headhoncho.app/docs/api/errors#not_connected) | 409 | This company has not connected that provider yet. |

## Related

- [List tables](https://headhoncho.app/docs/api/list_tables): Every raw table, by the provider that produced it, with its columns, its grain and whether this company has it connected.
- [Export table](https://headhoncho.app/docs/api/export_table): One raw table as a CSV file for a company and a date range, up to 50,000 rows, with its caveat in the last lines.
- The same records in the app: [the Raw data board](https://headhoncho.app/docs/marketing/raw-data).
- How the API fits together: [the model](https://headhoncho.app/docs/api/model), [API keys](https://headhoncho.app/docs/api/keys), [errors](https://headhoncho.app/docs/api/errors) and [the MCP server](https://headhoncho.app/docs/api/mcp).

## Examples

### Answer

```json
{
  "table": {
    "key": "google_ads.spend_by_day",
    "grain": "One row per campaign per day.",
    "caveat": "Spend is what Google reported for the day; it can move for 48 hours."
  },
  "rows": [
    {
      "date": "2026-10-13",
      "campaign_name": "Moving - Bloomington",
      "cost": 212.4,
      "clicks": 41,
      "impressions": 1904,
      "currency": "USD"
    },
    {
      "date": "2026-10-12",
      "campaign_name": "Moving - Bloomington",
      "cost": 198.05,
      "clicks": 37,
      "impressions": 1771,
      "currency": "USD"
    }
  ],
  "total": 28,
  "limit": 200,
  "offset": 0
}
```

### cURL

```bash
curl "https://api.headhoncho.app/api/v1/data/tables/google_ads.spend_by_day?company_id=cmp_14f5&from=2026-10-01" \
  -H "Authorization: Bearer hh_live_..."
```

### Python

```python
import requests

response = requests.get(
    "https://api.headhoncho.app/api/v1/data/tables/google_ads.spend_by_day",
    headers={"Authorization": "Bearer hh_live_..."},
    params={
        "company_id": "cmp_14f5",
        "from": "2026-10-01",
    },
)
response.raise_for_status()
print(response.json())
```

### JavaScript

```javascript
const response = await fetch("https://api.headhoncho.app/api/v1/data/tables/google_ads.spend_by_day?company_id=cmp_14f5&from=2026-10-01", {
  headers: { Authorization: "Bearer hh_live_..." },
});
const data = await response.json();
console.log(data);
```

### Your AI

```text
Tool: read_table
Arguments: key (text, required), company_id (id, optional), from (date, optional), to (date, optional), order (text, optional), direction (text, optional), limit (number, optional), offset (number, optional)
Access: read on Raw data
Hints: readOnly=true, destructive=false, idempotent=true, openWorld=false
Try asking: "Using HeadHoncho, read table with key google_ads.spend_by_day and company_id cmp_14f5."
```
