Creating a Twitter Search, Hashtag, User, Favorites or List RSS Feed

[Update August 20, 2014] – I’ve not actually tried this, but found a new article on How to Create RSS Feeds in Twitter using Google Script.

[Update March 4, 2013] – As of March 5th, 2013, twitter will no longer support unauthenticated feeds of any kind and will be dropping support for RSS altogether (meaning you can only get JSON feeds). Therefore, you will need to make your own (see comments for one suggestion) or use an app to follow specific feeds.

Hashtag and Keyword Search

So, almost every single tutorial told me to just find the magical RSS feed button to get a twitter search, but my understanding is that this button no longer exists! (or it exists for some people and not others, magical…).

So, after much searching, I finally figured it out by changing twitter to the old layout and playing around with the link I found. Sociable has updated their post on this topic, so I’ve updated the cheat sheet a bit:

You may need to use search.atom instead of rss depending on your reader.

[UPDATED: Apr 21, 2012]

Hashtag search: http://search.twitter.com/search.rss?q=%23YourSearch

User mention search: http://search.twitter.com/search.rss?q=%40UserName

To a User: http://search.twitter.com/search.rss?q=to%3AUserName

From a User: http://search.twitter.com/search.rss?q=from%3AUserName

Keyword search: http://search.twitter.com/search.rss?q=Your+Keywords
* use OR for any of the word you type, so Your%20OR%20Keywords
* use double quotes for example phrases, so “Your Search
* use a hyphen for the equivalent of NOT, so –keyword

Language (for English): http://search.twitter.com/search.rss?q=lang:en
* to find the two letter language code, just use Twitter’s advance search, select the language of your choice, hit Search, and see what Twitter uses

Location: http://search.twitter.com/search.rss?geocode=latitude%2Clongitude%2C25km
(use mi for miles, max 1000km or 1000mi)

Location + keyword search: http://search.twitter.com/search.rss?q=Your+Keywords%20geocode=latitude%2Clongitude%2C25km
(For a hashtag, add %23 in front of your keyword.)

To find the latitude and longitude, try a site like itouchmap.

Check out the Sociable blog post for more on even more complex location searches.

[Added February 6, 2013] By default, you will only get 10-12 results. If you want to get results farther back, add “&rpp=Number” where the number is a maximum of 180 with results no older than 6-9 days.

Making Complex Searches

Here’s my tip on generating more complex searches: use Twitter’s advance search, see what Twitter comes up with in the search bar, then copy/paste their query and stick it after: http://search.twitter.com/search.rss?q=

The only exception is the geocode, because Twitter has “near this place” instead of exact geolocation.

User Timelines & Favourites

If you’re interested in a user’s timeline, many readers will allow you to use the standard profile page link: http://twitter.com/#!/username . If for some reason that doesn’t work, try this:

[Updated: October 16, 2012] With the deprecation of the older API, you now have to specify you’re using API 1 (as opposed to 1.1) if you want to use RSS through statuses. If you prefer not to, then I suggest using the ‘from user’ search (above).

http://api.twitter.com/1/statuses/user_timeline.rss?screen_name=User
Replace ‘User’ with the username

Similarly, for favorites, use:
http://api.twitter.com/1/favorites.rss?screen_name=User

Twitter List

If you’re interested in creating RSS feeds to a list instead of just a single person, try going through David Calhoun’s The incredibly painful way of getting an RSS feed of a Twitter list.

Published by

Cynthia

A librarian learning the ways of technology, accessibility, metadata, and people

