API to render HTML from RSS feed. Built for podcast feeds, powered by unjs/h3.
Note
Demo is available at: feedrender.git-projects.xyz
Some podcast services offer a RSS feed with HTML render if RSS feed is requested from a browser. These services (Acast, Ausha) are not open source and not free. This project is an attempt to create an open source alternative.
- ๐ป Render RSS feed as HTML on
/api/render
endpoint- ๐ง Option to return XML feed
- ๐๏ธ Option to return JSON response with HTML as string
- โ If crawler is not a browser, return original XML feed
- ๐๏ธ Return a JSON response with RSS feed parsed as objects on
/api/json
endpoint - ๐๏ธ Return a XML response with RSS feed on
/api/xml
endpoint
- Render RSS feed
- Add option for apple podcast banner
- Add color customization
- Add feeds options for subscribe button
- Add registering and token
- Add cache
- Better error handling
- Add tests
- Better locale support
- Add CORS support
Feedrender API offers some endpoints to execute different tasks.
To render RSS feed, you can use the /render
endpoint.
/api/render
Default behavior is to return HTML as page. You can use query parameters to change the response.
Query parameters
Name | Required | Type | Default | Description |
---|---|---|---|---|
url |
true | string |
undefined |
URL of RSS feed, allow base64 URL |
format |
false | html , json |
html |
Type of response, default html will render HTML page, json will give JSON response with HTML string |
Warning
If crawler is not a browser, response will be original XML feed.
Example: https://feedrender.git-projects.xyz/api/render?url=https://2hdp.fr/2HDP.xml
To parse RSS feed, you can use the /json
endpoint.
/api/json
Return a JSON response with Podcast
object represent RSS feed.
Query parameters
Name | Required | Type | Default | Description |
---|---|---|---|---|
url |
true | string |
undefined |
URL of RSS feed, allow base64 URL |
Example: https://feedrender.git-projects.xyz/api/json?url=https://2hdp.fr/2HDP.xml
To parse show XML from RSS feed, you can use the /xml
endpoint.
Note
Could be useful for RSS feed with only HTML render.
/api/xml
Return a JSON response with Podcast
object represent RSS feed.
Query parameters
Name | Required | Type | Default | Description |
---|---|---|---|---|
url |
true | string |
undefined |
URL of RSS feed, allow base64 URL |
Example: https://feedrender.git-projects.xyz/api/xml?url=https://feedpress.me/rdvjeux
You can use docker compose
or docker
to run the application.
Create .env
file
cp .env.example .env
Docker compose will use the .env
file to set environment variables.
docker compose up -d
Build and run the docker image
docker build -t feedrender-app:latest .
docker run -it -p 3000:3000 feedrender-app:latest
Download dependencies
pnpm i
Create .env
file
cp .env.example .env
Run dev server
pnpm dev
Go to localhost:3000
Build application
pnpm build
Local preview
pnpm start
You can use PM2 to run application in production.
Run tests
pnpm test
unjs
: forunjs/h3
,unjs/ofetch
andunjs/listhen
fast-xml-parser
: for XML parsingvue
: for render functions used to render HTML