<!-- https://developers.silktide.com/v1/governance/scores/get-scores | Governance / Scores -->

# Get a website's Silktide 4 scores

`GET /v1/results/scores`

Returns every Silktide 4 score of a website or one of its sections, each as
its latest value in the period. With no `period`, that is the latest score
there is.

This is for accounts that have Silktide 4. An account that has only
Silktide 5 gets an `EditionNotAvailable` error; it reads
[Get a website's Silktide 5 scores](https://developers.silktide.com/v1/governance/scores/get-module-scores.md)
instead. [Scores](https://developers.silktide.com/v1/concepts/scores.md) explains which to use.

Scores are out of 100 and keep one decimal place. Older documentation said
they were whole numbers; read them as numbers either way. A score Silktide
cannot work out for this website, such as PDF accessibility on a website with
no PDFs, is `null`.

Websites do not all have the same scores, so read them by id. Use an id with
[Get how a Silktide 4 score changed](https://developers.silktide.com/v1/governance/scores/get-score-trend.md)
to see how it changed.

## Request

### Query parameters

- `websiteId` (integer, required, at least 1): The website.
- `sectionId` (integer, optional): A section of the website. Defaults to `0`, the whole website.
- `period` (string, optional): The date range. Defaults to `all`. The spaced forms (`-7 days`, `month to date`) are older names that keep working. `custom` needs `from` and `to`. One of: `all`, `today`, `last-7-days`, `last-30-days`, `last-90-days`, `month-to-date`, `last-month`, `year-to-date`, `last-12-months`, `custom`, `-7 days`, `-30 days`, `-90 days`, `-1 month`, `month to date`, `year to date`, `-12 months`.
- `from` (string, optional): With `period=custom`, the first day, such as `2026-10-01`.
- `to` (string, optional): With `period=custom`, the last day.
- `timezone` (string, optional): The IANA time zone days are read in, such as `America/New_York`. Defaults to `UTC`.

## Response

Status `200`.

- `result` (object, required): The answer.
  - `scores` (map of numbers, required): Each score by id, such as `overall` or `wcag-22-aa`, out of 100 to one decimal place. Null when it cannot be scored.
- `selector` (string, required): The query that answered, as its path: `/v1/results/scores`.
- `duration` (number, required): Seconds Silktide took to answer.

## Errors

| Status | Type | When |
| --- | --- | --- |
| 404 | `ModelNotFound` | No website or section with that id exists in the account, or the API key's user cannot see it. |
| 200 | `InvalidContext` | No `websiteId` was sent. The body is an error despite the status. |
| 200 | `InvalidArgument` | `period` is not one of its values. The body is an error despite the status. |
| 200 | `EditionNotAvailable` | The account does not have Silktide 4. Its `status` is `403`, and `instead` names `/v1/results/module-scores`. The body is an error despite the status. |
| 401 | `NotLoggedIn` | No API key was sent, or it is not a key for this region. |
| 429 | `TooManyRequests` | Too many requests to this path in five seconds. Retry after the number of seconds in the `Retry-After` header, which `properties.retryAfter` repeats. |
| 503 | - | Silktide is busy. Retry after the number of seconds in the `Retry-After` header. |

## Access

- Permission: any user of the account
- Plan feature: none
- Edition: Silktide 4 only
- Cost: free
- Stability: stable, since 1.0.0

## Example: A website's latest Silktide 4 scores

```bash
curl "https://api.eu.silktide.com/v1/results/scores?websiteId=2" \
  -H "Authorization: silktide token=$SILKTIDE_API_KEY"
```

Response:

```json
{
  "result": {
    "scores": {
      "content": 70.1,
      "mobile": 100,
      "overall": 80.8,
      "wcag-22-aa": 97.8,
      "wcag-22-pdf": null
    }
  },
  "selector": "/v1/results/scores",
  "duration": 0.009
}
```
