Unsplash

FREE
By stefan.skliarov
Updated 5 months ago
Video, Images
6.6/10
Popularity Score
221ms
Latency
100%
Success Rate

Unsplash API Documentation

Unsplash. Beautiful, free photos. Gifted by the world's most generous community of photographers.

View API Details
POSTaddPhotoToCollection
POSTcreateCollection
POSTdeleteCollection
POSTgetAccessToken
POSTgetCollections
POSTgetCollectionsPhotos
POSTgetCollectionsRelatedCollections
POSTgetCuratedCollections
POSTgetCuratedPhotos
POSTgetFeaturedCollections
POSTgetMe
POSTgetPhotos
POSTgetPhotosDownloadLink
POSTgetPhotosStatistics
POSTgetPublicUserProfile
POSTgetRandomPhoto
POSTgetSingleCollection
POSTgetSinglePhoto
POSTgetUnsplashCounts
POSTgetUserPhotos
POSTgetUserPortfolioLink
POSTgetUsersCollections
POSTgetUsersLikedPhotos
POSTgetUsersStatistics
POSTlikePhoto
POSTremovePhotoFromCollection
POSTsearchCollections
POSTsearchPhotos
POSTsearchUsers
POSTunlikePhoto
POSTupdateCollection
POSTupdateMe
POSTupdatePhoto
POSTaddPhotoToCollection

Add photo to existing collection.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
accessTokenSTRING
REQUIREDUser access token
photoIdSTRING
REQUIREDPhoto id
collectionIdNUMBER
REQUIREDCollection id
Code Snippet
unirest.post("https://Unsplashstefan-skliarovV1.p.rapidapi.com/addPhotoToCollection")
.header("X-RapidAPI-Host", "Unsplashstefan-skliarovV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://Unsplashstefan-skliarovV1.p.rapidapi.com/addPhotoToCollection
Request Method: POST
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://Unsplashstefan-skliarovV1.p.rapidapi.com/addPhotoToCollection")
.header("X-RapidAPI-Host", "Unsplashstefan-skliarovV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication