{"id":41735,"library":"pinterest-node-api","title":"pinterest-node-api","description":"Unofficial Node.js wrapper for the Pinterest v5 REST API (0.0.10, last updated 2021). Supports ES5/6/8, TypeScript, async-await, promises, and callbacks. Provides coverage for Ads, Pins, Boards, Catalogs, User Account endpoints. No official Pinterest SDK for Node exists; this is a community-maintained alternative. Release cadence is low; relies on access token authentication.","status":"maintenance","version":"0.0.10","language":"javascript","source_language":"en","source_url":"https://github.com/vijaypatoliya/pinterest-node-api","tags":["javascript","pinterest","pinterest node","pinterest node API","pinterest API","pinterest sdk","pinterest users API","pinterest boards API","pinterest pins API"],"install":[{"cmd":"npm install pinterest-node-api","lang":"bash","label":"npm"},{"cmd":"yarn add pinterest-node-api","lang":"bash","label":"yarn"},{"cmd":"pnpm add pinterest-node-api","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"HTTP client used internally for API requests","package":"axios","optional":false}],"imports":[{"note":"Version 0.0.9+ uses a factory function; you must call it with your token.","wrong":"const pinterest = require('pinterest-node-api'); // missing factory call","symbol":"default export (factory)","correct":"import pinterestFactory from 'pinterest-node-api'; const pinterest = pinterestFactory('ACCESS_TOKEN');"},{"note":"TypeScript usage via class instantiation, as shown in README.","wrong":"const PinterestAPI = require('pinterest-node-api').PinterestAPI; // no named export","symbol":"PinterestAPI class","correct":"import PinterestAPI from 'pinterest-node-api'; const pinterest = new PinterestAPI(); pinterest.setUserToken('ACCESS_TOKEN');"},{"note":"Must call setUserToken, not assign directly.","wrong":"pinterest.accessToken = 'TOKEN'; // not a property","symbol":"access token setter","correct":"pinterest.setUserToken('TOKEN');"}],"quickstart":{"code":"import pinterestFactory from 'pinterest-node-api';\n\nconst pinterest = pinterestFactory(process.env.PINTEREST_USER_TOKEN ?? '');\n\nasync function getUser() {\n  try {\n    const user = await pinterest.user_account.get();\n    console.log('User:', user);\n  } catch (error) {\n    console.error('Error:', error.message);\n  }\n}\n\ngetUser();","lang":"typescript","description":"Demonstrates how to import the factory, instantiate with an access token from env, and call user_account.get()."},"warnings":[{"fix":"Update to version 0.0.10 via npm install pinterest-node-api@0.0.10","message":"The factory function returns a Pinterest instance with methods bound incorrectly in older versions. Ensure you are using version 0.0.10.","severity":"gotcha","affected_versions":"<0.0.10"},{"fix":"After calling a method, use response.data to get the JSON body.","message":"Methods return Axios response objects, not raw data. You must access .data to get the API response body.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Use import or const pinterest = require('pinterest-node-api')('TOKEN');","message":"The import style changed from require factory call to default import in v0.0.9. require('pinterest-node-api') no longer works as a constructor.","severity":"breaking","affected_versions":">=0.0.9"},{"fix":"Use async/await instead of callbacks.","message":"Support for callback-based usage is deprecated; promises and async-await are preferred.","severity":"deprecated","affected_versions":">=0.0.10"}],"env_vars":null,"search_vec":"'0.0.10':14 '2021':17 'access':57 'account':35 'ad':30 'altern':50 'api':4,13,66,68,73,76,79 'async':22 'async-await':21 'authent':59 'await':23 'board':32,75 'cadenc':52 'callback':26 'catalog':33 'communiti':48 'community-maintain':47 'coverag':28 'endpoint':36 'es5/6/8':19 'exist':43 'javascript':60 'last':15 'low':54 'maintain':49 'node':3,42,63,65 'node.js':6 'offici':38 'pin':31,78 'pinterest':2,10,39,61,62,64,67,69,71,74,77 'pinterest-node-api':1 'promis':24 'provid':27 'releas':51 'reli':55 'rest':12 'sdk':40,70 'support':18 'token':58 'typescript':20 'unoffici':5 'updat':16 'user':34,72 'v5':11 'wrapper':7","created_at":"2026-06-04T18:53:51.533383+00:00","updated_at":"2026-06-04T18:53:51.533383+00:00","problems":[{"fix":"const pinterest = require('pinterest-node-api')('YOUR_TOKEN');","cause":"Using require without calling the factory, e.g., const pinterest = require('pinterest-node-api');","error":"TypeError: pinterest.user_account.get is not a function"},{"fix":"Set a valid PINTEREST_USER_TOKEN environment variable or pass token to factory.","cause":"Missing, expired, or invalid access token.","error":"Error: Request failed with status code 401"},{"fix":"Access .data on the result, e.g., const data = (await pinterest.user_account.get()).data;","cause":"Assuming method returns raw data, but it returns an Axios response object.","error":"Cannot read property 'data' of undefined"},{"fix":"Run npm install pinterest-node-api --save in your project directory.","cause":"Package is not installed or is installed globally but not locally.","error":"Module not found: 'pinterest-node-api'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/vijaypatoliya/pinterest-node-api","github":"https://github.com/vijaypatoliya/pinterest-node-api","docs":null,"changelog":null,"pypi":null,"npm":"pinterest-node-api","openapi_spec":null,"status_page":null,"smithery":null,"categories":["social"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}