RSS / Atom feeds
Fetch any RSS, Atom, RDF or JSON feed URL and get it back as one normalized object, whatever the format.
Fetch any RSS, Atom, RDF or JSON feed URL and get it back as one normalized object, whatever the format.
At a glance
One GET endpoint, /v1/structured/rss. Give it any feed url and it fetches and parses the feed into one shape — { feed, items[] } — regardless of format. It answers { endpoint, url, credits, duration_ms, data }, and a feed it could not read is 502 TARGET_FAILED and costs nothing.
Four formats, one shape
RSS 2.0, RSS 1.0 / RDF, Atom and JSON Feed are detected automatically (by content type and root element) and mapped to the same fields, so feeds from different sites merge without per-site code.
Endpoint | What | Typical |
|---|---|---|
| Any feed URL, normalized to | about 1 million items per credit (a content-heavy feed costs more) |
- cURL
- Python
- Node.js
curl -G "https://api.scrapelyserp.com/v1/structured/rss" \
-H "Authorization: Bearer $SCRAPELY_API_KEY" \
--data-urlencode "url=https://www.nasa.gov/feed/" \
-d limit=20import os
import requests
HEADERS = {"Authorization": f"Bearer {os.environ['SCRAPELY_API_KEY']}"}
r = requests.get(
"https://api.scrapelyserp.com/v1/structured/rss",
headers=HEADERS,
params={"url": "https://www.nasa.gov/feed/", "limit": "20"},
timeout=30,
)
r.raise_for_status()
data = r.json()
for i in data["data"]["items"]:
print(i["published"], i["title"], i["link"])const res = await fetch(`https://api.scrapelyserp.com/v1/structured/rss?${new URLSearchParams({ url: 'https://www.nasa.gov/feed/', limit: '20' })}`, {
headers: { Authorization: `Bearer ${process.env.SCRAPELY_API_KEY}` },
signal: AbortSignal.timeout(30_000),
});
if (!res.ok) throw new Error((await res.json()).error.code);
const data = await res.json();
for (const i of data.data.items) console.log(i.published, i.title, i.link);The feed
Parameter | Type | Default | Description |
|---|---|---|---|
| string | — | The feed URL (RSS, Atom, RDF or JSON Feed), e.g. |
| integer |
| Most items to return, 1–200 (newest first, as the feed orders them). |
The feed object carries title, description, link (the site), feed_url, language, updated, generator, image, the detected format (rss, rdf, atom or json) and item_count.
Each item has id (its <guid> / Atom <id> / JSON Feed id, else the link), title, link, published (ISO 8601, with published_raw kept exactly as the feed wrote it), updated, summary, content_html (the full body), author, categories, enclosures (each { url, type, length }) and image. Relative links are resolved against the feed’s site, CDATA and HTML entities are decoded, and namespaced tags (dc:, content:, media:) are read whatever prefix the feed uses.
The url must be a public http(s) URL; a private, local or non-http(s) URL is a free 400. A URL that is not a recognised feed is a 404 NOT_FOUND.
Full reference → GET /v1/structured/rss