> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cubestack.app/llms.txt
> Use this file to discover all available pages before exploring further.

# First Request

> Make your first API request to CubeStack.

# First Request

This guide walks you through making your first API request to fetch data from a cube.

## Base URL

All API requests use the following base URL:

```
https://api.cubestack.app/api/v1
```

## Fetch Records

To retrieve records from a cube:

```bash theme={null}
curl "https://api.cubestack.app/api/v1/{project-slug}/{cube-slug}" \
  -H "X-Api-Key: your-api-key"
```

### Response Format

```json theme={null}
{
  "data": [],
  "total": 0,
  "page": 1,
  "pageSize": 25
}
```

## Pagination

Use `_page` and `_pageSize` query parameters to paginate results:

```bash theme={null}
curl "https://api.cubestack.app/api/v1/{project}/{cube}?_page=2&_pageSize=10" \
  -H "X-Api-Key: your-api-key"
```

## Sorting

Use `_sort` and `_order` query parameters:

```bash theme={null}
curl "https://api.cubestack.app/api/v1/{project}/{cube}?_sort=created_at&_order=desc" \
  -H "X-Api-Key: your-api-key"
```

## Filtering

Apply filters using column names with operators:

```bash theme={null}
# Exact match
?title=eq:Hello

# Contains
?title=contains:world

# Greater than
?price=gt:100

# Multiple filters
?status=eq:published&price=gt:50
```

### Available Filter Operators

| Operator   | Description           |
| ---------- | --------------------- |
| `eq`       | Equal to              |
| `not`      | Not equal to          |
| `contains` | Contains substring    |
| `gt`       | Greater than          |
| `gte`      | Greater than or equal |
| `lt`       | Less than             |
| `lte`      | Less than or equal    |

## Next Steps

* [API Overview](/api/overview) — Full API documentation
* [Error Handling](/guides/handle-errors) — Learn how to handle API errors
