# /protocolsio/protocols

`POST /api/protocolsio/protocols`

Price: 5 credits

Get one protocols.io protocol by its slug, versioned slug, numeric id or URL, with the full step-by-step procedure, reagents and equipment, authors and affiliations, funders, keywords, DOI and usage counts

## How to use it

Resolve one laboratory or computational protocol. The slug, the versioned slug, the numeric id and the protocol URL all resolve the same record; pass the versioned form to pin a version. Read `is_metadata_only` before using the answer: most of the corpus is imported from publishers, and such a record returns title, authors, DOI and keywords with `steps` empty and no usage counts, because the procedure itself lives with the publisher. A step count quoted by protocolsio/protocols/search counts the steps in the original publication, not steps this endpoint can return. Rich text arrives as plain text with the source's line breaks preserved.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `protocol` (string, required) — protocols.io slug, versioned slug, numeric id or protocol URL. All four forms resolve the same record; a versioned slug pins that version. (examples: "crispra-i-screen-for-targeted-activation-or-repres-ewov1e9r2gr2/v1", "pcr-d88z9zx6", "322521", "https://www.protocols.io/view/pcr-d88z9zx6"; minLength: 1)
- `with_steps` (boolean) — Include the step-by-step procedure. Records imported from a publisher carry no steps whatever this is set to. (default: true)

## Response

### 200 — Successful Response

- `@type` (string) (default: "ProtocolsioProtocol")
- `id` (string, required)
- `alias` (string, nullable)
- `version_alias` (string, nullable)
- `url` (string, nullable)
- `doi` (string, nullable)
- `description` (string, nullable)
- `before_start` (string, nullable)
- `warning` (string, nullable)
- `guidelines` (string, nullable)
- `disclaimer` (string, nullable)
- `ethics_statement` (string, nullable)
- `acknowledgements` (string, nullable)
- `manuscript_citation` (string, nullable)
- `materials_text` (string, nullable)
- `image_attribution` (string, nullable)
- `retraction_reason` (string, nullable)
- `citation` (string, nullable)
- `keywords` (array) (default: [])
- `status` (string, nullable)
- `image` (string, nullable)
- `authors` (array) (default: [])
  - `@type` (string) (default: "ProtocolsioAuthor")
  - `name` (string, required)
  - `first_name` (string, nullable)
  - `last_name` (string, nullable)
  - `alias` (string, nullable)
  - `affiliation` (string, nullable)
  - `affiliation_url` (string, nullable)
  - `profile_url` (string, nullable)
  - `note` (string, nullable)
  - `is_verified` (boolean, nullable)
- `creator` (object, nullable)
  - `@type` (string) (default: "ProtocolsioAuthor")
  - `name` (string, required)
  - `first_name` (string, nullable)
  - `last_name` (string, nullable)
  - `alias` (string, nullable)
  - `affiliation` (string, nullable)
  - `affiliation_url` (string, nullable)
  - `profile_url` (string, nullable)
  - `note` (string, nullable)
  - `is_verified` (boolean, nullable)
- `groups` (array) (default: [])
  - `@type` (string) (default: "ProtocolsioGroup")
  - `id` (string, required)
  - `alias` (string, nullable)
  - `url` (string, nullable)
  - `is_public` (boolean, nullable)
- `funders` (array) (default: [])
  - `@type` (string) (default: "ProtocolsioFunder")
  - `name` (string, required)
  - `grant_id` (string, nullable)
- `materials` (array) (default: [])
  - `@type` (string) (default: "ProtocolsioMaterial")
  - `name` (string, required)
  - `vendor` (string, nullable)
  - `catalog_number` (string, nullable)
  - `rrid` (string, nullable)
  - `url` (string, nullable)
- `equipment` (array) (default: [])
  - `@type` (string) (default: "ProtocolsioMaterial")
  - `name` (string, required)
  - `vendor` (string, nullable)
  - `catalog_number` (string, nullable)
  - `rrid` (string, nullable)
  - `url` (string, nullable)
- `versions` (array) (default: [])
  - `@type` (string) (default: "ProtocolsioVersion")
  - `id` (string, required)
  - `alias` (string, nullable)
  - `version_alias` (string, nullable)
  - `doi` (string, nullable)
  - `published_at` (integer, nullable)
  - `updated_at` (integer, nullable)
- `steps` (array) (default: [])
  - `@type` (string) (default: "ProtocolsioStep")
  - `id` (string, required)
  - `number` (integer, nullable)
  - `text` (string, nullable)
  - `section` (string, nullable)
  - `section_color` (string, nullable)
  - `section_duration` (integer, nullable)
  - `duration` (integer, nullable)
  - `is_substep` (boolean, nullable)
  - `techniques` (array) (default: [])
- `translation_languages` (array) (default: [])
- `step_count` (integer, nullable)
- `view_count` (integer, nullable)
- `run_count` (integer, nullable)
- `fork_count` (integer, nullable)
- `comment_count` (integer, nullable)
- `bookmark_count` (integer, nullable)
- `export_count` (integer, nullable)
- `vote_count` (integer, nullable)
- `reagent_count` (integer, nullable)
- `equipment_count` (integer, nullable)
- `is_metadata_only` (boolean, nullable)
- `is_imported` (boolean, nullable)
- `import_source` (string, nullable)
- `is_research` (boolean, nullable)
- `is_retracted` (boolean, nullable)
- `is_unlisted` (boolean, nullable)
- `is_draft` (boolean, nullable)
- `is_public` (boolean, nullable)
- `is_content_warning` (boolean, nullable)
- `is_peer_reviewed` (boolean, nullable)
- `is_book_chapter` (boolean, nullable)
- `has_versions` (boolean, nullable)
- `has_references` (boolean, nullable)
- `has_step_reagents` (boolean, nullable)
- `created_at` (integer, nullable)
- `published_at` (integer, nullable)
- `updated_at` (integer, nullable)

## Errors

### 422 — Validation Error

The request body did not validate

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 protocol matches that slug, id or URL, or that protocol has no such version

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.

