# Poll an options run

> A structure run's state: running, done with its result, or error with the credits refunded.

Source: https://firmtape.com/docs/developers/lab/options-job

A structure run's state: running, done with its result, or error with the credits refunded.

`GET /api/struct/job`

Plan LAB · Key scope lab · Limit Credits; one idea on the conveyor at a time · Version 1.0.0 · Since 2026-08-31

**This endpoint serves:** [LIVE: The archive run](https://firmtape.com/docs/live#archive-run). **Plan:** [LAB](https://firmtape.com/features/lab). LAB credits: developing an idea is free, a backtest or an optimize pass is one credit, the desk is free once an idea is tested. LIVE includes 5 credits a month.

## Parameters

| Name | What it does | Default | Error |
| --- | --- | --- | --- |
| `id` (required) query, string | The job named by /api/struct/run |  |  |

## Response

`{ state, result? , error?, refunded? }`.

| Field | Meaning | Unit |
| --- | --- | --- |
| `state` (string) | `running`, `done` or `error`. |  |

## Errors

| Status | Code | What to do |
| --- | --- | --- |
| 404 |  | No such idea or job. Check the id. |

## Request

```sh
curl \
  -H "Authorization: Bearer $FIRMTAPE_LAB_KEY" \
  "https://firmtape.com/api/struct/job?id=p_4f2a9c"
```

```python
import os, requests

H = {"Authorization": f"Bearer {os.environ['FIRMTAPE_LAB_KEY']}"}
r = requests.get("https://firmtape.com/api/struct/job?id=p_4f2a9c", headers=H)
print(r.status_code, r.text[:500])
```

```js
const r = await fetch("https://firmtape.com/api/struct/job?id=p_4f2a9c", {
  method: "GET",
  headers: { Authorization: `Bearer ${process.env.FIRMTAPE_LAB_KEY}` },
});
console.log(r.status, await r.text());
```

## Changes

- 2026-08-31: Added.
