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


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?


According to the documentation, there is a per_page value that you can set that increases it beyond the default to 10.


Thanks @kirupa. I added that option and it’s loading 30 images now, which seems to be the max number of images per page. Now, I’m trying to find out how to add pagination to my app.


import React, { Component } from "react";
import axios from "axios";

import ImageList from "../ImageList";

class App extends Component {
  state = {
    images: []
  onSearchSubmit = async inputValue => {
    const API_KEY = "1234";

    const response = await axios.get(

    this.setState({ images: });

  render() {
    return (
        <ImageList images={this.state.images} />

export default App;


import React, { Component } from "react";

class Gallery extends Component {
  render() {
    const childElements = => {
      return (
        <li key={}>

    return (

export default Gallery;

Any help would be great!


You should look into React Router! It is perfect for this kind of work. I am actually part-way through a tutorial on using React Router with the unsplash API to navigate between pages of images! No ETA on when it will be completed, unfortunately.


I can’t wait to go through your tutorial. Please let’s know once it’s ready.
Meanwhile, I pushed my project to CodeSandBox:
maybe some one can have a look and help me to fix the issue.


The basic React Router tutorials should be able to help you out. I wrote a basic one here: