RSSHub Documentation

website·Indexed 36 days ago

https://docs.rsshub.app/

Documentation for RSSHub, an open-source RSS feed generator. It includes guides on deploying via Docker, configuring environment variables, and creating new RSS routes using TypeScript. The docs cover advanced feed fundamentals, date handling, caching, and API usage for developers and contributors.

Tokens
16.9K
Snippets
78
Records
128
Agent score
71%

What's inside RSSHub

  1. Understand how RSSHub works

    RSSHub acts as a bridge that fetches data from original websites upon request and outputs the content in RSS format. It utilizes caching to minimize the number of requests sent to the original sites.
  2. Deploy RSSHub using Sealos, PikaPods, or Play with Docker

    RSSHub can be deployed via several managed platforms:

    • Sealos: Provides a template including Redis caching, Browserless, persistent Redis storage, and HTTPS.
    • PikaPods: A paid hosting option with automatic updates.
    • Play with Docker (PWD): A free environment for testing routes or avoiding IP limits. Note that PWD instances last for a maximum of 4 hours and require a DockerHub account. If the port is not auto-detected, manually open port 1200.
  3. Enable full-text content and summaries

    Use these parameters to modify the depth of the content provided in the feed:

    • mode=fulltext: Enables full-text content for supported routes.
    • brief={number}: Generates a brief pure-text introduction limited to the specified number of characters (must be $\ge 100$).
    • chatgpt=true: Generates a summary using ChatGPT (requires OPENAI_API_KEY environment variable to be set on the server).
    # Fulltext mode
    https://rsshub.app/bilibili/user/article/334958638?mode=fulltext
    
    # 100 character brief
    https://rsshub.app/route?brief=100
    
    # ChatGPT summary
    /meituan/tech/home?chatgpt=true
  4. Map websites to feeds using RSSHub Radar

    The Radar function maps standard website addresses to their corresponding RSSHub feed addresses. You can retrieve the supported radar rules from an instance API (e.g., https://rsshub.app/api/radar/rules).

    To use Radar, you must use a compatible tool:

    • Browser Extension: RSSHub Radar
    • iOS App: RSSBud
    • Android App: RSSAid
    • RSS Reader: Folo
    • Dify Plugin: RSSHub Dify Plugin
  5. Understand how RSSHub Radar works

    RSSHub Radar identifies RSS feeds for a current page using a two-step process: first, it searches for built-in RSS via the page's link tags; second, it checks for applicable RSSHub routes based on a set of remotely updated rules.
  6. Use RSSHub with Folo AI RSS reader

    RSSHub can be used in conjunction with Folo, an AI-powered RSS reader designed for smarter content discovery, shared instances, and modern reading workflows.
  7. Contribute to RSSHub via Pull Requests or Bug Reports

    Developers can contribute improvements or bug fixes to RSSHub by submitting a pull request to the GitHub repository. Non-developers can contribute by reporting bugs via GitHub Issues.
  8. Create a Media RSS feed

    To create a Media RSS feed compatible with Media RSS software, include a media object within each item containing content (URL and MIME type) and thumbnail information.
    return {
        item: [
            {
                media: {
                    content: {
                        url: '...', // URL of the media content
                        type: 'audio/mpeg', // MIME type of the media content
                    },
                    thumbnail: {
                        url: '...', // URL of the thumbnail image
                    },
                    // Additional media properties can be added here
                },
            },
        ],
    };
  9. Request a new RSSHub route

    If a desired website is not supported, you can:

    • Submit a pull request if you are a JavaScript developer.
    • Submit a new issue using the provided issue template on GitHub.
  10. Format RSS feed fields for reader compatibility

    To ensure compatibility across all RSS readers, avoid including linebreaks, consecutive whitespace, or leading/trailing whitespace in the following fields: title, subtitle (Atom only), author (Atom only), item.title, and item.author. It is recommended to trim these fields before outputting.

    For item.content.html, convert any intended linebreaks to <br> tags, as RSS readers may otherwise trim them. This is especially important when extracting content via Cheerio or from JSON data.

  11. Deploy RSSHub to Google App Engine Flexible Environment

    To deploy RSSHub to the Google App Engine (GAE) flexible environment, create an app.yaml file in the root directory. This configuration uses a custom runtime and specifies resource limits (CPU, memory, and disk) to manage costs. It maps ports 80 and 443 to the application port 1200.
    runtime: custom
    env: flex
    manual_scaling:
        instances: 1
    resources:
        cpu: 1
        memory_gb: 0.5
        disk_size_gb: 10
    network:
        forwarded_ports:
            - 80:1200
            - 443:1200
    env_variables:
        CACHE_EXPIRE: '300'
  12. Optimize Puppeteer performance with request interception

    To prevent Puppeteer from loading unnecessary resources like images and fonts—which consume CPU and memory—enable request interception. This must be configured before calling page.goto(). Use lowercase strings when comparing request.resourceType() values.
    await page.setRequestInterception(true);
    page.on('request', (request) => {
        request.resourceType() === 'document' ? request.continue() : request.abort();
    });