GET statuses/home_timeline

Updated on Tue, 2013-06-11 09:08

This deprecated method is replaced by GET statuses/home_timeline in API v1.1

Returns the most recent statuses, including retweets if they exist, posted by the authenticating user and the users they follow. This is the same timeline seen by a user when they login to twitter.com.

This method is identical to statuses/friends_timeline, except that this method always includes retweets.

This method is can only return up to 800 statuses, including retweets, across all pages.

See Working with Timelines for instructions on traversing timelines.

Resource URL

http://api.twitter.com/1/statuses/home_timeline.format

Parameters

count optional

Specifies the number of records to retrieve. Must be less than or equal to 200. Defaults to 20.

Example Values: 5

since_id optional

Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available.

Example Values: 12345

max_id optional

Returns results with an ID less than (that is, older than) or equal to the specified ID.

Example Values: 54321

page optional

This parameter will soon cease to be functional See Working with Timelines.

Specifies the page of results to retrieve.

Example Values: 3

trim_user optional

When set to either true, t or 1, each tweet returned in a timeline will include a user object including only the status authors numerical ID. Omit this parameter to receive the complete user object.

Example Values: true

include_rts optional

When set to either true, t or 1,the timeline will contain native retweets (if they exist) in addition to the standard stream of tweets. The output format of retweeted tweets is identical to the representation you see in home_timeline. Note: If you're using the trim_user parameter in conjunction with include_rts, the retweets will still contain a full user object.

Example Values: true

include_entities optional

When set to either true, t or 1, each tweet will include a node called "entities,". This node offers a variety of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. While entities are opt-in on timelines at present, they will be made a default component of output in the future. See Tweet Entities for more detail on entities.

Example Values: true

exclude_replies optional

This parameter will prevent replies from appearing in the returned timeline. Using exclude_replies with the count parameter will mean you will receive up-to count tweets — this is because the count parameter retrieves that many tweets before filtering out retweets and replies.

Example Values: true

contributor_details optional

This parameter enhances the contributors element of the status response to include the screen_name of the contributor. By default only the user_id of the contributor is included.

Example Values: true

Example Request

GET

