I need to find all tweets made by a defined app.

I discovered the "source" search operator that allows to do that.

For example, here is the URL of the search to find all tweets made with Tweetbot for iOS: https://twitter.com/#!/search/source%3ATweetbot_for_iOS

The problem is I need to get the result as JSON or XML. Here is what is indicated on the Twitter search API documentation

  1. Run your search on twitter.com/search.
  2. Copy the URL. For example: https://twitter.com/#!/search/%40twitterapi
  3. Replace https://twitter.com/#!/search/ with http://search.twitter.com/search.json?q=. For example: http://search.twitter.com/search.json?q=%40twitterapi

It gives us http://search.twitter.com/search.json?q=source%3ATweetbot_for_iOS which returns

error: "Invalid query"

Any idea?


The answer is found on the Twitter search API documentation


  • can only be combined with a keyword parameter. If you do not include a keyword you will receive an HTTP 403 error with the message: {"error":"You must enter a query."}.
  • supports multi-word sources by using _ instead of spaces. For example, the source "Tweet Button" should be entered as source: tweet_button

Therefor you must include a keyword. You can't get all the tweets from a source, you can only get all the tweets from the source which including a keyword, for example FBI:


  • Thanks for your answer. That explains why I get the error message. However I would really appreciate finding another way to achieve that search. – Olivier Payen Apr 23 '12 at 12:14

Why you get the error message, @mhoran_psprep explained that. Now if you still want to achieve something like that, the closest thing is to choose a keyword, that is likely to appear in every other tweet and search with that + the source. There is no word like that, so I chose a letter. :P

I searched with the letter a and the source as tweetdeck.


The search works. The character a is likely to appear in most tweets. You can choose any other letter too. See if this works for you too. :)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.