Pokémon card prices in Google Sheets
One formula, one card, today's market price as a real number you can sum. Paste a short script into your sheet once and this works in every cell:
=POKELENZ_PRICE("sv03.5", 199)Returns $291.59 today, the price of Charizard ex #199.
Set it up in three steps
- Open the script editor. In your Google Sheet, open the Extensions menu and choose Apps Script. A code editor opens in a new tab.
- Paste the PokeLenz script. Delete whatever is in the editor, paste the script from this page, and press Save. You can close the tab afterwards.
- Type the formula. Back in the sheet, type =POKELENZ_PRICE("sv03.5", 199) in any cell. The price appears after a moment of "Loading".
The script only fetches prices from pokelenz.com. It does not read your sheet, your files or your account.
The three formulas
| Formula | Gives you |
|---|---|
| =POKELENZ_PRICE("sv03.5", 199) | Market price in USD of the card's highest-priced printing, the headline number on its PokeLenz page. |
| =POKELENZ_PRICE("sv08", 1, "reverse") | Price of one printing. Use normal, holo, reverse, 1st edition and so on. If the card has no such printing, hover the error to see the ones it does have. |
| =POKELENZ_NAME("sv03.5", 199) | The card's name, so you can see the row points at the card you meant. |
| =POKELENZ_URL("sv03.5", 199) | A link to the card's page, with price history and every printing. |
Finding the set id and number
Look the card up in the card database or with the card value lookup, then read the page address. In pokelenz.com/cards/sv03.5/199/charizard-ex the set id is sv03.5 and the number is 199, the same number printed on the card before the slash. Typing 1 for a card numbered 001 works.
A sheet that tracks what your collection is worth
You type columns A to D. The formulas fill in E, F and G, and one SUM at the bottom is your collection's value. Copy row 2 down for every card you own. Leave C empty and you get the card's highest-priced printing; type normal, holo or reverse there when your copy is a different one.
| A · Set | B · Number | C · Printing | D · Qty | E · Card | F · Price | G · Value | |
|---|---|---|---|---|---|---|---|
| 2 | base1 | 4 | (empty) | 1 | Charizard | $978.94 | $978.94 |
| 3 | sv03.5 | 199 | (empty) | 1 | Charizard ex | $291.59 | $291.59 |
| 4 | sv08 | 1 | (empty) | 1 | Exeggcute | $0.26 | $0.26 |
| 5 | Collection value | $1,270.79 | |||||
Names and prices in this table are today's, pulled the same way the formula pulls them.
- E2
- =POKELENZ_NAME(A2, B2)
- F2
- =POKELENZ_PRICE(A2, B2, C2, $I$1)
- G2
- =D2 * F2
- G5
- =SUM(G2:G4)
$I$1 is the refresh cell. Leave it empty to start. When you want fresh prices, type today's date into I1 and every price in column F reloads. Format column A as plain text so Sheets does not turn a set id into a number or a date.
Limits and caching, plainly
- Prices change about once a day. Refreshing every few minutes gets you the same number.
- Sheets does not refresh on a timer. A custom function re-runs when one of its arguments changes, and Google does not allow NOW() or RAND() as an argument. That is what the refresh cell is for. Google: custom functions
- The script remembers each card for six hours, the longest Apps Script's cache allows. Name, price and link for one card share a single lookup. Google: Cache
- Google's quotas apply to you, not to us. 20,000 web requests a day on a free account, 100,000 on Workspace, and 30 seconds per custom function call. Google: quotas
- Big sheets load slowly the first time. Sheets runs every formula cell as its own call, so a couple of thousand cards take a few minutes to fill in. After that the values stay put until you refresh.
- One card per lookup, by design. There is no formula for a whole set or the whole catalogue, and a per-network rate limit applies. If a cell says the limit was reached, it clears by itself.
Why not IMPORTXML?
The usual advice is an IMPORTXML formula aimed at a marketplace listing. It reads the price out of that page's layout, so it returns an error the day the layout changes or the site decides the request looks automated, and you find out when your total reads #N/A. This formula asks a small endpoint built to answer it, and gets a number back. The other route is installing a marketplace add-on; this one is a script you can read in full before you paste it.
Questions
- How do I get Pokémon card prices into Google Sheets?
- Add a custom function. Open Extensions > Apps Script in your sheet, paste the free PokeLenz script, save it, then use =POKELENZ_PRICE(set id, card number) in any cell. The formula returns the card's current market price in US dollars as a number you can sum, sort and chart.
- Where do I find a card's set id and number?
- Open the card on pokelenz.com and read its address. In pokelenz.com/cards/sv03.5/199/charizard-ex the set id is sv03.5 and the number is 199. The number is the one printed on the card, before the slash.
- How often do the prices update?
- PokeLenz prices move about once a day. Google Sheets re-runs a custom function when one of its arguments changes, not on a timer, so the formula has an optional last argument: point it at a spare cell and change that cell whenever you want every price to reload. The script also remembers each card for six hours, so reloading more often than that returns the same number.
- Is there a limit on how many cards I can track?
- Google allows 20,000 web requests a day from scripts on a free Google account and 100,000 on Google Workspace, and each custom function call has 30 seconds to answer. One card is one request however many columns use it, and a card already fetched in the last six hours costs nothing. A collection of a few thousand different cards fits, though the first load takes a few minutes. PokeLenz also applies a per-network rate limit; if you hit it the cell says so, and it clears by itself.
- Can I download every card price at once?
- No. The formula looks up one card at a time, for cards you own or are watching. Bulk downloading or copying of the catalogue is not permitted.
- Does it work in Excel?
- The script is written for Google Sheets and Apps Script. It does not run in Excel.
More free tools
- Price widget for your siteEmbed a card's live price on a blog, shop page or forum post.
- Pokémon card databaseEvery set with card lists and prices. Where the set ids come from.
- Grading calculatorWhether sending a card to PSA, CGC or BGS pays after fees.
- Digital Pokémon binderBinders built from scanned cards, with value and share links.