Skip to content
pin

Introduction

What pin is and how it is put together.

pin crawls public Pinterest pins, boards, and users into structured records.

It is a single binary. It reads Pinterest the way a logged-out browser does, shapes the responses into clean records, and gets out of your way. There is no API key, nothing to sign up for, and nothing to run alongside it. pin is an independent tool and is not affiliated with Pinterest.

How it is built

  • A library package (pinterest) holds the HTTP client and the typed data models. It paces requests, sets an honest User-Agent, and retries the transient failures any public site throws under load. Board and profile metadata come from the JSON a page embeds (__PWS_INITIAL_PROPS__); everything that paginates comes from Pinterest's public resource API.
  • A domain (pinterest/domain.go) declares each operation once on the any-cli/kit framework. That single declaration becomes a CLI command, an HTTP route, an MCP tool, and a resource-URI dereference.
  • A thin cmd/pin hands the assembled app to kit.Run, which builds the command tree and the serve and mcp surfaces.

One operation, four surfaces

Because an operation is surface-neutral, the same get you run on the command line is also a route and a tool:

pin get <ref>                      # the command
pin serve --addr :7777             # GET /v1/get/<ref>
pin mcp                            # the get tool, over stdio
ant get pinterest://pin/<id>       # the URI dereference (via a host)

What it reads

The read commands cover pins, boards, users, topics, and the trending interests:

pin get <ref>          pin board show <ref>      pin user show <name>
pin search <query>     pin board pins <ref>      pin user pins <name>
pin related <ref>      pin board sections <ref>  pin user boards <name>
pin topic <slug>
pin trending

Two offline tools, pin ref id and pin ref url, classify and build references without touching the network.

Scope

pin is a read-only client over data Pinterest already serves publicly. That narrow scope keeps it a single small binary with no database, no daemon, and no setup.

Next: install it, then take the quick start.