# Substack Posts (`substack.posts`)

Latest posts of a Substack publication from its public RSS feed: title, link, date, author, excerpt.

- **Route:** `POST /v1/run/substack.posts`
- **Price:** $0.001 per request ($1.00 per 1,000) · `cost_usd` on every response
- **Source:** Publication RSS feed (`rss`) · failover: no
- **Measured latency:** not enough calls measured yet
- **Heavy response:** no

## Input

| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| `publication` | string | yes |  | Subdomain (e.g. 'platformer'), *.substack.com URL or custom domain |
| `limit` | integer | no | 20 |  |

## Output (`output` in the run envelope)

| Field | Meaning |
|---|---|
| `posts` | Title, URL, date, author, subtitle and a 600-character excerpt. |

## Example

```bash
curl -s -X POST https://getallapis.com/v1/run/substack.posts \
  -H "Authorization: Bearer $GETALLAPIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"publication":"on"}'
```

```python
from getallapis_client import Client
client = Client()  # reads GETALLAPIS_API_KEY
result = client.run('substack.posts', {'publication': 'on'})
print(result['cost_usd'], result['output'])
```

```bash
getallapis run substack.posts '{"publication":"on"}'
```

Quote first (free, validates input): `POST /v1/quote/substack.posts` with the same body.
