---
title: "Search and page through the component catalogue"
method: GET
path: "/api/admin/components/list"
tags: ["admin-components"]
---

# Search and page through the component catalogue

`GET /api/admin/components/list`

## Request

- Base URL: `https://voltplan.app`
- URL: `https://voltplan.app/api/admin/components/list`
- Auth: HTTP bearer

One page of `components` (with `expand: brand`), enriched with brand name and colour, 30-day human click counts and affiliate link counts.

- `totalItems` and `totalPages` count the PocketBase filter result **before** the `hasAffiliate` post-filter; `hasAffiliate` and the `clicks30d` sorts act on the loaded page only.
- `affiliateLinkCount` is only filled when `hasAffiliate` or a `clicks30d` sort is set; otherwise it is 0.
- `clicks30d` counts `component_click_events` of the last 30 days, skipping bot user agents.

## Query parameters

- `page` integer
- `perPage` integer
- `search` string
- `type` string
- `brand` string
- `missing` 'watt' | 'price' | 'image'
- `hasAffiliate` 'yes' | 'no'
- `published` 'yes' | 'no'
- `sort` string

## Response `200`

One page of components.

- AdminComponentList
  - `items` AdminComponentListItem[], required
    - `id` string, required
    - `name` string
    - `type` string: Component type: battery, charger, inverter, transformer, load, power, fuse, shunt, switch, disconnect, bridge or tool; `""` when unset.
    - `description` string
    - `image` string
    - `icon` string
    - `watt` number, nullable
    - `voltage_in` number, nullable
    - `voltage_in_type` string: `ac`, `dc`, or `""` when unset.
    - `voltage_out` number, nullable
    - `voltage_out_type` string: `ac`, `dc`, or `""` when unset.
    - `estd_price_euro` number, nullable
    - `duty_cycle` number, nullable
    - `default_utilization_factor` number, nullable
    - `usage_hours_per_day` number, nullable
    - `amperage` number, nullable
    - `cutoff_voltage` number, nullable
    - `fuse_type` string
    - `wire_gauge` string
    - `preferred_suggestion` boolean
    - `published` boolean
    - `published_at` string: First publication. PocketBase datetime `YYYY-MM-DD HH:MM:SS.sssZ`; `""` when unset.
    - `slug` string: Public URL segment of /components/<slug>; unique among non-empty values.
    - `summary` string: Lead paragraph of the public page.
    - `review_count` number
    - `review_avg` number
    - `brand` string: Id of the `component_brands` record; `""` when none.
    - `brand_name` string, nullable, required
    - `brand_color` string, nullable, required
    - `updated` string: Last update. PocketBase datetime `YYYY-MM-DD HH:MM:SS.sssZ`; `""` when unset.
    - `created` string: Creation time. PocketBase datetime `YYYY-MM-DD HH:MM:SS.sssZ`; `""` when unset.
    - `clicks30d` integer, required: Human clicks in the last 30 days.
    - `affiliateLinkCount` integer, required: Affiliate links; only counted when `hasAffiliate` or a `clicks30d` sort is set, else 0.
  - `page` integer, required
  - `perPage` integer, required
  - `totalItems` integer, required: Matches of the PocketBase filter, before `hasAffiliate`.
  - `totalPages` integer, required

## Other responses

- `403`: Admin access required. Returned for a missing, invalid or expired bearer token as well as for a valid token whose user lacks `is_admin=true`; admin endpoints never answer 401.
- `500`: PocketBase read failed, e.g. an invalid `sort`.

---

[API](https://skmtc.dev/voltplan/apis/voltplan-api.md) · [All operations](https://skmtc.dev/voltplan/apis/voltplan-api/llms.txt) · [OpenAPI document](https://skmtc.dev/voltplan/apis/voltplan-api/revisions/575b86a7af92?raw)
