Get a profile and its pins
curl --request POST \
--url https://api.stophy.dev/v1/pinterest/user \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user": "marthastewart",
"limit": 25
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({user: 'marthastewart', limit: 25})
};
fetch('https://api.stophy.dev/v1/pinterest/user', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/pinterest/user"
payload = {
"user": "marthastewart",
"limit": 25
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"profile": {
"url": "<string>",
"isVerified": true,
"isPrivate": true,
"id": "<string>",
"username": "<string>",
"name": "<string>",
"avatar": "<string>",
"followers": 0,
"bio": "<string>",
"website": "<string>",
"following": 0,
"pins": 0,
"boards": 0,
"createdAt": "2023-11-07T05:31:56Z"
},
"pins": [
{
"url": "<string>",
"isPromoted": true,
"id": "<string>",
"title": "<string>",
"text": "<string>",
"altText": "<string>",
"link": {
"url": "<string>",
"title": "<string>",
"description": "<string>",
"image": "<string>"
},
"domain": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"image": "<string>",
"width": 0,
"height": 0,
"dominantColor": "<string>",
"video": {
"url": "<string>",
"durationSeconds": 123
},
"saves": 0,
"reposts": 0,
"comments": 0,
"reactions": 0,
"author": {
"id": "<string>",
"username": "<string>",
"name": "<string>",
"url": "<string>",
"avatar": "<string>",
"isVerified": true,
"followers": 0
},
"board": {
"url": "<string>",
"id": "<string>",
"name": "<string>"
}
}
],
"cursor": "<string>"
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}Pinterest
Pinterest user API
Call the Pinterest user API to get profile and pins, as JSON or markdown. 1 credit per 25 items, at least 1 credit.
POST
/
v1
/
pinterest
/
user
Get a profile and its pins
curl --request POST \
--url https://api.stophy.dev/v1/pinterest/user \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user": "marthastewart",
"limit": 25
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({user: 'marthastewart', limit: 25})
};
fetch('https://api.stophy.dev/v1/pinterest/user', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/pinterest/user"
payload = {
"user": "marthastewart",
"limit": 25
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"profile": {
"url": "<string>",
"isVerified": true,
"isPrivate": true,
"id": "<string>",
"username": "<string>",
"name": "<string>",
"avatar": "<string>",
"followers": 0,
"bio": "<string>",
"website": "<string>",
"following": 0,
"pins": 0,
"boards": 0,
"createdAt": "2023-11-07T05:31:56Z"
},
"pins": [
{
"url": "<string>",
"isPromoted": true,
"id": "<string>",
"title": "<string>",
"text": "<string>",
"altText": "<string>",
"link": {
"url": "<string>",
"title": "<string>",
"description": "<string>",
"image": "<string>"
},
"domain": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"image": "<string>",
"width": 0,
"height": 0,
"dominantColor": "<string>",
"video": {
"url": "<string>",
"durationSeconds": 123
},
"saves": 0,
"reposts": 0,
"comments": 0,
"reactions": 0,
"author": {
"id": "<string>",
"username": "<string>",
"name": "<string>",
"url": "<string>",
"avatar": "<string>",
"isVerified": true,
"followers": 0
},
"board": {
"url": "<string>",
"id": "<string>",
"name": "<string>"
}
}
],
"cursor": "<string>"
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}- Endpoint:
pinterest.user - Returns:
datahasprofile,pins. - Cost: 1 credit per 25 items, at least 1 credit. Failed calls cost nothing.
- Paging: Yes. Send the
cursorfrom the response to get the next page. See Paging.
Example
import { Stophy } from "stophy";
const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
const result = await stophy.pinterest.user({ user: "marthastewart", limit: 25 });
console.log(result.data.profile);
from stophy import Stophy
stophy = Stophy() # reads STOPHY_API_KEY
result = stophy.pinterest.user(user="marthastewart", limit=25)
print(result["data"]["profile"])
curl -X POST https://api.stophy.dev/v1/pinterest/user \
-H "Authorization: Bearer $STOPHY_API_KEY" \
-H "content-type: application/json" \
-d '{"user":"marthastewart","limit":25}'
stophy pinterest user marthastewart --limit 25
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json