# /userbenchmark/components

`POST /api/userbenchmark/components`

Price: 10 credits

Fetch one UserBenchmark aggregate component page by its rating id, across every hardware class the site covers — processors, graphics cards, solid-state drives, hard drives, memory kits and USB drives. Returns which class the component belongs to, the full product name, the manufacturer, the model, the part number the site files it under, its average benchmark percentage, its rank inside the class and the size of that class, how many user submissions the aggregate is built on, and every sub-benchmark the class measures with its 5th-percentile, average and 95th-percentile values and its percentage score. Processors additionally carry the gaming, desktop and workstation scores. Where the page prints them it also returns the vendor specification table in the source's own groups — core and thread counts, cache, lithography, clock and turbo frequency, bus speed, instruction-set extensions, thermal design power, launch date, code name and the vendor's recommended price — and the site's own hands-on review, with its headline model and specified read and write speeds, and each review section's heading, text and photograph.

## How to use it

The id comes from a /userbenchmark/components/search row whose `page_type` is `rating`; a `speedtest` row is a submission the site never aggregated, so its id is null and there is nothing to pass here. One id space covers all six classes, so the id alone identifies the component and the returned `component_type` tells you which class it turned out to be — you do not need to know it in advance. `usage_scores` are published for processors only, so an empty list on a drive or a memory kit is the source's shape and not a miss. Sub-benchmark names differ by class (Read/Write/4K for storage, Lighting/MRender/Splatting for graphics cards, 1-Core/8-Core for processors), and `benchmark_groups` keeps the source's own grouping, whose `percent` is the group score the site shows under each block. `name` is the site's full catalogue string including the part number, while `model` is the short name the search endpoint returns, so match on `model` when joining the two. `specifications` and `review` are published for part of the catalogue rather than all of it: over 15 pages spread down each of the six class rankings, the specification table appeared on 7 processor pages and on no page of the other five classes, and the hands-on review on 6 USB-drive pages and on none elsewhere, so an empty list and a null are what an unreviewed component looks like, not a miss — the review's benchmark numbers live in its section text and screenshots, not as parsed values.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `id` (string, required) — Aggregate page id, the number after /Rating/ in the component's address. A full Rating URL is accepted and reduced to the id, and a plain integer is accepted too (examples: "4191", 4191, "https://cpu.userbenchmark.com/AMD-Ryzen-7-9800X3D/Rating/4191"; minLength: 1)

## Response

### 200 — Successful Response

- `@type` (string) (default: "UserbenchmarkComponentDetail")
- `id` (string, nullable)
- `component_type` (string, nullable)
- `alias` (string, nullable)
- `url` (string, nullable)
- `name` (string, nullable)
- `brand` (string, nullable)
- `model` (string, nullable)
- `part_number` (string, nullable)
- `image` (string, nullable)
- `avg_bench` (number, nullable)
- `rank` (integer, nullable)
- `rank_total` (integer, nullable)
- `samples` (integer, nullable)
- `usage_scores` (array) (default: [])
  - `@type` (string) (default: "UserbenchmarkUsageScore")
  - `name` (string, nullable)
  - `percent` (number, nullable)
- `benchmark_groups` (array) (default: [])
  - `@type` (string) (default: "UserbenchmarkBenchmarkGroup")
  - `percent` (number, nullable)
  - `points` (number, nullable)
  - `points_text` (string, nullable)
  - `benchmarks` (array) (default: [])
    - `@type` (string) (default: "UserbenchmarkBenchmark")
    - `name` (string, nullable)
    - `percent` (number, nullable)
    - `value` (number, nullable)
    - `value_text` (string, nullable)
    - `min` (number, nullable)
    - `max` (number, nullable)
- `specifications` (array) (default: [])
  - `@type` (string) (default: "UserbenchmarkSpecGroup")
  - `name` (string, nullable)
  - `specs` (array) (default: [])
    - `@type` (string) (default: "UserbenchmarkSpec")
    - `name` (string, nullable)
    - `value` (string, nullable)
- `review` (object, nullable)
  - `@type` (string) (default: "UserbenchmarkReview")
  - `headline` (string, nullable)
  - `sections` (array) (default: [])
    - `@type` (string) (default: "UserbenchmarkReviewSection")
    - `anchor` (string, nullable)
    - `name` (string, nullable)
    - `text` (string, nullable)
    - `image` (string, nullable)

## Errors

### 422 — Validation Error

The id was neither a number nor a Rating URL

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 aggregate page carries that id

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.

