1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "searchPins",
12 "startUrls": [],
13 "keywords": [
14 "minimalist kitchen"
15 ],
16 "pinUrls": [
17 "https://www.pinterest.com/pin/142567144448888376/"
18 ],
19 "usernames": [
20 "nasa"
21 ],
22 "boardUrls": [
23 "https://www.pinterest.com/nasa/ceres/"
24 ],
25 "ideaUrls": [
26 "https://www.pinterest.com/ideas/beauty/935541271955/"
27 ],
28 "ideaSlugs": [],
29 "maxItems": 1,
30 "maxPages": 1,
31 "language": "en",
32 "verifiedOnly": false,
33 "requireOutboundLink": false,
34 "imageOnly": false,
35 "excludeAds": false,
36 "commerceOnly": false,
37 "enrichPinDetails": false,
38 "includeComments": false,
39 "includeIdeaPins": false,
40 "maxComments": 10
41};
42
43
44const run = await client.actor("nimbryxo-studio/pinterest-pins-profiles-boards-and-idea-topics").call(input);
45
46
47console.log('Results from dataset');
48console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
49const { items } = await client.dataset(run.defaultDatasetId).listItems();
50items.forEach((item) => {
51 console.dir(item);
52});
53
54