<< Back to Twitter API Documentation
followers/ids
Returns an array of numeric IDs for every user following the specified user.
URL:
http://api.twitter.com/1/followers/ids.format
Formats:
xml, json
HTTP Method:
GET
Requires Authentication (about authentication):
false unless requesting it from a protected user; if getting this data of a protected user, you must auth (and be allowed to see that user).
API rate limited (about rate limiting):
1 call per request
Parameters:
- One of the following:
- id. Optional. The ID or screen_name of the user to retrieve the friends ID list for.
- Example: http://api.twitter.com/1/followers/ids/bob.xml
- user_id. Optional. Specfies the ID of the user for whom to return the friends list. Helpful for disambiguating when a valid user ID is also a valid screen name.
- Example: http://api.twitter.com/1/followers/ids.xml?user_id=1401881
- screen_name. Optional. Specfies the screen name of the user for whom to return the friends list. Helpful for disambiguating when a valid screen name is also a user ID.
- Example: http://api.twitter.com/1/followers/ids.xml?screen_name=101010
- cursor. Required. Breaks the results into pages. A single page contains 5000 ids. This is recommended for all purposes. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.
- Example: http://api.twitter.com/1/followers/ids/barackobama.xml?cursor=-1
- Example: http://api.twitter.com/1/followers/ids/barackobama.xml?cursor=-1300794057949944903
Notes:
- Sets aren't guaranteed to contain 5000 IDs, as suspended users will be filtered out.
- If the cursor parameter is not provided, an effort is made to return all IDs, but will probably fail with a timeout or return inconsistent or incomplete results. This behavior is deprecated and will be removed.
Response (about return values):
XML example (truncated):
<?xml version="1.0" encoding="UTF-8"?>
<id_list>
<ids>
<id>30592818</id>
<id>21249843</id>
... truncated ...
</ids>
<next_cursor>1288724293877798413</next_cursor>
<previous_cursor>-1300794057949944903</previous_cursor>
</id_list>
Usage examples:
cURL (about cURL):
curl http://api.twitter.com/1/followers/ids.xml?screen_name=dougw&cursor=-1
Do you have an example to share in the language of your choice? Please share!
<< Back to Twitter API Documentation
Comments (0)
You don't have permission to comment on this page.