Twitter API Documentation


Twitter exposes its data via an Application Programming Interface (API). This document is the official reference for that functionality.

 

Getting Started

The concepts every developer should know before interacting with the API.

 

Streaming API

Stream public statuses in near real-time over a persistent connection. Sampled or filtered by track keyword or by userid.

 

REST Methods

In addition to the Streaming API, the Twitter API includes the following RESTful methods to send and receive Twitter data.

 

Search API Methods 

search

 

REST API Methods 

 

Timeline Methods

statuses/public_timeline

statuses/home_timeline

statuses/friends_timeline

statuses/user_timeline 

statuses/mentions

statuses/retweeted_by_me

statuses/retweeted_to_me

statuses/retweets_of_me

 

Status Methods

statuses/show

statuses/update

statuses/destroy  

          statuses/retweet

          statuses/retweets

          statuses/id/retweeted_by

          statuses/id/retweeted_by/ids

 

User Methods

users/show 

users/lookup

users/search

users/suggestions

users/suggestions/category

statuses/friends

statuses/followers

 

List Methods

         POST lists      (create)

         POST lists id  (update)

         GET lists        (index)

         GET list id      (show)

         DELETE list id (destroy)

         GET list statuses

         GET list memberships

         GET list subscriptions

 

List Members Methods

         GET list members

         POST list members

         DELETE list members

         GET list members id

 

List Subscribers Methods

         GET list subscribers

         POST list subscribers

         DELETE list subscribers

         GET list subscribers id

 

Direct Message Methods 

direct_messages

direct_messages/sent

direct_messages/new

direct_messages/destroy 

 

Friendship Methods

friendships/create

friendships/destroy 

friendships/exists

friendships/show

friendships/incoming

friendships/outgoing

 

Social Graph Methods

friends/ids   

followers/ids 

 

Account Methods

account/verify_credentials 

account/rate_limit_status

account/end_session

account/update_delivery_device 

account/update_profile_colors 

account/update_profile_image 

account/update_profile_background_image

account/update_profile 

 

Favorite Methods

favorites

favorites/create  

favorites/destroy 

 

Notification Methods

notifications/follow 

notifications/leave 

 

Block Methods

blocks/create  

blocks/destroy

blocks/exists

blocks/blocking

blocks/blocking/ids

 

Spam Reporting Methods

          report_spam

 

Saved Searches Methods

saved_searches

saved_searches/show

saved_searches/create

saved_searches/destroy

 

OAuth Methods

oauth/request_token

oauth/authorize

oauth/authenticate

oauth/access_token

 

Trends Methods

          trends/available

          trends/location

trends

trends/current

trends/daily

trends/weekly 

 

 

Geo methods

          geo/nearby_places

          geo/reverse_geocode

          geo/id

 

Help Methods

help/test

 

HTTP Response Codes and Errors

Applications send information throught the HTTP response codes and error messages.

 

Return Values

API methods return elements of data. These elements contain a known set of fields.

 

Terms of Service

The API is free, but here are the words to code by.