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

# Get Dataset Article

GET https://api.filesearch.dev/v2/datasets/{dataset}/{url}

Get a full article from a supported news dataset.

Contact your Account Executive for available datasets.

**Headers:**

* `Authorization`: Bearer \{api\_key} - Captain API key for authentication
* `X-Organization-ID`: Organization UUID

**URL Path:**

* `dataset`: The dataset name
* `url`: Full article URL appended to the path

**Returns:**
Article data including title, author, date, and full content in markdown format.

**Example:**

```
GET /v2/datasets/latimes/https://www.latimes.com/example/news_example.html
```

Reference: https://docs.filesearch.dev/reference/datasets/articles/get-dataset-article

## Request

### Path parameters

- `dataset` (string, required) — The news dataset to get articles from
- `url` (string, required) — Full URL of the article to get (URL-encoded)

## Response

### 200

Successful Response

- `dataset` (string, required)
- `url` (string, required)
- `author` (string, optional, nullable)
- `chars` (integer, optional, nullable)
- `content` (string, optional, nullable) — Full article content in markdown format
- `date` (string, optional, nullable)
- `error` (string, optional, nullable) — Error message if request failed
- `title` (string, optional, nullable)

## Errors

### 400 Bad Request Error

Invalid dataset or URL

- `error` (string, required)
- `message` (string, required)
- `details` (ErrorResponseV2Details, optional, nullable)
- `path` (string, optional, nullable)
- `success` (boolean, optional, default: false)

### 401 Unauthorized Error

Missing or invalid API key

- `error` (string, required)
- `message` (string, required)
- `details` (ErrorResponseV2Details, optional, nullable)
- `path` (string, optional, nullable)
- `success` (boolean, optional, default: false)

### 403 Forbidden Error

API key does not belong to organization

- `error` (string, required) — `datasets_access_denied` when the organization is not entitled to the dataset, `HTTP_ERROR` otherwise.
- `message` (string, required) — What went wrong.
- `path` (string, required) — The request path.
- `reason` (string, optional) — Why access was denied, for example `not_enabled`. Present only on `datasets_access_denied`.
- `status_code` (integer, optional) — The HTTP status code. Present only on `HTTP_ERROR`.

### 500 Internal Server Error

Internal server error

- `error` (string, required)
- `message` (string, required)
- `details` (ErrorResponseV2Details, optional, nullable)
- `path` (string, optional, nullable)
- `success` (boolean, optional, default: false)

### 503 Service Unavailable Error

Dataset fetcher not available

- `error` (string, required)
- `message` (string, required)
- `details` (ErrorResponseV2Details, optional, nullable)
- `path` (string, optional, nullable)
- `success` (boolean, optional, default: false)

## Types

### ErrorResponseV2Details

## Examples

**Response**

```json
{
  "dataset": "dataset_name",
  "url": "https://www.example.com/2025/01/15/politics/example-article",
  "author": "Staff Reporter",
  "chars": 4250,
  "content": "The full article content in markdown format...",
  "date": "2025-01-15",
  "title": "Example Political Analysis"
}
```

**SDK Code**

```python Python REST
import requests
import json
from urllib.parse import quote

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

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

article_url = "https://www.example.com/2025/01/15/politics/example-article"

response = requests.get(
    f"{BASE_URL}/v2/datasets/dataset_name/{quote(article_url, safe='')}",
    headers=headers,
    timeout=30.0
)

if response.status_code == 200:
    article = response.json()
    print(f"Title: {article['title']}")
    print(f"Author: {article['author']}")
    print(f"Content: {article['content'][:500]}...")
```

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

const articleUrl = encodeURIComponent("https://www.example.com/2025/01/15/politics/example-article");
const response = await fetch(
    `${BASE_URL}/v2/datasets/dataset_name/${articleUrl}`,
    {
        headers: {
            "Authorization": `Bearer ${API_KEY}`,
        }
    }
);

if (response.ok) {
    const article = await response.json();
    console.log(`Title: ${article.title}`);
    console.log(`Author: ${article.author}`);
    console.log(`Content: ${article.content?.slice(0, 500)}...`);
} else {
    console.error(`Error: ${response.status}`);
}
```