---
title: "List storefront categories"
---

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

# List storefront categories

Path: EdgeCart API › Storefront

`GET /store/categories`

URL: `https://{store_domain}/api/store/categories`

Returns active, non-internal categories that contain at least one
published product visible to the storefront's sales channel.

## Authentication

- `publishableKey`, apiKey, in header, header `x-publishable-api-key`

## Query parameters

- `limit` (`listStorefrontCategories.query.limit`; integer, optional)
  - maximum: `100` · minimum: `1` · default: `20`
- `offset` (`listStorefrontCategories.query.offset`; integer, optional)
  - minimum: `0` · default: `0`
- `q` (`listStorefrontCategories.query.q`; string, optional) — Search category name or handle.
- `locale` (`listStorefrontCategories.query.locale`; string, optional)

## Code samples

### cURL

```bash
curl --request GET \
  --url https://your-store.example.com/api/store/categories \
  --header 'x-publishable-api-key: <x-publishable-api-key>'
```

### TypeScript

```typescript
const url = 'https://your-store.example.com/api/store/categories';
const options = {
  method: 'GET',
  headers: {'x-publishable-api-key': '<x-publishable-api-key>'}
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://your-store.example.com/api/store/categories"

headers = {"x-publishable-api-key": "<x-publishable-api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

A page of categories.

#### Example

```json
{
  "categories": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "handle": "string",
      "mpath": "string",
      "is_active": true,
      "is_internal": true,
      "rank": 0,
      "parent_category_id": "string",
      "metadata": {},
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ],
  "count": 0,
  "offset": 0,
  "limit": 0
}
```

- `categories` (`listStorefrontCategories.response.200.categories`; array of object, required)
  - `id` (`listStorefrontCategories.response.200.categories.id`; string, required)
  - `name` (`listStorefrontCategories.response.200.categories.name`; string, required)
  - `handle` (`listStorefrontCategories.response.200.categories.handle`; string, required)
  - `is_active` (`listStorefrontCategories.response.200.categories.is_active`; boolean, required)
  - `rank` (`listStorefrontCategories.response.200.categories.rank`; integer, required)
  - `description` (`listStorefrontCategories.response.200.categories.description`; string | null, optional)
  - `mpath` (`listStorefrontCategories.response.200.categories.mpath`; string | null, optional)
  - `is_internal` (`listStorefrontCategories.response.200.categories.is_internal`; boolean, optional)
  - `parent_category_id` (`listStorefrontCategories.response.200.categories.parent_category_id`; string | null, optional)
  - `metadata` (`listStorefrontCategories.response.200.categories.metadata`; object, optional)
  - `created_at` (`listStorefrontCategories.response.200.categories.created_at`; string, optional)
    - format: `date-time`
  - `updated_at` (`listStorefrontCategories.response.200.categories.updated_at`; string, optional)
    - format: `date-time`
- `count` (`listStorefrontCategories.response.200.count`; integer, required)
- `offset` (`listStorefrontCategories.response.200.offset`; integer, required)
- `limit` (`listStorefrontCategories.response.200.limit`; integer, required)

### 401

The publishable API key is missing or invalid.

#### Example

```json
{
  "type": "not_found",
  "message": "No active store is available for this deployment",
  "code": "store_not_configured"
}
```

- `type` (`listStorefrontCategories.response.401.type`; string, required)
- `message` (`listStorefrontCategories.response.401.message`; string, required)
- `code` (`listStorefrontCategories.response.401.code`; string, optional)


Source: https://edgecart.dev/api/store/categories/index.md
