# /userbenchmark/components/search

`POST /api/userbenchmark/components/search`

Price: 20 credits

Read UserBenchmark's speed-rank table for one hardware class — processors, graphics cards, solid-state drives, hard drives, memory kits or USB drives — in the site's own ranking order. Returns each entry's brand and model, its rank, the number of user submissions behind it, the crowd user rating, the value rating, the average benchmark score with its 5th-95th percentile range, market share, age in months, the listed price, and the class-specific columns such as memory speed, capacity or write throughput.

## How to use it

`metric_ranges` bounds are named the way the response names the field, so `avg_bench` bounds the `avg_bench` column; the source's sliders are whole-unit, so a fractional bound is widened outwards to the enclosing integer rather than dropping rows the caller asked for. A class-specific column arrives as an `extra_metrics` entry whose `key` is the source's own column code, and that code is accepted as a `metric_ranges` key too, so a row's own `extra_metrics[].key` can be fed straight back as a bound. Two kinds of row come back and `page_type` tells them apart: a `rating` row is an aggregated product carrying an `id` that /userbenchmark/components resolves, while a `speedtest` row is a submission the site never aggregated, so its `id` is null and only its `url` opens. Most of a class is `speedtest`, so filter on `page_type` before assuming an id is there. `metric_ranges` and `combo_filters` are keyed by column, and a key belongs to exactly one component_type, so a cpu key with an ssd class is rejected rather than ignored; capacity bounds are in GB even though the column prints TB. `brands`, `sellers` and `combo_filters` take the source's own spellings ('2x16GB', 'C30', 'M.2'), several values widen the set to their union, and an unknown spelling matches nothing rather than erroring. `search` matches word tokens, so a model number fragment also matches longer numbers containing it. `price` is a live marketplace quote in the currency of the exit the call happened to use, so it and `value_rating` move between identical calls, and a null price means no current listing rather than a free part.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `component_type` (string, required) — Hardware class whose speed-rank table to read; each class is a separate ranking (one of: "cpu", "gpu", "ssd", "hdd", "ram", "usb"; examples: "cpu", "gpu")
- `search` (string, nullable) — Keyword matched against the product name inside the class table (examples: "ryzen", "RTX 50", "980 pro"; minLength: 1)
- `brands` (array, nullable) — Manufacturers as the source spells them; several values widen the result set to their union (examples: ["Intel"], ["Intel","AMD"])
- `sellers` (array, nullable) — Marketplaces the price is quoted from; several values widen the result set
- `combo_filters` (array, nullable) — Class-specific facets such as SSD form factor, RAM latency or USB media type
  - `key` (string, required) — Class-specific facet; each one exists on exactly one component_type (one of: "ssd_form_factor", "ram_latency", "ram_sticks", "usb_media")
  - `values` (array, required) — Facet values, matched as the source spells them; several values widen the set (minItems: 1)
- `metric_ranges` (array, nullable) — Numeric bounds on ranked columns; each column narrows the set independently
  - `key` (string, required) — Ranked column to bound; the column must exist on the chosen component_type (one of: "user_rating", "value_rating", "avg_bench", "market_share", "age_months", "price", "cpu_memory_points", "cpu_8_core_points", "ssd_capacity", "ssd_write", "hdd_capacity", "hdd_write", "ram_frequency", "ram_multi_core_points", "usb_capacity", "usb_write", "usb_4k_write")
  - `min` (number, nullable) — Lower bound in the column's own units. The source's sliders move in whole units, so a fractional bound is widened outwards to the enclosing integer and the answer can include rows just below it
  - `max` (number, nullable) — Upper bound in the column's own units. The source's sliders move in whole units, so a fractional bound is widened outwards to the enclosing integer and the answer can include rows just above it
- `sort` (string, nullable) — Column to rank by, descending; the source's own default is user rating (one of: "user_rating", "value_rating", "avg_bench")
- `count` (integer, required) — Max number of ranked components to return (min: 1; max: 1500)

## Response

### 200 — Successful Response

- `@type` (string) (default: "UserbenchmarkComponent")
- `id` (string, nullable)
- `row_id` (string, nullable)
- `component_type` (string, nullable)
- `page_type` (string, nullable)
- `rank` (integer, nullable)
- `name` (string, nullable)
- `brand` (string, nullable)
- `model` (string, nullable)
- `alias` (string, nullable)
- `url` (string, nullable)
- `image` (string, nullable)
- `is_stale` (boolean, nullable)
- `samples` (integer, nullable)
- `samples_text` (string, nullable)
- `live_price` (string, nullable)
- `live_price_seller` (string, nullable)
- `is_hot_price` (boolean, nullable)
- `price` (number, nullable)
- `price_text` (string, nullable)
- `price_currency` (string, nullable)
- `price_percentile` (integer, nullable)
- `user_rating` (number, nullable)
- `user_rating_percentile` (integer, nullable)
- `value_rating` (number, nullable)
- `value_rating_percentile` (integer, nullable)
- `avg_bench` (number, nullable)
- `avg_bench_percentile` (integer, nullable)
- `avg_bench_low` (number, nullable)
- `avg_bench_high` (number, nullable)
- `market_share` (number, nullable)
- `market_share_percentile` (integer, nullable)
- `age_months` (integer, nullable)
- `age_months_percentile` (integer, nullable)
- `extra_metrics` (array) (default: [])
  - `@type` (string) (default: "UserbenchmarkMetric")
  - `key` (string, nullable)
  - `label` (string, nullable)
  - `value` (number, nullable)
  - `value_text` (string, nullable)
  - `percentile` (integer, nullable)
  - `range_low` (number, nullable)
  - `range_high` (number, nullable)

## Errors

### 422 — Validation Error

A metric or facet key does not exist on the chosen component_type

What to do: Check the fields against this schema. A URN with the wrong prefix is the most common cause.

- `detail` (array)
  - `loc` (array, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (object)

### 408

The request ran past its time limit

What to do: Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.

### 412

No component matched the class and filter combination

What to do: Retrying will not help: either the entity does not exist, or the input points at a different one.

### 429

Too many requests: a rate limit or a usage window is exhausted

What to do: When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.

### 500

Something broke on our side

What to do: Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.

### 529

Rate limit reached, or the endpoint is overloaded

What to do: Wait at least 30 seconds, then retry.

## Response envelope

Success: Array of objects (may be empty if no results)

Error: Error may coexist with partial results if it occurs mid-execution. Check X-Error header and status code.

Every response carries these headers:

- `X-Error` — Error message text (present only on error)
- `X-Request-ID` — Unique request identifier
- `X-Execution-Time` — Execution time in seconds
- `X-Result-Count` — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.
- `X-Total-Available-Results` — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.
- `X-Warning` — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.
- `X-Retry-After` — Seconds to wait before retrying. Present only on 429.

