> For a complete page index of the Captain API documentation, fetch https://docs.filesearch.dev/llms.txt?excludeSpec=true

# Get Patent File

GET https://api.filesearch.dev/v2/datasets/odyssey/patents/{entityId}/file

Get the document link for a patent by patent number. Returns a redirect to the patent PDF.

Reference: https://docs.filesearch.dev/reference/datasets/odyssey/patents/patents-get-file

## Request

### Path parameters

- `entityId` (string, required)

## Response

### 200

Successful Response

- `patent_id` (string, optional)
- `patent_url` (string, optional)
- `pdf_url` (string, optional)
- `source` (string, optional)
- `search_results` (list of OdysseyPatentsGetFileResponseSearchResultsItems, optional)

## Types

### OdysseyPatentsGetFileResponseSearchResultsItems

- `title` (string, optional)
- `url` (string, optional)

## Examples

**Response**

```json
{
  "patent_id": "CN113650574B",
  "patent_url": "https://patents.google.com/patent/CN113650574B/en",
  "pdf_url": "https://patents.google.com/patent/CN113650574B/en",
  "source": "google_patents",
  "search_results": [
    {
      "title": "Search for patents | USPTO",
      "url": "https://www.uspto.gov/patents/search"
    },
    {
      "title": "Google Patents",
      "url": "https://patents.google.com/"
    }
  ]
}
```

**SDK Code**

```python Python REST
import requests

BASE_URL = "https://api.filesearch.dev"
API_KEY = "your_api_key"

headers = {"Authorization": f"Bearer {API_KEY}"}

response = requests.get(
    f"{BASE_URL}/v2/datasets/odyssey/patents/CN113650574B/file",
    headers=headers,
    timeout=60.0
)
print(response.json())
```

```typescript TypeScript REST
const BASE_URL = "https://api.filesearch.dev";
const API_KEY = "your_api_key";

const response = await fetch(`${BASE_URL}/v2/datasets/odyssey/patents/CN113650574B/file`, {
    method: "GET",
    headers: { "Authorization": `Bearer ${API_KEY}` }
});
console.log(await response.json());
```