---
title: "GET /v1/jobs/{jobId}/extract/pdb"
description: "Read a PDB file from a job's ZIP output"
full: true
---

**Auth:** required. Send an `ivy_` API key (`Authorization: Bearer ivy_…` or `X-Ivy-Api-Key`), a Clerk session JWT (`Authorization: Bearer …`) or the Clerk `__session` cookie (browser sessions). See [Authentication](/docs/api/authentication).

Returns the text of the first `.pdb` file in the job's ZIP output, or the file you name with `filename`. The response also lists every file in the ZIP. The response is marked `private, no-store`.

This route works only for the job's owner; a project member who is not the owner gets 403. A job outside a project-scoped API key's projects returns 404. Only `GET` is served.

## Request

#### Path parameters

- `jobId` (string (uuid)) —
Job UUID.

#### Query parameters

- `filename` (string) —
Name of the `.pdb` file to return. Defaults to the first one in the ZIP.

## Responses

### `200` OK

The extracted file

Response shape:

- `success` (enum (true)) —

- `filename` (string) —

- `size_bytes` (integer) —
Length of `pdb_content` in characters

- `pdb_content` (string) —

- `available_files` (string[]) —
Every file in the ZIP

### `400` Bad Request

The job id is empty

Response shape: `object`

### `401` Unauthorized

Authentication required

Response shape: `object`

### `403` Forbidden

You are not the job's owner

Response shape: `object`

### `404` Not Found

The job does not exist or is outside your API key's project scope; the job has no ZIP output; or the ZIP has no `.pdb` file (or none with the given name)

Response shape: `object`

### `405`

The method is not `GET`; the `Allow` header says `GET`

Response shape: `object`

### `413`

The ZIP is too large to process

Response shape: `object`

### `429` Too Many Requests

Rate limit exceeded

Response shape: `object`

### `500` Internal Server Error

Extraction failed

Response shape: `object`

### `502` Bad Gateway

The ZIP download link could not be obtained, or the ZIP could not be downloaded

Response shape: `object`

**curl**

```bash
curl -X GET 'https://ivybiosciences.com/api/v1/jobs/{jobId}/extract/pdb' \
  -H "Authorization: Bearer $IVY_API_KEY"
```

**JavaScript**

```js
const res = await fetch('https://ivybiosciences.com/api/v1/jobs/{jobId}/extract/pdb', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.IVY_API_KEY}`,
  },
});
const data = await res.json();
```

**Python**

```python
import os, requests

res = requests.get(
    "https://ivybiosciences.com/api/v1/jobs/{jobId}/extract/pdb",
    headers={"Authorization": f"Bearer {os.environ['IVY_API_KEY']}"},
)
data = res.json()
```
