PkmnPrices5 min read

Use the PkmnPrices API with Claude Code, Cursor, and Codex

Point Claude Code, Cursor, or Codex at /llm.md and our OpenAPI spec, then generate working Python and TypeScript integrations with the official SDKs.

AI coding tools write integrations fast when they can read your API. Point Claude Code, Cursor, or Codex at the PkmnPrices docs URLs, and they can wire up card search and live market prices without you hand-holding every endpoint.

This guide shows the two AI-readable surfaces we publish, how to attach them in each tool, and the same lookup in both official SDKs — Python (pkmnprices) and TypeScript (@pkmnprices/sdk).

What you'll learn

  • When to use /llm.md vs /openapi.json
  • How to give Claude Code, Cursor, and Codex API context
  • The list-then-get price pattern both SDKs share
  • How to keep API keys off the client and respect credits

AI-readable docs

Quick reference: /llm.md

code
https://pkmnprices.com/llm.md

Also available on the API host as https://api.pkmnprices.com/llm.md. Concise markdown built for LLM context windows: auth, plans, endpoints, and response shapes.

Full schema: OpenAPI

code
https://pkmnprices.com/openapi.json

Same document at https://api.pkmnprices.com/openapi.json. Auto-generated from the API — paths, parameters, schemas, and the x-api-key security scheme.

Reading either URL needs no API key. Calling /v1/cards (and the rest of the data API) does:

code
x-api-key: pk_your_key_here

Grab a free key from the dashboard.

Claude Code

Paste a docs URL into the prompt, or pin it in CLAUDE.md:

markdown
## External APIs
PkmnPrices API:
- Quick ref: https://pkmnprices.com/llm.md
- OpenAPI: https://pkmnprices.com/openapi.json
- Auth: x-api-key header
- Prefer official SDKs: pkmnprices (Python), @pkmnprices/sdk (TypeScript)

Example prompt:

code
Read https://pkmnprices.com/llm.md and use the pkmnprices Python SDK to
search for a card by name, then fetch its USD market prices.

Cursor

Fetch the quick ref with @web, or add a project rule:

code
When working with Pokemon card prices, use the PkmnPrices API.
Quick ref: https://pkmnprices.com/llm.md
OpenAPI: https://pkmnprices.com/openapi.json
Auth: x-api-key. Prefer @pkmnprices/sdk in TypeScript.

Example:

code
@web https://pkmnprices.com/llm.md
Create a small TypeScript script with @pkmnprices/sdk that searches for
"charizard" and prints the first card's market prices.

Codex

Put the same pointers in AGENTS.md (or your project instructions) so Codex loads them every session:

markdown
## PkmnPrices
- https://pkmnprices.com/llm.md
- https://pkmnprices.com/openapi.json
- Auth header: x-api-key
- SDKs: pkmnprices (Python), @pkmnprices/sdk (JS/TS)
- List endpoints do not include prices — always GET by id for prices

Worked example: search, then price

List calls return summaries without prices. Fetch a single card (or sealed product) by id to get prices. That split trips people up — say it in the prompt.

Prompt

code
Using https://pkmnprices.com/llm.md, write a short program that:
1. Searches cards named "charizard" (per_page 5)
2. Fetches the first result by id with currency=usd
3. Prints name, set, and each market_price with the right $ or € symbol
Use the official SDK. Store the key in an env var. Never hardcode it.

Python (pkmnprices)

bash
pip install pkmnprices
export PKMNPRICES_API_KEY=pk_your_key_here
python
import os
from pkmnprices import PkmnPrices
client = PkmnPrices(os.environ["PKMNPRICES_API_KEY"])
page = client.cards.list(name="charizard", per_page=5)
card = client.cards.get(page.data[0].id, currency="usd")
print(f"{card.name}{card.set.name}")
for price in card.prices:
symbol = "€" if price.currency == "EUR" else "$"
print(f" {price.source}: {symbol}{price.market_price}")
client.close()

TypeScript (@pkmnprices/sdk)

bash
npm install @pkmnprices/sdk
export PKMNPRICES_API_KEY=pk_your_key_here
ts
import { PkmnPrices } from "@pkmnprices/sdk";
const client = new PkmnPrices({ apiKey: process.env.PKMNPRICES_API_KEY! });
const { data } = await client.cards.list({ name: "charizard", per_page: 5 });
const card = await client.cards.get(data[0].id, { currency: "usd" });
console.log(`${card.name}${card.set.name}`);
for (const price of card.prices) {
const symbol = price.currency === "EUR" ? "€" : "$";
console.log(` ${price.source}: ${symbol}${price.market_price}`);
}

Going further

Need a Discord /price command? We already walked through that with the Python SDK: Building a Pokémon Price Discord Bot.

Same list-then-get pattern powers sealed products, price history, and eBay / TCGplayer listings — see the API docs and LLM Integration section.

Tips for better generations

Be specific. "Make a Pokemon price app" is vague. Name the docs URL, the SDK, the env var, currency handling, and the list-then-get steps.

Keep keys server-side. Browser code should call your backend; your backend calls PkmnPrices with x-api-key.

Expect 429s. Free tier is 100 credits/day and 60 requests/minute. SDKs retry rate-limit 429s; credit-limit 429s wait until the next day — handle them in UX.

Read currency on every price. Format $ / from the field; do not convert between USD and EUR.

Frequently asked questions

Should I give the model /llm.md or OpenAPI?
Use /llm.md for quick tasks and small context windows. Use /openapi.json when the agent needs exact schemas, every query param, or to generate a typed client. Many workflows load /llm.md first and OpenAPI only if something is ambiguous.
Why use an SDK instead of raw fetch?
The official SDKs send x-api-key for you, type the responses, page results, and retry rate-limit 429s. You spend tokens on product logic instead of HTTP plumbing.
Do I need an API key to read the docs?
No. /llm.md and /openapi.json are public. You only need a key (dashboard → free tier is fine) to call /v1 data endpoints.
Why doesn’t cards.list return prices?
List responses stay lean for search UIs. Call cards.get(id) (or sealed.get) for the prices array. Say that explicitly in your prompt so the model does not invent a prices field on list items.

Get started

  1. Create a free key in the dashboard
  2. Skim LLM Integration and copy the system prompt
  3. Point your coding agent at /llm.md (and OpenAPI when you need the full schema)

That’s enough context for Claude Code, Cursor, or Codex to ship a working integration in one sitting.

PkmnPrices

Written by

PkmnPrices

PkmnPrices is a developer API for Pokémon TCG data: daily TCGPlayer pricing across 54,000+ cards, 650+ sets, and sealed products.