---
title: "Preview a feed"
method: POST
path: "/api/rss/preview"
---

# Preview a feed

`POST /api/rss/preview`

## Request

- Base URL: `https://postwire.io`
- URL: `https://postwire.io/api/rss/preview`
- Auth: HTTP bearer

Reads the feed (with the same protections) and returns its title, its newest items and what each network's post of the newest would read. Nothing is saved. 30 an hour.

## Request body

- object
  - `url` string, required: RSS 2.0, RSS 1.0 or Atom. http or https on ports 80, 443, 8080 or 8443; private, loopback, link-local and metadata addresses are refused (400 feed_url_blocked), also when a name resolves to one or a redirect points at one; at most 3 redirects, 8 seconds, 2 MB.
  - `platforms` string[]
  - `template` string: {title}, {link}, {summary}. Fitted to each network's limit as that network counts it: the summary is shortened first, then the title; the link is never cut.

## Response `200`

{ ok, url, kind, title, items_in_feed, items, posts: { <network>: { text, trimmed? } }, note }

## Other responses

- `400`: feed_url_blocked, bad_feed_url
- `422`: not_a_feed, feed_http_error, feed_timeout, feed_too_large, feed_too_many_redirects

---

[API](https://skmtc.dev/postwire/apis/postwire-api.md) · [All operations](https://skmtc.dev/postwire/apis/postwire-api/llms.txt) · [OpenAPI document](https://skmtc.dev/postwire/apis/postwire-api/revisions/513a409ab8f7?raw)
