Need 1000 twitter handles of users who are below 21 years of age and residing in US
I don't think there is a specific method for what you are asking for. There are some methods of acquiring a large number of handles, although they each come with downsides. I typically use the
On the Twitter REST API, you can make requests for:
- Tweets based on a search term.
GET search/tweets method, you can get up to 3200 tweets for a particular search term. You could run lots of different requests with different search terms to remove bias where possible, and collect a random sample of 1000 handles that appear under 21.
- Get a specific user's followers.
GET followers/ids. Could be a quicker and easier option, especially if you use a popular Twitter user. However you are left with the problem that your entire sample is bunrepresentative in that they follow the same person, unless you collect a few different users' followers. There is a very simple method in R for this:
user <- getUser("justinbieber") # will probably return a lot of <21's based in the US. user.followers <- lookupUsers(user$getFollowerIDs()) user.followers <- twListToDF(user.followers)
If you help with the specifics of getting the data itself (i.e. if you are not already comfortable with making API requests), I can possibly help in the comments.
As mentioned above, Twitter has no searchable age category, but there are some clever ways to deduce
Filter on first names that barely existed more than 21 years ago. For example, Harper.
You can find tons of Millenial names on one of the million baby name blogs or sites (for example).
The Twitter API or Advanced Search allows you to search within a geographical bounding box, to filter for certain languages ("lang:en") and to either download from the public stream, or to search based on certain terms. You can test out in the browser advanced search queries and then use the search parameters from the response URL with the API.