Jump to content

Getting more than 10 images from an API request to unsplash API


kayut

Recommended Posts

52 minutes ago, Ingolme said:

I don't know what the unsplash API is, but you should look for their documentation.

Unsplash is a website for royalty-free images. The designer I work with uses it sometimes.

Link to comment
Share on other sites

1 hour ago, kayut said:

When I send a /search/photos request to Unsplash API, I get a response with only 10 images.

Is it possible to get more than 10 images?

https://unsplash.com/documentation#search-photos

You'll need to send a per_page parameter stating how many results you want per request. (Defaults to 10, as observed)

Alternatively, to get the next set of results(10), you'll need a 'page' parameter.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...