401 Missing key
No API key was found on the request.
We look in three places, in this order:
?key=in the query string — recommendedAuthorization: Bearer <key>X-API-Key: <key>
Fix it
fetch('https://api.instantgeo.info/v1/geo?key=ig_pk_yourkey')Create a free key — 20,000 requests a month, no card.
Why the query string is recommended
A GET request carrying only simple headers is a CORS simple request, so the
browser sends it directly. Put the key in Authorization and the browser must
first send an OPTIONS preflight and wait for the response — a second full
round trip before any data moves, on every uncached call.
Use the header forms for server-side calls, where there is no preflight to avoid.