# Get one request record

> Returns one record by request id (the `X-Request-Id` / `request_id` you received).

Source: https://docs.spicrawl.com/api-reference/requests/requests-get

## GET /v1/requests/{id}

Operation ID: `requestsGet`. API key scope: `none`.

Returns one record by request id (the `X-Request-Id` / `request_id` you received). Scoped to the key's
organization: a record made in the key's own project needs no scope, and one made in another project
of the organization needs the `read` scope, the same rule as `all_projects=true` on the list (this
route takes no parameter for it). Expired, never-existed, another project's without `read`, and
unreadable records all answer 404 `ERR::REQUEST::NOT_FOUND`; a malformed id answers 400.

### Example

```bash
curl "https://api.spicrawl.com/v1/requests/{id}" \
  -H "Authorization: Bearer $SPICRAWL_API_KEY"
```

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | Request id, as a 26-character ULID or a UUID. |

### Responses

#### 200

The record.

`application/json`.

| Field | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Request id; the same value as the `X-Request-Id` header and problem `request_id`. |
| `created_at` | string (date-time) | yes | When the request arrived, RFC 3339 with fractional seconds, UTC. |
| `project_id` | string | yes | Project whose API key made the request. Always present; tells rows apart in an `all_projects=true` list. |
| `engine` | string | yes | Engine that served it, e.g. `fetch`, `obscura`, `chromium`, `camoufox`. May be empty for requests refused before an engine was chosen. |
| `status` | string: `success`, `failed`, `timeout`, `blocked`, `rejected`, `cancelled` | yes | Terminal outcome. Only `success` is ever charged. |
| `http_status` | integer | no | Target's HTTP status. Absent when no response was received. |
| `error_code` | string | no | Problem code returned to the caller, e.g. `ERR::UPSTREAM::CHALLENGE`. Absent on success. |
| `error_detail` | string | no | The problem detail sentence the caller received (may be truncated). Read it for the specific cause. |
| `attempts` | integer | no | Dispatch attempts including retries. Absent when zero. |
| `url` | string | yes | Target URL as requested. |
| `url_host` | string | no | Target host. Absent when unknown. |
| `proxy` | object (`RequestLogProxy`) | yes | What was requested versus what actually served. Never contains an exit IP or credentials. Every field is absent when unknown. |
| `spans` | object (`RequestLogSpans`) | yes | Latency breakdown in milliseconds. Every field is always present; null means the stage was not measured, which is different from 0. Spans are measured by different processes and do not sum to `total_ms`. |
| `blocked` | object (`RequestLogBlock`) | no | Present only when a bot challenge was detected. Use `vendor` to pick a countermeasure (e.g. stealth engine or residential exit). |
| `bytes_in` | integer (int64) | no | Bytes received from the target. Absent when zero. |
| `bytes_out` | integer (int64) | no | Bytes sent to the target. Absent when zero. |
| `proxy_bytes` | integer (int64) | no | Bytes carried through a proxy exit. Absent when zero. |
| `credits_micro` | integer (int64) | yes | Credits charged in micro-credits (1 credit = 1000000). Always 0 for non-success statuses. |
| `features` | object | no | Features the request used, as recorded by the router. Free-form; absent when none. |

#### 400

The request is invalid. Not retryable; fix the request using `code` and `diagnostics.hint`.

Headers: `X-Request-Id`.

`application/problem+json` (`Problem` schema).

#### 401

Missing, invalid, revoked or expired key. Not retryable with the same key.

Headers: `X-Request-Id`.

`application/problem+json` (`Problem` schema).

#### 403

The key lacks the scope this route requires (`ERR::AUTH::INSUFFICIENT_SCOPE`), or the action is not permitted.

Headers: `X-Request-Id`.

`application/problem+json` (`Problem` schema).

#### 404

No such resource for this key's organization.

Headers: `X-Request-Id`.

`application/problem+json` (`Problem` schema).

Full OpenAPI spec: https://docs.spicrawl.com/openapi.yaml
