Pinterest Pagination API

Pinterest loads more results as you scroll. Each page has up to 25 pins, or up to 50 boards or profiles.


To get the next page, search again with the same parameters and the next_page_token from serpapi_pagination, or follow serpapi_pagination.next. When serpapi_pagination is missing, there's no next page.


The API endpoint is https://serpapi.com/search?engine=pinterest

Head to the playground for a live and interactive demo.

API parameters

Pagination

next_page_token

Optional

Parameter defines the next page token. It is used for retrieving the next page of results. Up to 25 pins, or up to 50 boards or profiles, are returned per page.

The next page token can be found in the SerpApi JSON response: serpapi_pagination -> next_page_token. It must be used with the same q, type, and less_ai as the search it comes from.

API examples

Result for  q: coffee corner ideas

serpapi_pagination has the next_page_token of the next page, and next, the SerpApi link to it.


JSON Example

{
  ...
  "search_parameters": {
    "engine": "pinterest",
    "q": "coffee corner ideas"
  },
  "pins": [
    ...
  ],
  "serpapi_pagination": {
    "next_page_token": "Y2JVSG81V2sxcmNHRlpWM1J5VFVad1YxWllaR3hpVmtZMldWVmFRMVV4U2xaWFZFWlhVak5v...",
    "next": "https://serpapi.com/search.json?engine=pinterest&next_page_token=Y2JVSG81V2sxcmNHRlpWM1J5VFVad1YxWllaR3hpVmtZMldWVmFRMVV4U2xaWFZFWlhVak5v...&q=coffee+corner+ideas"
  }
}

Result for  next_page_token

The next page of coffee corner ideas, with the next_page_token of the first page. Its own serpapi_pagination leads to the page after it.

Result for  next_page_token

JSON Example

{
  ...
  "search_parameters": {
    "engine": "pinterest",
    "q": "coffee corner ideas",
    "next_page_token": "Y2JVSG81V2sxcmNHRlpWM1J5VFVad1YxWllaR3hpVmtZMldWVmFRMVV4U2xaWFZFWlhVak5v..."
  },
  "pins": [
    {
      "pin_id": "e1_AfqPShyUyF7Y6JwPOs10ViXZm_r3EH9XE9NBTnEdGUMmA_6LQUEI",
      "title": "10 Cozy Coffee Corner Ideas for a Warm & Inviting Space",
      "link": "https://promikreis.de/cozy-coffee-corner-ideas/",
      "source": "promikreis.de",
      "thumbnail": "https://i.pinimg.com/236x/72/78/09/727809fbde58d18d2d2776bf7da71df5.jpg",
      ...
    },
    {
      "pin_id": "e1_AfqPShx8hudik2hkT4LSfkkPf3UFioRSFFGaj0NXdHQlXPaGciSU",
      "link": "https://simplespaces.net/coffee-bar-ideas/?utm_source=Pinterest&utm_medium=organic",
      "source": "simplespaces.net",
      "thumbnail": "https://i.pinimg.com/236x/a5/93/72/a593721a3289ef3d4ff897477f5ecc5a.jpg",
      ...
    },
    ...
  ],
  "serpapi_pagination": {
    "next_page_token": "Y2JVSG81V2sxcmNHRlpWM1J5VFVaU1ZsWlVSbXRX...",
    "next": "https://serpapi.com/search.json?engine=pinterest&next_page_token=Y2JVSG81V2sxcmNHRlpWM1J5VFVaU1ZsWlVSbXRX...&q=coffee+corner+ideas"
  }
}

Result for  type: boards

Pages of boards and profiles have up to 50 results, and the SerpApi link to the next page keeps type.

Result for  type: boards

JSON Example

{
  ...
  "search_parameters": {
    "engine": "pinterest",
    "q": "coffee corner ideas",
    "type": "boards"
  },
  "boards": [
    {
      "board_id": "477240960452986607",
      "name": "Coffee Corner Ideas",
      "link": "https://www.pinterest.com/coffeelifestyleblog/coffee-corner-ideas/",
      ...
    },
    ...
    {
      "board_id": "885661151660551386",
      "name": "Corner Coffee Bar Ideas",
      "link": "https://www.pinterest.com/coffeebarsolutions/corner-coffee-bar-ideas/",
      ...
    }
  ],
  "serpapi_pagination": {
    "next_page_token": "b281MHwxNjk1ODY1MDcwNjA5Mjk4KkdRTCp8OTIz...",
    "next": "https://serpapi.com/search.json?engine=pinterest&next_page_token=b281MHwxNjk1ODY1MDcwNjA5Mjk4KkdRTCp8OTIz...&q=coffee+corner+ideas&type=boards"
  }
}

Result for  next_page_token: invalid

A next_page_token Pinterest doesn't know returns an error instead of results.


JSON Example

{
  ...
  "search_parameters": {
    "engine": "pinterest",
    "q": "coffee corner ideas",
    "next_page_token": "invalid"
  },
  "error": "Invalid `next_page_token` parameter."
}

JSON structure overview

{
  ...
  "serpapi_pagination": {
    "next_page_token": "String - Token of the next page.",
    "next": "String - SerpApi link to the next page."
  }
}