SlideShare API » Documentation
API Validation using the SlideShare API
All requests made using the SlideShare API must have the following parameters:
- api_key: Set this to the API Key that SlideShare has provided for you.
- ts: Set this to the current time in Unix TimeStamp format, to the nearest second(?).
- hash: Set this to the SHA1 hash of the concatenation of the shared secret and the timestamp (ts). i.e. SHA1 (sharedsecret + timestamp). The order of the terms in the concatenation is important.
Authentication using the slideshare API
Requests that request private data from users, or that act on their behalf, must include the following parameters:
- username: set this to the username of the account whose data is being requested.
- password: set this to the password of the account whose data is being requested.
API Methods
Get Slideshow Information
- Request type HTTP GET
- Authorization Optional
- URL http://www.slideshare.net/api/2/get_slideshow
- slideshow_id id of the slideshow to be fetched.
- slideshow_url URL of the slideshow to be fetched. This is required if slideshow_id is not set. If both are set, slideshow_id takes precedence.
- username username of the requesting user
- password password of the requesting user
- detailed Whether or not to include optional information. 1 to include, 0 (default) for basic information.
<Slideshow>
<ID>{ slideshow id }</ID>
{ slideshow title }
<Description>{ slideshow description }</Description>
<Status>{ 0 if queued for conversion, 1 if converting, 2 if converted,
3 if conversion failed }
</Status>
<Username>{ username }</Username>
<URL>{ web permalink }</URL>
<ThumbnailURL>{ thumbnail URL }</ThumbnailURL>
<ThumbnailSmallURL>{ URL of smaller thumbnail }</ThumbnailSmallURL>
<Embed>{ embed code }</Embed>
<Created>{ date slideshow created }</Created>
<Language>{ language, as specified by two-letter code }</Language>
<Format>ppt (or pdf, pps, odp, doc, pot, txt, rdf) </Format>
<Download>{ 1 if available to download, else 0 }</Download>
<Tags>
<Tag Count="{ number of times tag has been used }" Owner="{ 1 if owner
has used the tag, else 0 }">{ tag name }
</Tag>
</Tags>
<NumDownloads>{ number of downloads }</NumDownloads>
<NumViews>{ number of views }</NumViews>
<NumComments>{ number of comments }</NumComments>
<NumFavorites>{ number of favorites }</NumFavorites>
<NumSlides>{ number of slides }</NumSlides>
<RelatedSlideshows>
<RelatedSlideshowID rank="{ rank, where 1 is highest}">
{ slideshow id } </RelatedSlideshowID>
</RelatedSlideshows>
<PrivacyLevel>{ 0, or 1 if private }</PrivacyLevel>
<SecretURL>{ 0, or 1 if secret URL is enabled }</SecretURL>
<AllowEmbed>{ 0, or 1 if embeds are allowed }</AllowEmbed>
<ShareWithContacts>{ 0, or 1 if set to private, but contacts can view
slideshow }
</ShareWithContacts>
</Slideshow>
Get Slideshows By Tag
- Request Type HTTP GET
- Authorization None
- URL http://www.slideshare.net/api/2/get_slideshows_by_tag
- tag tag name
- limit specify number of items to return
- offset specify offset
- detailed Whether or not to include optional information. 1 to include, 0 (default) for basic information.
<Tag>
<Name>{ Tag Name }</Name>
<Count>{ Number of Slideshows }</Count>
<Slideshow>
{ as in get_slideshow }
</Slideshow>
...
</Tag>
Get Slideshows By Group
- Request Type HTTP GET
- Authorization None
- URL http://www.slideshare.net/api/2/get_slideshows_by_group
- group_name Group name (as returned in QueryName element in get_user_groups method)
- limit specify number of items to return
- offset specify offset
- detailed Whether or not to include optional information. 1 to include, 0 (default) for basic information.
<Group>
<Name>{ Group Name }</Name>
<Count>{ Number of Slideshows }</Count>
<Slideshow>
{ as in get_slideshow }
</Slideshow>
...
</Group>
Get Slideshows By User
- Request Type HTTP GET
- Authorization None
- URL http://www.slideshare.net/api/2/get_slideshows_by_user
- username_for username of owner of slideshows
- username username of the requesting user
- password password of the requesting user
- limit specify number of items to return
- offset specify offset
- detailed Whether or not to include optional information. 1 to include, 0 (default) for basic information.
<User>
<Name>{ username_for }</Name>
<Count>{ Number of Slideshows }</Count>
<Slideshow>
{ as in get_slideshow }
</Slideshow>
...
</User>
Slideshow Search
- Request Type HTTP GET
- Authorization None
- URL http://www.slideshare.net/api/2/search_slideshows
- q the query string
- page The page number of the results (works in conjunction with items_per_page), default is 1
- items_per_page Number of results to return per page, default is 12
- lang Language of slideshows (default is English, 'en') ('**':All,'es':Spanish,'pt':Portuguese,'fr':French,'it':Italian,'nl':Dutch,'de':German,'zh':Chinese,'ja':Japanese,'ko':Korean,'ro':Romanian,'!!':Other)
- sort Sort order (default is 'relevance') ('mostviewed','mostdownloaded','latest')
- what What type of search. If not set, text search is used. 'tag' is the other option.
- download Slideshows that are available to download; Set to '0' to do this, otherwise default is all slideshows.
- fileformat File format to search for. Default is "all". ('pdf':PDF,'ppt':PowerPoint,'odp':Open Office,'pps':PowerPoint Slideshow,'pot':PowerPoint template)
- cc Set to '1' to retrieve results under the Creative Commons license. Default is '0'
- cc_adapt Set to '1' for results under Creative Commons that allow adaption, modification. Default is '0'
- detailed Whether or not to include optional information. 1 to include, 0 (default) for basic information.
<Slideshows>
<Meta>
<Query>{ query }</Query>
<ResultOffset>{ the offset of this result (if pages were used)}
</ResultOffset>
<NumResults>{ number of results returned }</NumResults>
<TotalResults>{ total number of results}</TotalResults>
</Meta>
<Slideshow>
{as in get_slideshow}
</Slideshow>
...
</Slideshows>
Get User Groups
- Request Type HTTP GET
- Authorization Optional
- URL http://www.slideshare.net/api/2/get_user_groups
- username_for username of user whose groups are being requested
- username username of the requesting user
- password password of the requesting user
<Groups>
<Group>
<Name>{ Group Name }</Name>
<NumPosts>{ Number of Posts }</Name>
<NumSlideshows>{ Number of Slideshows }</Name>
<NumMembers>{ Number of Members }</Name>
<Created>{ Created date }</Name>
<QueryName>{ Name used for querying (get_slideshows_by_group, etc) }
</Name>
<URL>{ Group URL }</Name>
<Group>
...
</Groups>
Get User Contacts
- Request Type HTTP GET
- Authorization Optional
- URL http://www.slideshare.net/api/2/get_user_contacts
- username_for username of user whose Contacts are being requested
<Contacts>
<Contact>
<Userame>{ Username }</Name>
<NumSlideshows>{ Number of Slideshows }</Name>
<NumComments>{ Number of Comments }</Name>
<Contact>
...
</Contacts>
Get User Tags
- Request Type HTTP GET
- Authorization Required
- URL http://www.slideshare.net/api/2/get_user_tags
- username username of the requesting user
- password password of the requesting user
<Tags>
<Tag Count="{ Number of times tag used }">{ Tag name }</Tag>
...
</Tags>
Edit Existing Slideshow
- Request Type HTTP GET
- Authorization Required
- URL http://www.slideshare.net/api/2/edit_slideshow
- username username of the requesting user
- password password of the requesting user
- slideshow_id slideshow ID
- slideshow_title text
- slideshow_description text
- slideshow_tags text
- make_slideshow_private Should be Y if you want to make the slideshow private. If this is not set, following tags will not be considered
- generate_secret_url Generate a secret URL for the slideshow. Requires make_slideshow_private to be Y
- allow_embeds Sets if other websites should be allowed to embed the slideshow. Requires make_slideshow_private to be Y
- share_with_contacts Sets if your contacts on SlideShare can view the slideshow. Requires make_slideshow_private to be Y
<SlideShowEdited> <SlideShowID>SlideShowID</SlideShowID> </SlideShowEdited>
Delete Slideshow
- Request Type HTTP GET
- Authorization Required
- URL http://www.slideshare.net/api/2/delete_slideshow
- username username of the requesting user
- password password of the requesting user
- slideshow_id slideshow ID
<SlideShowDeleted> <SlideShowID>SlideShowID</SlideShowID> </SlideShowDeleted>
Upload Slideshow
- Request Type HTTP GET
- Authorization Required
- URL http://www.slideshare.net/api/2/upload_slideshow
- username username of the requesting user
- password password of the requesting user
- slideshow_title slideshow's title
- slideshow_srcfile slideshow file
- slideshow_description description
- slideshow_tags tags should be space separated, use quotes for multiple word tags
- make_src_public Y if you want users to be able to download the ppt file, N otherwise. Default is Y
- make_slideshow_privateShould be Y if you want to make the slideshow private. If this is not set, following tags will not be considered
- generate_secret_urlGenerate a secret URL for the slideshow. Requires make_slideshow_private to be Y
- allow_embedsSets if other websites should be allowed to embed the slideshow. Requires make_slideshow_private to be Y
- share_with_contactsSets if your contacts on SlideShare can view the slideshow. Requires make_slideshow_private to be Y
The document will upload into the account of the user specified by (username / password). The user associated with the API key need not be the same as the user into who's account the slideshow gets uploaded. So, for example, a bulk uploader would include the api_key (and hash) associated with the API account, and the username and password associated with the account being uploaded to.
Response XML Format
<SlideShowUploaded>
<SlideShowID>{slideshow id goes here}</SlideShowID>
</SlideShowUploaded>
The slideshare ID will be necessary for retrieving the slideshow embed code, once the slideshow has been converted into flash.
Get Campaign Information
- Request type HTTP POST
- Authorization Mandatory
- URL http://www.slideshare.net/api/2/get_user_campaigns
- username username of the requesting user
- password password of the requesting user
<Campaigns>
<LeadCampaign>
<Id>{int}</Id>
<Name>{name of campaign}</Name>
<SlideshowId>{int}</SlideshowId>
<RequiresPhone>{true or false}</RequiresPhone>
<RequiresAddress>{true or false}</RequiresAddress>
<TargetedRegion></TargetedRegion>
<ForTagged>{tag targeted(if any)}</ForTagged>
<CallToAction>{call to action text}</CallToAction>
<OfferText>{offer text}</OfferText>
<StartedAt>{datetime}</StartedAt>
<PausedAt>{datetime}</PausedAt>
<CreatedAt>{datetime}</CreatedAt>
<UpdatedAt>{datetime}</UpdatedAt>
<EndedAt>{datetime}</EndedAt>
<MaximumDailySpend currency="USD">{$}</MaximumDailySpend>
<CostPerLead currency="USD">{$}</CostPerLead>
<FormPosition>{end or middle}</FormPosition>
<FormBlocking>{true or false}</FormBlocking>
<ForDownload>{true or false}</ForDownload>
<ForSidebar>{true or false}</ForSidebar>
<StateOfCampaign>{txt: Running, Paused, Stopped</StateOfCampaign>
</LeadCampaign>
…
<PromotionCampaign>
<Id>{int}</Id>
<Name>{name of campaign}</Name>
<SlideshowId>{int}</SlideshowId>
<TargetedRegion>{name of country}</TargetedRegion>
<ForTagged>{tag targeted(if any)}</ForTagged>
<StartedAt>{datetime}</StartedAt>
<PausedAt>{datetime}</PausedAt>
<CreatedAt>{datetime}</CreatedAt>
<UpdatedAt>{datetime}</UpdatedAt>
<EndedAt>{datetime}</EndedAt>
<MaximumDailySpend>{$}</MaximumDailySpend>
<SlideshareCategory>{category name}</SlideshareCategory>
<PromotionType>{category or contextual}</PromotionType>
<Cpc>{$}</Cpc>
<ClicksToday>{int}</ClicksToday>
<ClicksAlltime>{int}</ClicksAlltime>
<ImpressionsToday>{int}</ImpressionsToday>
<ImpressionsAlltime>{int}</ImpressionsAlltime>
<Ctr>{float}</Ctr>
<PauseCause>{text: can be "userAction", "dailyLimit", or "noFund"}</PauseCause>
<StateOfCampaign>{txt: Running, Paused, Stopped</StateOfCampaign>
</PromotionCampaign>
…
</Campaigns>
Get Leads Information For ALL Campaigns
- Request type HTTP POST
- Authorization Mandatory
- URL http://www.slideshare.net/api/2/get_user_leads
- username username of the requesting user
- password password of the requesting user
- begin only get leads collected after this UTC date: YYYYMMDDHHMM
- end only get leads collected before this UTC date: YYYYMMDDHHMM
For ruby/C people this is: strftime("%Y%m%d%H%M") We realize that we asking for input dates in UTC, but give out information in MNT time is funny, but we will fix this in the next revision.
Response XML Format
<Leads>
<Lead>
<SlideshowId>{int}</SlideshowId>
<Email>{txt}</Email>
<PhoneNo>{txt}</PhoneNo>
<Address>{txt}</</Address>
<PaidAt>{datetime}</</PaidAt>
<Rating>{int}</Rating>
<CreatedAt>{datetime}</CreatedAt>
<UpdatedAt>{datetime}</</UpdatedAt>
<Message>{txt}</Message>
<UserComment>{txt}</UserComment>
<City>{txt}</City>
<Country>{txt}</Country>
<Zipcode>{txt}</Zipcode>
<State>{txt}</State>
<Mechanism>{txt: download, sidebar, or player}</Mechanism>
<ReadAt>{datetime}</ReadAt>
<DeletedAt>{datetime}</DeletedAt>
<LeadCampaignId>{int}</LeadCampaignId>
<GeoData>
<Region></Region>
<Country></Country>
<City></City>
</GeoData>
<Cost>{$}</Cost>
<Name>{txt}</Name>
</Lead>
…
</Leads>
Get User Leads Information For A Specific Lead Campaign
- Request type HTTP POST
- Authorization Mandatory
- URL http://www.slideshare.net/api/2/get_user_campaign_leads
- username username of the requesting user
- password password of the requesting user
- begin only get leads collected after this UTC date: YYYYMMDDHHMM
- end only get leads collected before this UTC date: YYYYMMDDHHMM
For ruby/C people this is: strftime("%Y%m%d%H%M") We realize that we asking for input dates in UTC, but give out information in MNT time is funny, but we will fix this in the next revision.
Response XML Format
<Leads>
<Lead>
<SlideshowId>{int}</SlideshowId>
<Email>{txt}</Email>
<PhoneNo>{txt}</PhoneNo>
<Address>{txt}</</Address>
<PaidAt>{datetime}</</PaidAt>
<Rating>{int}</Rating>
<CreatedAt>{datetime}</CreatedAt>
<UpdatedAt>{datetime}</</UpdatedAt>
<Message>{txt}</Message>
<UserComment>{txt}</UserComment>
<City>{txt}</City>
<Country>{txt}</Country>
<Zipcode>{txt}</Zipcode>
<State>{txt}</State>
<Mechanism>{txt: download, sidebar, or player}</Mechanism>
<ReadAt>{datetime}</ReadAt>
<DeletedAt>{datetime}</DeletedAt>
<LeadCampaignId>{int}</LeadCampaignId>
<GeoData>
<Region></Region>
<Country></Country>
<City></City>
</GeoData>
<Cost>{$}</Cost>
<Name>{txt}</Name>
</Lead>
…
</Leads>
Notes about using API
In particular, do NOT write code that calls our API every time you get a web request. Cache the information so that you can serve it as needed to your users. API calls are limited to 1000 per day per API_Key. Calls that exceed this limit will receive an error message in the following format.
<SlideShareServiceError>
<Message id=99>Account Exceeded Daily Limit</Message>
</SlideShareServiceError>
In case your application needs to send more than 1000 API requests per day, e-mail us about your requirements.
