Build a Pinterest keyword tracker with AI: prompts and setup

Build your own Pinterest keyword tracker on a Mac, move it online and connect it to AI. Copy the three prompts, developer-app answers and example requests.

Video walkthrough · 18 min 45 sec

Watch the build, then copy the prompts.

Follow the video alongside the written steps below. Keep the data dates, volume bands and account requirements in view as you build.

What you will build

Your own searchable keyword list with dated trend data, available volume bands and a CSV export, plus an optional online and AI connection.

Beginner-friendly prompts; API access and account setup required. Start with the supplied example, check the result, then adapt it to your work.

Download all prompts and texts

A plain-text copy of the three build prompts, developer-app wording, example AI requests and setup notes. No tokens or private settings included.

How it works

From a topic to a checked keyword list

A workflow to build from this guide. API access and real returned data must be checked before relying on the results.

From a topic to a checked keyword list. A workflow to build from this guide. API access and real returned data must be checked before relying on the results.
  1. You: Choose seed words. Pick topics that fit the content you want to make.
  2. Pinterest API: Collect trends. Request the available lists for one chosen country.
  3. Your tracker: Access and data OK?. Check errors, dates and missing values. Alternative route (No): Keep the last good data. Show the error or missing values. Resolve access before collecting again. Main route (Yes): continue to the next step.
  4. Your database: Save the records. Keep raw bands, growth and collection dates.
  5. You: Choose an idea. Search the table, export a CSV or use read-only AI.

Build your own Pinterest keyword tracker

If you came from Episode 7, this is the page with the three prompts, the developer-app wording and the steps behind the build. You start with a tracker on your Mac, move it online if you need daily collection, then give a compatible AI app read-only access to the saved keywords.

The useful part is having one searchable list instead of checking the same ideas repeatedly. Choose a topic, collect the available terms, keep their dates and compare the results. You still decide whether a keyword suits your content.

This is a build-your-own walkthrough, not a hosted tracker or a promise of Pinterest API approval. The prompts below follow the recording, with added checks for current API fields, hosting eligibility and authentication. You can copy each prompt or download everything as one text file.

What you need before you start

For the local version, use a Mac, Node.js, a code editor or terminal, and a coding assistant such as Claude Code with an account that supports your chosen use. You also need your own Pinterest developer app and authorised API access. The volume part needs access to an eligible ad account. Creating ads or spending on ads is not a step in this guide.

GitHub, Turso and Vercel are needed only for the online version shown here. A compatible AI account is needed only for the MCP connection. You can stop after the local tracker and export a CSV instead.

The guide and prompts are free to read. Your coding assistant, AI account, API access or hosting may have costs or eligibility requirements. Turso offers a free tier with limits. Vercel Hobby is restricted to non-commercial personal use, so check the fit before hosting a business or monetised-blog tool there.

Step 1: create your Pinterest developer app

Open Pinterest Developers while signed in to the account you intend to use. Create an app for your actual project. Use your own website, privacy policy and square app icon. The example name in the recording is “My blog keyword tracker”.

The following answers are starting wording for a personal content-planning tool. Adapt them to what you are building and to the options Pinterest currently shows. Do not use JS Automates as your company website or privacy-policy address.

App approval, token creation and permission to call a particular endpoint are separate checks. Follow the access shown in your developer account. A temporary token is not a way around app review, permissions or rate limits.

FieldExample answer to adapt
App nameMy blog keyword tracker
Company websiteYour own working website URL
Privacy policyYour own policy describing this tool and its data use
Developer purposePersonal API access, if this accurately matches your use
Use casesReporting
Other use caseReading Pinterest Trends to plan blog posts
AudienceCreators
Reads Pins or boards?No, for this keyword-only version
App iconYour own square PNG

Developer-app purpose text

For a personal version without other people signing in, you can adapt this description. If you later connect an external AI service, update the description and privacy information to match the data you actually share. Do not claim that nothing is shared if selected keyword records are sent to that service.

App purpose: edit this to match your actual use
Personal tool for planning content for my own blog. It reads available Pinterest Trends and keyword metrics through my authorised account and stores keyword records for my own research. No other users sign in. If I connect an AI service, I share selected keyword records with that service for content planning.

Prompt 1: build the tracker on your Mac

Create an empty project folder and open it in your coding assistant. Paste this prompt, then enter private settings directly into the local environment file when asked. Do not paste tokens into a public chat, recording or screenshot.

The first version should work locally before you add hosting or AI access. Ask the assistant to explain an error in plain language rather than replacing missing API results with sample numbers.

Copy prompt 1 into Claude Code or your coding assistant
Build a simple Pinterest keyword tracker in this folder that runs on my Mac. I'm a beginner, so create the project, install what is needed and start it. Ask me before any paid service or account action.

- Use Next.js with a local SQLite database file.
- Read PINTEREST_ACCESS_TOKEN from .env.local. I will enter the token myself. Never print secrets, put them in browser code or commit .env.local.
- Check my token's actual access before collecting. Explain an expired token, a missing permission, an unavailable endpoint and a rate limit separately. Do not assume an unapproved app has access.
- Add a Connect Pinterest button for later, using Pinterest OAuth with the required read scopes, initially user_accounts:read and ads:read. Use http://localhost:3000/api/callback as the local redirect, registered exactly in my app. Use the connected account instead of the temporary token after a successful login. Refresh only when Pinterest supplies a valid refresh token, and show when reconnection is needed.
- Add a Collect now button. Start with these editable seed words: nails, bedroom, dinner, wedding, travel, crafts, outfit, christmas.
- For each seed, request the growing, seasonal, monthly and yearly top-trend lists for the US region. Keep the returned keywords, available growth values, country, source list and collection time. Deduplicate keywords and save dated snapshots.
- Fetch available country keyword-volume bands for the collected keywords using an ad account I am authorised to access. Missing volume must stay unknown, not zero. Preserve the raw band and sort by its parsed lower bound, with unknown bands last.
- Show a searchable table, last successful collection, failures and a CSV download. Keep the date and country in the export.
- Add a desktop launcher that starts the app and opens my browser, so I do not need to type commands every time.
- Create a placeholder-only .env.example, keep .env.local ignored by Git, and tell me which values to enter privately.

Use the current official Pinterest API v5 specification and verify request and response fields before implementing:
- POST /v5/oauth/token for token exchange, with the documented client authentication.
- GET /v5/trends/keywords/US/top/{growing|seasonal|monthly|yearly}, filtered by include_keywords, with up to 50 results per call.
- GET /v5/ad_accounts to find my accessible account, following pagination.
- GET /v5/ad_accounts/{id}/keywords/metrics with country_code=US and comma-separated keywords. Check the actual volume field against the current schema; do not assume its letter case.
Batch requests within the documented limits. Respect rate limits, avoid overlapping collections and preserve partial results if a run stops. Do not create ads, Pins or boards.

Connect your account and check the first collection

Generate or authorise a token through the supported options in your developer account. Enter it into .env.local yourself. If your app does not have the required access yet, keep the build ready and follow Pinterest’s review process. Do not repeatedly generate tokens to try to bypass a permission error.

Run Collect now with one seed first. Open a saved keyword and check the country, collection time, source list, raw volume band and any growth values against the API response. Then try the remaining seeds.

An empty result is allowed. Some keywords have no returned volume, and some filters produce few terms. Unknown is different from zero. A successful screen also needs a successful database save: restart the app and confirm the same records are still there.

CheckExpected result
Same collection repeatedExisting keywords stay deduplicated; dated observations remain distinguishable
Missing volumeShown as unknown, not zero
Expired or rejected tokenClear error with the actual access problem
CSV exportCountry, collection date and raw bands remain attached
Restart the local appSaved records are still available

Prompt 2: put the tracker online

Use the same project conversation once the local version works. This stage moves the database to Turso, deploys the dashboard on Vercel and adds a daily collection job. Your Mac can then be off while the hosted job runs, provided the deployment, credentials and provider access remain available.

Check the hosting choice before you deploy. On Hobby, Vercel cron is limited to once per day and may run anywhere within the selected hour. Its published function maximum is five minutes; that is a ceiling, not a promise that a collection will finish. Keep collection small enough to fit, save progress and inspect failures.

Copy prompt 2 after the local tracker works
Now move this tracker online using Vercel and a Turso database, and walk me through the parts I need to do myself.

- First explain the current hosting eligibility and costs. Vercel Hobby is for non-commercial personal use. Do not assume it covers a business or monetised blog, start a trial, upgrade or accept terms for me. Show the appropriate options and wait for my decision where necessary.
- Replace the local SQLite connection with a Turso-compatible database connection. Keep database credentials server-side. Prepare and verify the schema migration, preserve existing rows, and keep a backup of my local database.
- Add a daily Vercel cron job that calls the same collection code as Collect now. Protect it with a separate cron secret. Check the current plan's schedule, function duration and usage limits. Save progress and prevent overlapping runs; do not assume all API calls fit in one invocation.
- Add a proper password login for the dashboard and protect its data and collection routes. Keep the MCP route separate so an approved AI connection can authenticate correctly. Do not expose my keyword list simply because a URL is hard to guess.
- Keep the temporary Pinterest token option. For OAuth, use https://MY-APP.vercel.app/api/callback, replacing MY-APP with my real deployment and registering that exact redirect in Pinterest.
- Prepare the code for a private GitHub repository, excluding .env.local, local databases, tokens and exports. Ask before creating a repository or publishing it.
- Tell me exactly where to enter my private Turso, Pinterest, login and cron settings in Vercel, without pasting their values into chat or screenshots.
- After deployment, test login, authorised collection, CSV download, persistence after redeployment and rejection of unauthorised requests. Report what was actually tested and what still depends on Pinterest access.

Private settings and redirect URLs

Keep three jobs separate: Pinterest authorisation lets your app collect data, dashboard login lets you view the table, and MCP authentication lets an approved AI client read selected results. A password on the web page does not automatically protect every API route.