32 thoughts on “Creating a Twitter Search, Hashtag, User, Favorites or List RSS Feed”

  1. Very useful. I turns out that at long last google reader has a feature to easily create these feeds, just click browse for stuff.

    1. That’s true, but I find that it doesn’t always work. I’ve had problems with actually adding the feed (it’ll just give an error) and sometimes even finding users.

  2. How do I create an RSS feed for example of the word: Toyota with the location being only in australia. Basically I want Tweets to only be of people talking about Toyota in Australia. My issue is trying to get the geocode for Australia only. Really would appreciate any help!

    1. If you follow the format, you’d probably put something along the lines of: http://search.twitter.com/search.rss?q=toyota%20geocode%3A25.274398%2C133.775136%2C1000mi

      The problem for trying to search the whole country is that Twitter allows a maximum distance of 1000. You would probably have to do two searches for different geopoints to cover the country. If you’re only interested in one region/coast, you could just use something like itouchmap: http://www.itouchmap.com/latlong.html to find the latitude and longitude of where you’re interested in and optionally, replace the distance.

  3. Hello,

    my question is kind of similar to Seans.
    I need an rss with all tweets about a company, say toyota (with hastag), but in a certain language. In my case: german.

    The URL I get from the Twitter Search “#toyota lang:de” would be :
    https://twitter.com/#!/search/%23toyota%20lang%3Ade

    I tried to fix a URL the way you showed above, but none of my rss-readers (thunderbird mail, google reader, hootsuite) accepts it. It only works without the “lang”-Part…

    Any Ideas how it could work?
    I’d be very grateful for any kind of answer :-)
    Thanks so far!
    Steven

  4. thanks alot for this article, Im in the middle of putting a post together, Ill definitely add a link to you.
    I wanted to know (sorry if this is a noob question) if I wanted to import an rss of 1 users twitter feed, how can I import there whole feed of tweets, not just the 20 or so that are on show….any idea?? Thanks alot

    1. Glad you’re finding it useful.

      I’m not sure I wholly understand your question though.
      If you mean private tweets, then there’s no real way to do it.
      If you mean all of their tweets including retweets and replies, those will show up in a RSS feed unlike on a twitter list.
      If you mean you want to see the timeline they normally see, their tweets + tweets by the people they follow, then I’m not sure. The closest thing I can think of is if you follow a list (or two) that they’ve created, or you create a list yourself of all the people that person is following.

  5. Hi Cynthia-

    I updated Pixsy last week with user timeline, Twitter search, and user favorite RSS feeds that can be generated with simple commands. No need to enter URL’s or try to figure out URL encoding. You can enter any of the following commands in the Pixsy command line:

    Twitter Search Feed:
    .twitter -rss [enter search term(s)]

    Twitter User Timeline Feed:
    .twitter -rss-u [enter Twitter user]

    Twitter User Favorites Feed:
    .twitter -rss-f [enter Twitter user]

    This generates encoded URL’s that you can enter into your feed reader. Hope that this helps your readers! You can find Pixsy at http://www.pixsy.net/.

    -Chris
    Pixsy developer

  6. Topsy was what I was using, but now they require an API key to create an RSS feed of a search on Twitter, furthermore they want you to pay for the API key. I’m currently trying out the service even though I’ve been using it for years, it would be nice if they allowed a small amount of free use of their service… I’m going to have to use other techniques like those listed here if Topsy starts blocking me.

      1. Actually in their Google group they said it was because people abused the API. I make very, very few calls, but I feel kinda baited and switched because not only did I build it into my code, I told other people to use it, including apparently you… Why lock out the people who helped build your brand/ecosystem. Of course I did ask for the exception so if they give it to me and people like me great, if they just block us and break a bunch of apps, well they’ll probably hear about it on social media. Topsy isn’t very well known but it arguably works better than Twitter’s own search as it goes further back in time…

      1. I think March 5th was just a test, another blackout test is coming, but in the mean time RSS feeds from Twitter should be working, I switch over to using my script or not using RSS from Twitter.

      2. I noticed that, but it’s still unreliable since some days you get it and some days you don’t. Soon enough it’ll be taken down entirely.

    1. while it still works to some extent, twitter is phasing out RSS feeds, so applying for your own API and creating a script might be the only free way to do it.

Leave a Comment

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s