user3649071
user3649071

Reputation: 66

Pinterest API: Getting the correct counts for a pin

I am using the Pinterest API and I am trying to get like and repin counts for a given pin across all of Pinterest. For example:

For this pin (https://www.pinterest.com/pin/91972017369448537/), I use the API and get 12 repins and 11 likes. However, if you look at the pin on a board (https://www.pinterest.com/poposandra/article/), it shows 43 repins and 17 likes.

It seems like the API is returning counts for that individual pin, and not accounting for all pins across Pinterest like the board is. Upon further investigating multiple pins, it appears they all share a common value in their link from the API:

Pin 1: https://www.pinterest.com/r/pin/488781365790538953/4779055074072594921/3f90bdeb42045ddb0d6d11c2fc6514a623a7c15bad73802c638bbd90210c2cfb

Pin 2: https://www.pinterest.com/r/pin/91972017369448537/4779055074072594921/d961cebaaba5439ef0b3af0ed387929e885825c9bdb03ea3066e72ae4a8768ea

From both pins, they value "4779055074072594921" is shared. Does anyone know what this value represents, and if its possible to search based on that value? Or is there a different way to get the same numbers as seen on boards from the API?? Thanks!

Upvotes: 2

Views: 1528

Answers (1)

woodchuck
woodchuck

Reputation: 303

You can use the following hook to retune all pins from the logged in user: https://api.pinterest.com/v1/me/pins/?access_token=******&fields=id%2Clink%2Cnote%2Curl%2Ccounts

Adding the count parameter will return an object with the like counts.

counts: {
  saves:0
  comments:0
}

As of June 30, 2017, repins are now called saves and likes are no longer exist.

Upvotes: 0

Related Questions