• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Stop wasting time looking for files and revisions. Connect your Gmail, DriveDropbox, and Slack accounts and in less than 2 minutes, Dokkio will automatically organize all your file attachments. Learn more and claim your free account.



Page history last edited by Brandon Geiger 11 years ago

<< Back to Swarm API Documentation




Allows you to get a collection of photos for a swarm given a swarm id.





Return Formats: 



HTTP Method(s):



Requires Authentication (about authentication):

None required.


API rate limited (about rate limiting):

1 call per request



  • swarm_id.  Required.  Specifies the ID of the swarm whose tweets you are trying to access. 
    • Example: 1026 (the id for the Social Revolution swarm)
  • count.  Optional.  Specifies the number of tweets to retrieve for the given call. Current maximum is 100.
  • page. Optional. Specifies the page of results to retrieve.
  • order. Optional. Specifies the order in which the results will be sorted.
    • Example: 1 - sorts by chronological order on date tweeted (not date created), 2 - sorts by karma
  • format. Optional. Specifies the requested return format. Current the only supported return format is JSON.
  • consumer_key. Optional. Specifies your application's consumer key. Does not count an API request against your IP address. Apply for one now.
  • version. Optional. Specifies the version of the Swarm API you are targeting. If no value is specified, it defaults to the most current version of the API.
    • Example: 1.12 - specifies the major version of "1" and a minor version of "12" that you are targeting



Response (about return values): 

          JSON Object (truncated):







          "dt_created":"2009-05-14 00:00:23",















          "title":"TechStars Mentors Night",









Usage examples: 


cURL (about cURL) in PHP (about PHP):



// make the call for photos - begin



//set api url



//set arguments



//set up call

$session = curl_init();

curl_setopt ( $session, CURLOPT_URL, $url );

curl_setopt ( $session, CURLOPT_HTTPHEADER, array('Expect:'));

curl_setopt ( $session, CURLOPT_RETURNTRANSFER, 1 );

curl_setopt ( $session, CURLOPT_POST, 1);


//get arguments



    foreach($args as $key => $value){




    curl_setopt ( $session, CURLOPT_POSTFIELDS, $params);



//execute call

$result_photos = curl_exec ( $session );

$photos = json_decode($result_photos);

curl_close( $session );



// make the call for photos - end



//now ouput

foreach($photos as $p){

     echo "<BR><img src='".$p->url."' />";



Usage examples:   


See Code Samples




Do you have an example to share in the language of your choice? Please share!


<< Back to Swarm API Documentation

Comments (0)

You don't have permission to comment on this page.