https://api.twitter.com/1/statuses/home_timeline.json?include_entities=true

  1. [
  2.   {
  3.     "coordinates": null,
  4.     "favorited": false,
  5.     "created_at": "Fri Jul 16 16:58:46 +0000 2010",
  6.     "truncated": false,
  7.     "entities": {
  8.       "urls": [
  9.         {
  10.           "expanded_url": null,
  11.           "url": "http://www.flickr.com/photos/cindyli/4799054041/",
  12.           "indices": [
  13.             75,
  14.             123
  15.           ]
  16.         }
  17.       ],
  18.       "hashtags": [
  19.  
  20.       ],
  21.       "user_mentions": [
  22.         {
  23.           "name": "Stephanie",
  24.           "id": 15473839,
  25.           "indices": [
  26.             27,
  27.             39
  28.           ],
  29.           "screen_name": "craftybeans"
  30.         }
  31.       ]
  32.     },
  33.     "text": "got a lovely surprise from @craftybeans. She sent me the best tshirt ever. http://www.flickr.com/photos/cindyli/4799054041/ ::giggles::",
  34.     "annotations": null,
  35.     "contributors": null,
  36.     "id": 18700887835,
  37.     "geo": null,
  38.     "in_reply_to_user_id": null,
  39.     "place": null,
  40.     "in_reply_to_screen_name": null,
  41.     "user": {
  42.       "name": "cindy li",
  43.       "profile_sidebar_border_color": "AD0066",
  44.       "profile_background_tile": false,
  45.       "profile_sidebar_fill_color": "AD0066",
  46.       "created_at": "Wed Nov 29 06:08:08 +0000 2006",
  47.       "profile_image_url": "http://a1.twimg.com/profile_images/553508996/43082001_N00_normal.jpg",
  48.       "location": "San Francisco, CA",
  49.       "profile_link_color": "FF8500",
  50.       "follow_request_sent": false,
  51.       "url": "http://www.cindyli.com",
  52.       "favourites_count": 465,
  53.       "contributors_enabled": false,
  54.       "utc_offset": -28800,
  55.       "id": 29733,
  56.       "profile_use_background_image": true,
  57.       "profile_text_color": "000000",
  58.       "protected": false,
  59.       "followers_count": 3395,
  60.       "lang": "en",
  61.       "notifications": true,
  62.       "time_zone": "Pacific Time (US & Canada)",
  63.       "verified": false,
  64.       "profile_background_color": "cfe8f6",
  65.       "geo_enabled": true,
  66.       "description": "Just me, Cindy Li.Giving cute substance since 1997.\r\nMarried to @themattharris.\r\nProduct designer for Yahoo! ",
  67.       "friends_count": 542,
  68.       "statuses_count": 4847,
  69.       "profile_background_image_url": "http://a3.twimg.com/profile_background_images/3368753/twitter_flowerbig.gif",
  70.       "following": true,
  71.       "screen_name": "cindyli"
  72.     },
  73.     "source": "web",
  74.     "in_reply_to_status_id": null
  75.   },
  76.   {
  77.     "coordinates": null,
  78.     "favorited": false,
  79.     "created_at": "Fri Jul 16 16:55:52 +0000 2010",
  80.     "truncated": false,
  81.     "entities": {
  82.       "urls": [
  83.         {
  84.           "expanded_url": null,
  85.           "url": "http://bit.ly/libraryman",
  86.           "indices": [
  87.             78,
  88.             102
  89.           ]
  90.         }
  91.       ],
  92.       "hashtags": [
  93.  
  94.       ],
  95.       "user_mentions": [
  96.         {
  97.           "name": "Cal Henderson",
  98.           "id": 6104,
  99.           "indices": [
  100.             108,
  101.             115
  102.           ],
  103.           "screen_name": "iamcal"
  104.         }
  105.       ]
  106.     },
  107.     "text": "Anything is possible when you're in the library... with a celestial sandwich: http://bit.ly/libraryman (via @iamcal)",
  108.     "annotations": null,
  109.     "contributors": null,
  110.     "id": 18700688341,
  111.     "geo": null,
  112.     "in_reply_to_user_id": null,
  113.     "place": {
  114.       "name": "San Francisco",
  115.       "country_code": "US",
  116.       "country": "The United States of America",
  117.       "attributes": {
  118.  
  119.       },
  120.       "url": "http://api.twitter.com/1/geo/id/5a110d312052166f.json",
  121.       "id": "5a110d312052166f",
  122.       "bounding_box": {
  123.         "coordinates": [
  124.           [
  125.             [
  126.               -122.51368188,
  127.               37.70813196
  128.             ],
  129.             [
  130.               -122.35845384,
  131.               37.70813196
  132.             ],
  133.             [
  134.               -122.35845384,
  135.               37.83245301
  136.             ],
  137.             [
  138.               -122.51368188,
  139.               37.83245301
  140.             ]
  141.           ]
  142.         ],
  143.         "type": "Polygon"
  144.       },
  145.       "full_name": "San Francisco, CA",
  146.       "place_type": "city"
  147.     },
  148.     "in_reply_to_screen_name": null,
  149.     "user": {
  150.       "name": "Daniel Burka",
  151.       "profile_sidebar_border_color": "a655ec",
  152.       "profile_background_tile": true,
  153.       "profile_sidebar_fill_color": "f1ccff",
  154.       "created_at": "Mon Jan 15 15:22:14 +0000 2007",
  155.       "profile_image_url": "http://a3.twimg.com/profile_images/74260755/2009-square-small_normal.jpg",
  156.       "location": "San Francisco",
  157.       "profile_link_color": "5a0d91",
  158.       "follow_request_sent": false,
  159.       "url": "http://deltatangobravo.com",
  160.       "favourites_count": 92,
  161.       "contributors_enabled": false,
  162.       "utc_offset": -28800,
  163.       "id": 635543,
  164.       "profile_use_background_image": true,
  165.       "profile_text_color": "0C3E53",
  166.       "protected": false,
  167.       "followers_count": 9950,
  168.       "lang": "en",
  169.       "notifications": false,
  170.       "time_zone": "Pacific Time (US & Canada)",
  171.       "verified": false,
  172.       "profile_background_color": "BADFCD",
  173.       "geo_enabled": true,
  174.       "description": "Director of design at Tiny Speck. Ex-Creative director at Digg. CSS. Design. UX. Climbing. Cycling. Chilaquiles mmm.",
  175.       "friends_count": 219,
  176.       "statuses_count": 806,
  177.       "profile_background_image_url": "http://a3.twimg.com/profile_background_images/4444585/back.png",
  178.       "following": true,
  179.       "screen_name": "dburka"
  180.     },
  181.     "source": "web",
  182.     "in_reply_to_status_id": null
  183.   },
  184.   ...
  185.   {
  186.     "coordinates": null,
  187.     "favorited": false,
  188.     "created_at": "Fri Jul 16 16:40:34 +0000 2010",
  189.     "truncated": false,
  190.     "entities": {
  191.       "urls": [
  192.  
  193.       ],
  194.       "hashtags": [
  195.  
  196.       ],
  197.       "user_mentions": [
  198.  
  199.       ]
  200.     },
  201.     "text": "Walking the DOM like Huggybear.",
  202.     "annotations": null,
  203.     "contributors": null,
  204.     "id": 18699620902,
  205.     "geo": null,
  206.     "in_reply_to_user_id": null,
  207.     "place": null,
  208.     "in_reply_to_screen_name": null,
  209.     "user": {
  210.       "name": "Kevin Lawver",
  211.       "profile_sidebar_border_color": "A8A37E",
  212.       "profile_background_tile": true,
  213.       "profile_sidebar_fill_color": "E6E2B0",
  214.       "created_at": "Sat Jul 29 18:23:37 +0000 2006",
  215.       "profile_image_url": "http://a3.twimg.com/profile_images/980477983/oh_lawver_normal.jpg",
  216.       "location": "Savannah, GA, US",
  217.       "profile_link_color": "DC4104",
  218.       "follow_request_sent": false,
  219.       "url": "http://lawver.net",
  220.       "favourites_count": 148,
  221.       "contributors_enabled": false,
  222.       "utc_offset": -18000,
  223.       "id": 3404,
  224.       "profile_use_background_image": true,
  225.       "profile_text_color": "003030",
  226.       "protected": false,
  227.       "followers_count": 1049,
  228.       "lang": "en",
  229.       "notifications": false,
  230.       "time_zone": "Eastern Time (US & Canada)",
  231.       "verified": false,
  232.       "profile_background_color": "003030",
  233.       "geo_enabled": true,
  234.       "description": "Nerd who loves web standards, Ruby on Rails and all things webbish. Chief Architect @ http://uplaya.com and co-founder of http://ficly.com. Happy dad & husband.",
  235.       "friends_count": 268,
  236.       "statuses_count": 10561,
  237.       "profile_background_image_url": "http://a1.twimg.com/profile_background_images/1391712/twitter_back.png",
  238.       "following": true,
  239.       "screen_name": "kplawver"
  240.     },
  241.     "source": "<a href=\"http://twitter.com\" rel=\"nofollow\">Tweetie for Mac</a>",
  242.     "in_reply_to_status_id": null
  243.   },
  244. ]