To pull CoinGecko API data into Google Sheets you'll want a CoinGecko API key. The free Demo key gives you 10,000 call credits a month at 100 calls a minute (as of October 2026), and you use it through an Apps Script custom function, an IMPORTDATA URL, or CoinGecko's own add-on. CoinGecko does run a keyless public API, but its limit is shared per IP address, and spreadsheets share Google's servers, so in Sheets it mostly returns 429 errors. If what you actually want is current prices and market data with no key at all, CoinTable, a Google Sheets add-on for cryptocurrency prices, does that with =CT_PRICE("BTC").
This post covers the CoinGecko route properly: getting a key, three ways to wire it up, what the paid plans cost, and what each error means. We make CoinTable, so we're biased on the last part, and every CoinGecko fact below links to CoinGecko's own pages. For every method side by side, GOOGLEFINANCE included, see the guide to getting Bitcoin and crypto prices in Google Sheets.
Can you use the CoinGecko API without a key?
Technically yes. In a spreadsheet, not really.
CoinGecko's keyless public API (as of October 2026) answers at https://api.coingecko.com/api/v3 with no key, at roughly 10 to 30 calls a minute. That number moves with server load, and every keyless caller on the same IP address shares it. CoinGecko says outright that keyless access "is not suitable for production workloads, scheduled polling, or high-frequency updates."
Now think about where a Google Sheets formula runs. Not on your laptop. On Google's servers, alongside everybody else's spreadsheets. CoinGecko's errors and rate-limit page puts it plainly: "rate limit errors may occur due to shared IP addresses among Google Sheets users." So a keyless IMPORTDATA call might work at 9 a.m. and fail at 9:05, and nothing in your sheet changed.
That's why people searching "coingecko api without key" usually end up with a key anyway. The Demo one is free.
How to get a CoinGecko Demo API key
- Create an account on coingecko.com from the API pricing page and choose the free Demo plan.
- Open the Developer Dashboard and click + Add New Key.
- Copy the key. Demo keys work against
https://api.coingecko.com/api/v3/, sent either as thex-cg-demo-api-keyheader or thex_cg_demo_api_keyquery parameter.
The Demo plan asks you to credit CoinGecko where you show the data. And keep the base URLs straight: a Demo key on the Pro address (pro-api.coingecko.com), or the other way round, gets you a wrong-key-type error even though the key is fine.
Three ways to get CoinGecko API data into Sheets
Apps Script with UrlFetchApp
This is the most flexible route and the one with the most moving parts. Open Extensions → Apps Script, paste this, save:
// Usage in a cell: =CG_PRICE("bitcoin") or =CG_PRICE("ethereum", "eur")
const CG_KEY = 'PASTE-YOUR-DEMO-KEY'; // anyone who can edit this spreadsheet can read it
function CG_PRICE(id, currency) {
currency = (currency || 'usd').toLowerCase();
const url = 'https://api.coingecko.com/api/v3/simple/price'
+ '?ids=' + encodeURIComponent(id)
+ '&vs_currencies=' + currency;
const res = UrlFetchApp.fetch(url, {
headers: { 'x-cg-demo-api-key': CG_KEY },
muteHttpExceptions: true,
});
if (res.getResponseCode() !== 200) {
throw new Error('CoinGecko returned ' + res.getResponseCode());
}
const data = JSON.parse(res.getContentText());
if (!data[id] || data[id][currency] === undefined) {
throw new Error('Unknown API ID: ' + id);
}
return data[id][currency];
}Then =CG_PRICE("bitcoin") in any cell. Note the input: "bitcoin", not "BTC". The simple price endpoint wants CoinGecko's API ID, which you find on each coin's CoinGecko page.
Where this gets annoying: every cell is its own API call, and Sheets recalculates custom functions whenever it feels like it. Fifty coins in a column is fifty calls per recalculation, which is how a 100-calls-a-minute limit runs out in practice. The fix is batching (ids=bitcoin,ethereum,solana in one call, written into a range), which is more script, a trigger, and more things to debug.
IMPORTDATA with the key in the URL
No script needed, which is why it's the popular one:
=IMPORTDATA("https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd&x_cg_demo_api_key=YOUR_KEY")
The catch is that the API answers in JSON and IMPORTDATA expects CSV, so you get the raw response as text in a cell, something like {"bitcoin":{"usd":...}}. Wrap it to pull the number out:
=VALUE(REGEXEXTRACT(TEXTJOIN(",", TRUE, IMPORTDATA("https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd&x_cg_demo_api_key=YOUR_KEY")), "usd\D*([0-9.eE+-]+)"))
It works. Three things to know first. Your key sits in plain text in the formula, visible to anyone who can view the sheet. Google, not you, decides when IMPORTDATA fetches again. And when the call fails you get Sheets' generic "Could not fetch url," which doesn't tell you whether it was a 429, a bad key or a typo.
IMPORTJSON, the community Apps Script that parses JSON into rows and columns, is a tidier version of the same idea. You paste someone else's script into your project and hope it's still maintained.
The official add-on: CoinGecko for Sheets
CoinGecko now ships its own add-on with a single =COINGECKO() function, and per CoinGecko's Google Sheets docs (as of October 2026) it still needs your key: step 3 of setup is pasting a Demo or Pro key under Extensions → CoinGecko → Settings & API Key. In return you skip the scripting, and you get prices on a past date, top-100 lists, on-chain lookups by contract address and NFT floors. Our CoinGecko for Sheets vs CoinTable comparison goes through it feature by feature, including when it's the better pick.
CoinGecko API pricing (October 2026)
From CoinGecko's API pricing page and the keyless API docs, checked October 15, 2026:
| Plan | Monthly | Billed yearly | Call credits a month | Rate limit |
|---|---|---|---|---|
| Keyless public API | Free | — | Not stated | ~10–30 calls/min, shared per IP |
| Demo (key) | Free | — | 10,000 | 100 calls/min |
| Basic | $35 | $29 a month | 100,000 | 300 calls/min |
| Analyst | $129 | $103.20 a month | 500,000 | 500 calls/min |
| Lite | $499 | $399.20 a month | 2,000,000 | 500 calls/min |
| Pro | $999 | $799.20 a month | 5,000,000 and up | 1,000 calls/min |
| Enterprise | On request | On request | Custom | Custom |
For a personal spreadsheet, the Demo plan is usually enough on volume. The trouble people hit is the per-minute limit, not the monthly one. A sheet that recalculates fifty cells at once can burn through 100 calls a minute faster than you'd think. Errors count too: CoinGecko's docs say every call counts toward the per-minute limit, including the ones that fail.
CoinGecko API errors in Google Sheets, and what they mean
All codes below come from CoinGecko's error reference as of October 2026.
429, "Rate limit exceeded." Too many calls this minute. Without a key, it's usually other people's calls on the same Google IP. With a Demo key, it's your own sheet firing too many cells at once. Batch your API IDs into one call, or cut down how many cells fetch.
401, "Missing or invalid API key," or error 10002, "No API key provided." The key didn't arrive. Check the parameter name: x_cg_demo_api_key with underscores in a URL, x-cg-demo-api-key with hyphens as a header.
403, "Access blocked by the server." CoinGecko refused the call. The official add-on reports a bad key as "403: Invalid API Key."
10010 or 10011, wrong key type. A Pro key on the Demo address, or a Demo key on the Pro address.
"Could not fetch url." That's Google Sheets, not CoinGecko. IMPORTDATA couldn't get a usable answer: a 429, a blocked request, a timeout. Open the URL in your browser. If it works there, the problem is the shared IP, and a key is the fix.
"Exception: Request failed for https://api.coingecko.com returned code 429." The Apps Script version of the same thing. It shows up when muteHttpExceptions is off; the script above turns it on and throws a shorter message instead.
The no-key option: CoinTable
If all you need is current prices and market data, there's a shorter path with no key, no script and no CoinGecko account. Install CoinTable from the Google Workspace Marketplace, approve the permissions, and type:
=CT_PRICE("BTC")
=CT_PRICE("ETH", "EUR")
=CT_MARKETCAP("SOL")
=CT_CHANGE("XRP", "USD", "7d")
Tickers, not API IDs: "BTC", not "bitcoin". The currency is the second argument (50+ currencies, USD by default), and CT_CHANGE takes a period of 24h, 7d, 30d or 1y as the third. There are ten functions in all, covering price, change, market cap, volume, rank, supply, all-time high, distance from the high, and 24h high and low. The formula reference has the syntax for each.
What it costs and how it counts, without the marketing gloss:
- Free is 150 updates a month, reset on the 1st (UTC). An update is one coin, one metric, one currency. A refresh looks up each distinct value once, so fifty cells showing
=CT_PRICE("BTC")cost one update. Lookups that end in an error count too. - Plus gives unlimited updates for normal use.
- No signup, no API key to paste, no card. The add-on sets up an anonymous account by itself, and only each formula's ticker, currency and period leave Google Sheets.
- Prices are cached for 5 to 30 minutes on CoinTable's server. Fine for tracking a portfolio, wrong for scalping.
And what it doesn't do. CoinTable doesn't provide prices on a past date, it can't look up a coin by contract address, and it has nothing for NFTs. It also isn't an API: you can't call it from your own code. If you need any of those, the CoinGecko route above is the right one.
Which one should you use?
| You want | Use |
|---|---|
| Current prices for a watchlist or portfolio, no setup | CoinTable |
| Market cap, volume, rank or ATH per coin, in your own currency | CoinTable |
| A coin's price on a specific past date | CoinGecko for Sheets or the API, with a key |
| Top-100 lists, on-chain assets by contract address, NFT floors | CoinGecko for Sheets, with a key |
| Raw JSON for your own scripts and dashboards | CoinGecko API with a Demo or paid key |
| Zero keys, and you only need the BTC price once in a while | Either; even GOOGLEFINANCE handles BTC |
If you're replacing an old CRYPTOFINANCE sheet rather than starting fresh, the CRYPTOFINANCE migration guide maps those formulas one by one.
Frequently asked questions
Can you use the CoinGecko API without an API key?
Yes, through CoinGecko's keyless public API, but as of October 2026 it allows only about 10 to 30 calls a minute, shared by every caller on the same IP address, and CoinGecko says it is not suitable for scheduled polling. Google Sheets formulas run on shared Google servers, so keyless calls from Sheets often fail with a 429 error.
Is the CoinGecko API key free?
Yes. As of October 2026, the CoinGecko Demo plan is free and includes one API key, 10,000 call credits a month and up to 100 calls a minute. The Demo plan requires attribution to CoinGecko. You create the key in the Developer Dashboard after signing up on coingecko.com.
How much does the CoinGecko API cost?
As of October 2026, CoinGecko's API pricing page lists Demo at no cost, Basic at $35 a month, Analyst at $129 a month, Lite at $499 a month and Pro at $999 a month, with lower prices when billed yearly and custom plans on request.
How do I add a CoinGecko API key in Google Sheets?
With the official CoinGecko for Sheets add-on, paste the key under Extensions > CoinGecko > Settings & API Key. With IMPORTDATA, add x_cg_demo_api_key=YOUR_KEY to the URL. With Apps Script, send it in the x-cg-demo-api-key header of UrlFetchApp.fetch. Demo keys must use api.coingecko.com, not pro-api.coingecko.com.
Why does IMPORTDATA say 'Could not fetch url' for the CoinGecko API?
Could not fetch url is a Google Sheets message that means the request did not return a usable answer, most often a 429 rate-limit error caused by shared Google IP addresses, a missing or invalid key, or a timeout. Adding a Demo API key and fetching several coins in one call usually fixes it.
How do I get crypto prices in Google Sheets without any API key?
Install CoinTable, a Google Sheets add-on for cryptocurrency prices, through its Google Workspace Marketplace listing, then type =CT_PRICE("BTC"). It needs no signup and no API key to paste. The Free plan includes 150 updates a month across 10 functions, 10,000+ coins and 50+ currencies.
Can CoinTable return a coin's price on a past date?
No. CoinTable doesn't provide prices on a past date, contract-address lookups or NFT data. For those, use the CoinGecko API or the CoinGecko for Sheets add-on with an API key.