How to Create RSS Feeds for Twitter

Twitter does not offer RSS Feeds so here is a simple workaround that you can use to generate RSS feeds for your various Twitter streams including Twitter search results, user timelines, favorites, lists and even the new Twitter collections.

RSS feeds are essential if you need to use your Twitter data elsewhere. For instance, you need RSS feeds to create recipes in IFTTT that get triggered when there’s a new @mention or a new tweet is added to search results. You can import your Twitter timeline automatically into your blog through RSS feeds. You can follow Twitter accounts in an RSS reader like Feedly or even Google Docs.

How to Create RSS Feeds in Twitter

There are two way to create RSS feeds for Twitter. You can either write a Twitter App or take a more simple alternative described here.

The trick is simple. Twitter offers JavaScript based widgets to help you embed user timelines and Twitter search results into your website.  What we’ll do is transform these HTML Twitter widgets into regular XML Feeds with the help of a Google Script. Here’s a step-by-step guide:

  1. On the Twitter website, go to Settings -> Widgets (link) and create a new widget. You can create widgets for user timelines, favorites, Twitter lists, collections and search results.
  2. Once the new widget is published, make a note of the widget ID which you can find in the URL of the widget. If you don’t have a widget ready yet, use 362462751664263169 for a sample widget ID.
  3. Click here to make a copy of the Google Script in your Google Drive. Open the script and choose Run -> Twitter_RSS to authorize the script. You’ve to do this only once.
  4. Inside the Script Editor, go to Publish -> Deploy as Web App and click the “Save New Version” button. Set Anyone, including Anonymous under Who has access to the app and hit Deploy.

Google Script will now create a unique URL for your RSS web app that will look something like https://script.google.com/macros/s/ABCD/exec.

Just append the Twitter Widget ID (created in Step 2) to this URL and your RSS feed for Twitter is ready. For instance, if the Twitter widget ID is 123456, your RSS Feed URL would be:

https://script.google.com/macros/s/ABCD/exec**?123456**

The Twitter RSS feed will have all details about the tweet including the date when that tweet was posted, the full name, user name and profile picture of the Twitter user and the actual text of the tweet. Should you wish to create another RSS Feed for Twitter, just add another widget inside Twitter and use that new widget’s ID with the same Google Script URL.

Related tutorial: Archive Tweets to Google Sheets

Amit Agarwal

Amit Agarwal

Google Developer Expert, Google Cloud Champion

Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.

Amit has developed several popular Google add-ons including Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory

0

Awards & Titles

Digital Inspiration has won several awards since it's launch in 2004.

Google Developer Expert

Google Developer Expert

Google awarded us the Google Developer Expert award recogizing our work in Google Workspace.

ProductHunt Golden Kitty

ProductHunt Golden Kitty

Our Gmail tool won the Lifehack of the Year award at ProductHunt Golden Kitty Awards in 2017.

Microsoft MVP Alumni

Microsoft MVP Alumni

Microsoft awarded us the Most Valuable Professional (MVP) title for 5 years in a row.

Google Cloud Champion

Google Cloud Champion

Google awarded us the Champion Innovator title recognizing our technical skill and expertise.

Email Newsletter

Sign up for our email newsletter to stay up to date.

We will never send any spam emails. Promise.