Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including unsplash-search with all npm packages installed. Try it out:

var unsplashSearch = require("unsplash-search")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

unsplash-search v1.0.2

Unsplash search wrapper. (Typescript)

Unsplash Search Wrapper (Typescript)

Coverage Status Build Status

Unsplash? Beautiful, free photos brought to you by the world’s most generous community of photographers. With this module, you can search on Unsplash, access the credits and download high-resoulution version. (even raw)

You can integrate it to the admin panel, use in web page, electron app or in node app.


  • Search in
    • all Unsplash photos
    • only landscapes
    • only portraits
    • only squarish (Instagram ready)
  • Result includes
    • Author credits
    • Links (raw, download, full-size, thumbnail)
    • Related color
    • Dimension
    • Likes


Getting Started


npm install unsplash-search

Basic Usage

Create an instance with a valid API access key (see Requirements) A working demo on (Made with React) Demo source code also avialable on

import UnsplashSearch from 'unsplash-search';

const accessKey = '<your api access key>';
const provider = new UnsplashSearch(acessKey);

// Search 'berlin' and get 3rd page
  .searchAll('berlin', 3)
  .then(data => {
    console.log('Total images in result:', data.totalImages);
    console.log('Total pages', data.totalPages);

    data.images.forEach(image => {
        `Taken by ${} and download on ${image.urls.full}`
  .catch(error => error);

alt text

API Methods

Following methods available names and paramters (if available) describe it self.

searchAll(query, page)

Searches in all available photos

searchLandscapes(query, page)

Searches only landscape oriented photos

searchPortraits(query, page)

Searches only portrait oriented photos

searchSquares(query, page)

Searches only square size photos


Returns your API query limit


Returns your remaining API call


Returns active setting for how many images will be in result. Default is 10.


Set setting for how many images will be in result Max is 30 according to Unsplash API.


  • Unsplash official API has orient base search but the images in result may not be your selection.
  • Obviously the wrapper uses the Unsplash API so, respect to API query limitations.


ISC License - Arif Aydogmus


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free