Skip to content

401 Missing key

No API key was found on the request.

We look in three places, in this order:

  1. ?key= in the query string — recommended
  2. Authorization: Bearer <key>
  3. 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.

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.