@todoforai/pinterest-api
v0.1.0
Published
JSON-first CLI for the Pinterest API v5 (pins, boards, analytics)
Readme
pinterest-api
JSON CLI for the Pinterest API v5: boards, sections, pins
(image URL / local image / video), search over your own pins and boards, account and pin analytics, plus a raw
api <METHOD> <path> escape hatch. Independent; not an official Pinterest CLI. Zero dependencies (Node ≥ 20).
printf %s "$TOKEN" | pinterest-api auth --token-stdin
pinterest-api boards create --json '{"name":"Launch","privacy":"PUBLIC"}'
pinterest-api pins create --json '{"board_id":"…","title":"…","link":"https://…","media_source":{"source_type":"image_url","url":"https://….jpg"}}'
pinterest-api pins create --json '{"board_id":"…","title":"…"}' --image ./cover.png
pinterest-api search pins --params '{"query":"ai"}' --all
pinterest-api user analytics --params '{"start_date":"2026-09-01","end_date":"2026-09-30"}'Auth: an OAuth 2.0 user access token (auth --token-stdin, bare or as the token-response JSON with
refresh_token + client_id/client_secret for auto-refresh) or PINTEREST_ACCESS_TOKEN.
Apps on Trial access only reach the sandbox: PINTEREST_SANDBOX=1.
Credentials: ~/.config/pinterest-api/credentials.json (0600).
bun test && bun run test:node