After deployment, set the Pinterest callback to your real HTTPS application address ending in /api/callback. Register exactly the same redirect in Pinterest. The localhost callback is for the Mac version; the hosted callback belongs to the online version.

Enter production secrets through the hosting provider’s private environment settings. A private GitHub repository is useful, but it is not a safe place to commit tokens or database exports. Keep a backup before migrating existing records and check that the row count and a sample of values match afterward.

SettingWhere it belongs
PINTEREST_ACCESS_TOKENServer-only local or hosting environment
Pinterest app ID and secretOAuth configuration; secret stays server-side
Turso database URL and tokenServer-only database configuration
Dashboard password or login secretServer-side login configuration
Cron secretProtected scheduled collection route
MCP credentialsThe supported authentication flow for the chosen AI client

Prompt 3: let AI search your saved keywords

MCP gives a compatible AI app a way to call a small set of tools. Here those tools read the keywords your tracker has already saved. They do not grant the AI permission to run your Pinterest account.

The recording uses a secret in the endpoint link as a simple demonstration. For an online private tracker, use the authentication supported by your AI client. A link with a key can be copied into history or logs. ChatGPT supports OAuth for a private custom connection and does not send arbitrary custom API-key headers.

Copy prompt 3 after choosing a supported authentication method
Add a read-only MCP endpoint at /api/mcp using Vercel's mcp-handler package, so compatible AI apps can query the keywords already saved in my tracker.

Expose tools for searching keywords, listing top keywords by stored volume bands, and reading the latest collected trends. Return country, collection time, raw volume band and available growth values. If collection is stale or a value is missing, say so. Never invent a search count or treat a volume band as an exact number.

Do not give the AI tools for collecting new data, changing settings, posting Pins, creating ads or modifying the database. Validate inputs and limit result sizes.

Use authentication supported by the intended AI client. For a private ChatGPT connection, implement compatible OAuth following the current official OpenAI and MCP documentation. Do not assume ChatGPT can send a custom API-key header. Keep dashboard login, cron authentication and MCP authentication separate, and test that unauthorised calls cannot read data.

The recording shows a secret key in a URL as a simple demonstration. Do not use that as the default online protection: URLs can be saved in history and logs. Explain the supported authentication setup and let me enter credentials privately.

Give me the final endpoint, the steps to connect it, and a short verification checklist. Do not claim it works in every AI app; provide CSV export as the alternative for an app that supports file uploads but not MCP.

Connect the tracker to ChatGPT

In ChatGPT on the web, open Plugins, choose the plus button and Add custom MCP server. Give the tracker a name, enter your hosted endpoint and configure its supported authentication. Review the requested tools before creating and enabling the plugin. Workspace permissions and security restrictions can affect availability.

Use the endpoint that was actually built. An app deployed at /api/mcp should use that path; a separate local demonstration server might use /mcp instead. Do not copy a temporary tunnel address from a recording.

For the first test, ask for the tracker’s last collection time and a few saved keywords. Check that the results match the table. If the app cannot connect, inspect the authentication and endpoint response rather than making the keyword database public. If your AI app supports file uploads instead, export a CSV and work from that dated file.

Texts to try once the connection works

Ask for ideas from the records you actually collected. Include the country and collection date in the answer, and keep reported volume bands intact. These examples work as requests to adapt, not claims about current keyword results.

Example requests for the connected tracker or an uploaded CSV
Give me 5 Pin ideas about chili using only the keywords in my tracker. Show each keyword's stored search-volume band, country and collection date. Say if there are no matching records.

Among my stored US keywords whose volume-band lower bound is at least 500,000, which have the highest reported month-over-month growth? Show missing growth as unknown and keep the original bands.

Give me ten bedroom decor keyword ideas for next week's Pins, using only my saved records. Separate the recorded data from your suggested content angles. Do not invent keywords or current search counts.

What this tracker can and cannot tell you

The tracker can help you organise a repeatable research process. It cannot give you every Pinterest search, guarantee a keyword’s performance or tell you how many visitors a Pin will bring to your site.

A first collection is a snapshot. Reported weekly or monthly growth is not the same as a history your own database has measured. Keep both labelled, along with the date and country. Stale data should stay visibly stale until the next successful collection.

If access expires, a collection fails or a free allowance is exhausted, the online address can still load while its data stops updating. Check the last successful run before planning from it. Keep an owner and a recovery step for the tool, even when most of the work is automated.

Start small, then keep the useful parts

Get one seed and one saved result working locally. Check the numbers and export. Move it online only when you need scheduled collection, then add AI access if it saves you time finding ideas in the data.

If you want help learning to build a tool like this, you can bring the project to personal coaching. For a wider workflow, first decide which repeated step you want to remove and what a checked result should look like.

Take this into your own business.

For a connected setup, see ai automation and agents. I can adapt the workflow to your tools and the people using it.

If you want to build it yourself, bring your questions to a one-hour consultation or work through it over several coaching sessions.

Ask about your version