Webhooks

When you subscribe to feeds, we will constantly monitor those feeds for any new entries. Whenever there is one or more new entry in the feed, we will immediately send out a POST-Request to your Webhook URL.

Set Webhook URL

Before you can subscribe to feeds, you need to set a Webhook URL once. This webhook URL will apply to the whole Application.

There are two ways you can use to set your Webhook URL: via API or via the RSS API Dashboard.

The easiest way to do it is via the Dashboard: Visit https://app.rssapi.net and log int. Then select the Application you want to use and click on "Settings". Here you can set your Webhook URL and click "save".

Here's how you do the same via API:

Endpoint

https://api.rssapi.net/v1/apikey/setwebhook

Parameters

  • url string required
    • The URL of your Webhook endpoint on your server

Example

https://api.rssapi.net/v1/apikey/setwebhook?url=https://example.com/webhook_receiver

Response:

{
  "ok": true,
  "result": {
    "status": "Webhook URL updated",
    "feed_type": "https://example.com/webhook_receiver"
  }
}

The POST-Request we will send to you will always have a JSON body. Here is an example:

Example Webhook

Whenever there are one or more new entries in a feed you are subscribed too, we will send you a POST request to the Webhook URL you defined. The JSON Body of such a webhook will look like this:

{
  "webhook_from": "rssapi.net",
  "webhook_reason": "new entries in feed",
  "new_entries_count": 2,
  "subscription_id": 22798,
  "last_webhook_response": 200,
  "is_retry": false,
  "info": "Your subscription info",
  "feed": {
    "title": "NASA Breaking News",
    "description": "A RSS news feed containing the latest NASA news articles and press releases.",
    "homepage": "http://www.nasa.gov/",
    "feed_url": "https://www.nasa.gov/rss/dyn/breaking_news.rss",
    "additional_details": {
      "language": "en-us",
      "categories": [],
      "authors": [],
      "copyright": null
    }
  },
  "new_entries": [
    {
      "title": "NASA Astronauts to Call Indiana, Texas, Virginia Students from Space",
      "link": "http://www.nasa.gov/press-release/nasa-astronauts-to-call-indiana-texas-virginia-students-from-space",
      "description": "Students across the country will have three opportunities to hear from NASA astronauts aboard the International Space Station.",
      "content": {
        "text": "Example content",
        "html": "<p>Example content</p>"
      },
      "guid": "http://www.nasa.gov/press-release/nasa-astronauts-to-call-indiana-texas-virginia-students-from-space",
      "image": {
        "url": "https://www.nasa.gov/sites/default/files/styles/full_width/public/thumbnails/image/iss066e077280_0.jpg",
        "width": 985,
        "height": 657
      },
      "additional_details": {
        "language": NULL,
        "categories": [],
        "authors": [
          {
            "name": "John Doe",
            "url": NULL,
            "avatar": NULL,
            "email": NULL
          }
        ],
        "copyright": NULL
      },
      "time": "Fri, 04 Feb 2022 20:13:00 +0000",
      "timestamp": 1644005580
    },
    {
      "title": "NASA Invites Media to Learn About Mission Studying Snowstorms",
      "link": "http://www.nasa.gov/press-release/nasa-invites-media-to-learn-about-mission-studying-snowstorms",
      "description": "NASA will hold a briefing for members of the media to learn more about an airborne science campaign studying snowstorms at 11 a.m. EST Thursday, Feb. 10. The agency will stream audio of the call live online.",
      "content": {
        "text": "Example content",
        "html": "<p>Example content</p>"
      },
      "guid": "http://www.nasa.gov/press-release/nasa-invites-media-to-learn-about-mission-studying-snowstorms",
      "image": {
        "url": "https://www.nasa.gov/sites/default/files/styles/full_width/public/thumbnails/image/afrc2016-0105-15-er3_0.jpeg",
        "width": 985,
        "height": 657
      },
      "additional_details": {
        "language": NULL,
        "categories": [],
        "authors": [
          {
            "name": "John Doe",
            "url": NULL,
            "avatar": NULL,
            "email": NULL
          }
        ],
        "copyright": NULL
      },
      "time": "Fri, 04 Feb 2022 16:53:00 +0000",
      "timestamp": 1643993580
    }
  ]
}