{
 "kind": "api",
 "slug": "mapbox",
 "path": "apis/mapbox/",
 "name": "Mapbox",
 "logo": "https://agentgid.com/media/avatars/mapbox.png",
 "maker": null,
 "density": "full",
 "crumbs": [
  [
   "APIs",
   "apis/"
  ],
  [
   "Maps and location",
   "apis/maps/"
  ]
 ],
 "lead": "Maps, address search and routes for apps.",
 "chips": [
  {
   "label": "Maps and location",
   "path": "apis/maps/"
  }
 ],
 "primary": {
  "label": "Copy prompt for your agent",
  "copy": "Add a Mapbox map to my page with mapbox-gl pinned to 3.34.2: use a public pk. token restricted to my domain, keep the Mapbox logo and attribution visible, and do any secret-token calls on the server."
 },
 "links": [
  {
   "label": "Website",
   "href": "https://mapbox.com"
  },
  {
   "label": "Pricing",
   "href": "https://www.mapbox.com/pricing"
  },
  {
   "label": "GitHub",
   "href": "https://github.com/mapbox/mapbox-gl-js"
  }
 ],
 "track": "Outages, price changes and new versions on your dashboard",
 "verdicts": [
  {
   "key": "price",
   "label": "Price",
   "value": "Free every month",
   "status": "yes",
   "sub": "Then pay as you go",
   "quote": "Monthly Loads Up to 50,000 50,001 - 100,000 100,001 - 200,000 200,001 - 1,000,000 1,000,001 - 5,000,000 5,000,000+ Cost per 1,000 Free $5.00",
   "note": "Free tier: Up to 100,000 requests/month for most APIs. As reported on the official pricing page, checked Oct 9, 2026.",
   "src": "https://www.mapbox.com/pricing"
  },
  {
   "key": "commercial",
   "label": "Commercial use",
   "value": "With conditions",
   "status": "cond",
   "sub": null,
   "quote": "The Mapbox APIs described in this documentation are subject to Mapbox's Terms of Service.",
   "note": "Allowed under the Mapbox Terms of Service with an active account, pay-as-you-go above the free amounts, and the Mapbox logo and credit shown. Data: Anonymized location data from apps is used to improve Mapbox map, traffic and movement products.",
   "src": "https://docs.mapbox.com/api/overview.md"
  },
  {
   "key": "key",
   "label": "Key & sign-up",
   "value": "API key",
   "status": "info",
   "sub": "Env var none read automatically; the docs pass accessToken or access_token explicitly (MAPBOX_ACCESS_TOKEN is a common name)",
   "quote": "You must supply a valid access token by using the access_token query parameter in every request.",
   "note": "Access token in the access_token query parameter of every request; public pk. tokens for maps in the browser, secret sk. tokens for account changes on the server. Only public pk. tokens, best with URL restrictions; never sk. tokens.",
   "src": "https://docs.mapbox.com/api/overview.md"
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Docs for agents",
   "status": "info",
   "sub": "llms.txt · SDK",
   "quote": "For the simplest setup, you can connect directly to Mapbox's hosted MCP endpoint without installing or running anything locally.",
   "note": " Our agent check: 3 of 6 (Nov 13, 2026).",
   "src": "https://docs.mapbox.com/api/guides/mcp-server.md"
  }
 ],
 "vfoot": "Checked against the maker's official pages, pricing on Oct 9, 2026.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What Mapbox does",
   "parts": [
    {
     "t": "prose",
     "text": "Mapbox is an online service that puts maps into your website or app. It draws interactive or still map pictures, turns addresses into map points and back, and plans routes. You pay per use after a free monthly amount, and the maps must show the Mapbox logo and credit line."
    },
    {
     "t": "list",
     "items": [
      "Mapbox is one of 30 APIs in the Maps and location category on AgentGid.",
      "At $0.25 per 1,000 requests it is the 3rd cheapest of the 13 that publish a per-request price (cheapest: Visual Crossing Weather, $0.1).",
      "It is one of 26 that can be started for free.",
      "4 of them ship an official MCP server; Mapbox does not.",
      "Its official SDK is the 1st most downloaded in the category (6.4M a week)."
     ],
     "muted": true
    },
    {
     "t": "h3",
     "text": "What people build with it"
    },
    {
     "t": "uses",
     "items": [
      {
       "title": "Store locator on your site",
       "text": "Show all your shops on a map with a list beside it; a click on a shop opens its details.",
       "idea": false
      },
      {
       "title": "Map picture in an email receipt",
       "text": "Put a small map of the shop address into order emails, so customers recognise where they paid.",
       "idea": false
      },
      {
       "title": "Turn addresses into map points",
       "text": "Convert the addresses people type into coordinates to place them on a map, or turn a tapped point back into an address.",
       "idea": false
      },
      {
       "title": "Areas within 15 minutes' drive",
       "text": "Draw the area a customer can reach in 5, 10 or 15 minutes, for delivery zones or \"homes near the office\".",
       "idea": false
      },
      {
       "title": "Driving or walking directions",
       "text": "Show the best route between two places, taking traffic and road incidents into account.",
       "idea": false
      },
      {
       "title": "Map of a listing on its page",
       "text": "Add a small fixed map next to a flat or event listing, without loading the full map library.",
       "idea": true
      }
     ]
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "Mapbox popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "5.9M",
       "l": "SDK downloads a week",
       "d": "+22.5% on the 4-week average",
       "up": true
      },
      {
       "n": "58",
       "l": "public agent repos use its SDK"
      },
      {
       "n": "12.5K",
       "l": "GitHub stars, mapbox/mapbox-gl-js"
      }
     ]
    },
    {
     "t": "small",
     "text": "SDK downloads from npm and PyPI, weekly. Numbers as of Nov 17, 2026."
    }
   ]
  },
  {
   "id": "pricing",
   "nav": "Pricing and limits",
   "h2": "Pricing",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Free tier",
       "v": "Up to 100,000 requests/month for most APIs"
      },
      {
       "l": "Cheapest plan",
       "v": "No monthly plan"
      },
      {
       "l": "Usage price",
       "v": "$0.25–$5.00 per 1,000 requests depending on API"
      },
      {
       "l": "Plans",
       "v": "Added automatically: its SDK was in 30 of the public agent repos we sampled when it was added. Prices read from the official pricing page."
      }
     ]
    },
    {
     "t": "h3",
     "text": "What one action costs"
    },
    {
     "t": "table",
     "head": [
      "Action",
      "Price"
     ],
     "num": true,
     "rows": [
      [
       "1,000 web map loads after the free 50,000 a month",
       "$5.00"
      ],
      [
       "1,000 address searches (temporary) after the free 100,000 a month",
       "$0.75"
      ],
      [
       "1,000 static map images after the free 50,000 a month",
       "$1.00"
      ],
      [
       "1,000 route or isochrone requests after the free 100,000 a month",
       "$2.00"
      ]
     ]
    },
    {
     "t": "small",
     "text": "As reported on the official pricing page, checked Oct 9, 2026. Prices change: confirm before you buy.",
     "link": "mapbox.com/pricing",
     "href": "https://www.mapbox.com/pricing"
    }
   ]
  },
  {
   "id": "limits",
   "nav": null,
   "spy_as": "pricing",
   "h2": "Limits",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Default, per token",
       "v": "Geocoding 1000 requests per minute",
       "src": "https://docs.mapbox.com/api/overview.md"
      },
      {
       "l": "Default, per token",
       "v": "Static Images 1,250 requests per minute",
       "src": "https://docs.mapbox.com/api/overview.md"
      },
      {
       "l": "Default, per token",
       "v": "Directions 25 coordinates per request, 300 requests per minute",
       "src": "https://docs.mapbox.com/api/overview.md"
      },
      {
       "l": "All",
       "v": "Rate limits count per access token, not per account",
       "src": "https://docs.mapbox.com/api/overview.md"
      }
     ]
    },
    {
     "t": "small",
     "text": "From the official docs.",
     "link": "docs.mapbox.com/api/overview.md",
     "href": "https://docs.mapbox.com/api/overview.md"
    }
   ]
  },
  {
   "id": "access",
   "nav": "Access and terms",
   "h2": "Key and access",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "How it signs in",
       "v": "Access token in the access_token query parameter of every request; public pk. tokens for maps in the browser, secret sk. tokens for account changes on the server."
      },
      {
       "l": "Environment variable",
       "v": "none read automatically; the docs pass accessToken or access_token explicitly (MAPBOX_ACCESS_TOKEN is a common name)",
       "code": true
      },
      {
       "l": "Safe in browser code",
       "v": "Yes",
       "status": "yes"
      },
      {
       "l": "Card at sign-up",
       "v": "No"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Steps only a person can do"
    },
    {
     "t": "list",
     "items": [
      "Sign up for a Mapbox account and copy the default public token, or create a new one restricted to your site's URLs. Put it in .env (for example MAPBOX_ACCESS_TOKEN) and pass it as accessToken; create a secret sk. token only for server tasks.",
      "Add a payment method before going over the free amounts or using permanent geocoding. No code change; for stored address results add permanent=true."
     ]
    }
   ]
  },
  {
   "id": "terms",
   "nav": null,
   "spy_as": "access",
   "h2": "Commercial use and your data",
   "parts": [
    {
     "t": "prose",
     "text": "Mapbox is a paid service with free monthly amounts; the map library is not open source and may only be used with a Mapbox account. Maps must show the Mapbox logo, and usually the Mapbox and OpenStreetMap credit."
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In a paid app",
       "v": "With conditions",
       "status": "cond",
       "sub": "Allowed under the Mapbox Terms of Service with an active account, pay-as-you-go above the free amounts, and the Mapbox logo and credit shown.",
       "quote": "The Mapbox APIs described in this documentation are subject to Mapbox's Terms of Service.",
       "src": "https://docs.mapbox.com/api/overview.md"
      },
      {
       "l": "inside-app-bundle",
       "v": "With conditions",
       "status": "cond",
       "sub": "You may bundle mapbox-gl only for use with Mapbox products through your account, without touching its billing or data-collection code.",
       "quote": "This license allows developers with a current active Mapbox account to use and modify the authorized portions of the Software as needed for use only with the relevant Mapbox product(s) through their Mapbox account in accordance with the Mapbox TOS.",
       "src": "https://github.com/mapbox/mapbox-gl-js/blob/main/LICENSE.txt"
      },
      {
       "l": "redistribute-files",
       "v": "No",
       "status": "no",
       "sub": "Permanent geocoding results are for your own personal or business use and may not be distributed or sublicensed.",
       "quote": "Results from the Permanent Geocoding API are only available for your own personal or business use, and cannot be used for distribution or sublicense.",
       "src": "https://www.mapbox.com/pricing"
      },
      {
       "l": "client-work",
       "v": "With conditions",
       "status": "cond",
       "sub": "The docs advise a separate account or tokens per client; you stay responsible for how end users use the service.",
       "quote": "We recommend using distinct tokens for specific projects and separate client implementations to limit the number of projects you might need to update if a token has been compromised.",
       "src": "https://docs.mapbox.com/accounts/guides/tokens.md"
      },
      {
       "l": "Trains on what you send",
       "v": "Anonymized location data from apps is used to improve Mapbox map, traffic and movement products.",
       "quote": "The anonymized location data is then used to improve Mapbox mapping products, including the traffic and movement data products.",
       "src": "https://www.mapbox.com/legal/tos"
      },
      {
       "l": "Keeps your data",
       "v": "IP addresses kept at the load balancer are discarded after 30 days.",
       "quote": "billing purposes and discarded after 30 days",
       "src": "https://www.mapbox.com/legal/tos"
      },
      {
       "l": "Where data is stored",
       "v": "Processed in AWS in the United States, cached in other regions; no EU-only option.",
       "quote": "Mapbox cannot serve its data from one limited geographic region.",
       "src": "https://www.mapbox.com/legal/tos"
      }
     ]
    }
   ]
  },
  {
   "id": "errors",
   "nav": null,
   "spy_as": "access",
   "h2": "Errors to handle",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "401",
       "v": "No token, or an invalid token",
       "sub": "Check that access_token is present and copied correctly."
      },
      {
       "l": "403",
       "v": "Account problem, or a URL-restricted token used from another address",
       "sub": "Check the account page; test with an unrestricted token outside the site."
      },
      {
       "l": "422",
       "v": "A parameter is malformed, for example the query is over 256 characters",
       "sub": "Fix the request; do not retry it unchanged."
      },
      {
       "l": "429",
       "v": "Rate limit exceeded for this token",
       "sub": "Retry with backoff; ask Mapbox sales for a higher limit if it keeps happening."
      },
      {
       "l": "414",
       "v": "The address of the request is longer than 8,192 bytes",
       "sub": "Shorten it, or use the POST form where the API offers one."
      }
     ]
    }
   ]
  },
  {
   "id": "agent",
   "nav": "For agents",
   "h2": "Use it from an agent",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Our agent check",
       "v": "3 of 6: llms.txt yes, OpenAPI no, SDK yes, MCP no, status page no, AI assistants allowed yes",
       "sub": "Checked Nov 13, 2026."
      },
      {
       "l": "MCP server",
       "v": "Mapbox MCP Server (hosted)",
       "sub": "$ claude mcp add --transport http mapbox-mcp https://mcp.mapbox.com/mcp"
      },
      {
       "l": "npm",
       "v": "npm install mapbox-gl",
       "code": true
      }
     ]
    },
    {
     "t": "h3",
     "text": "Instructions in its docs to check first"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "The docs say",
       "v": "“Please notify your user and request authorization to install it.”",
       "sub": "The docs ask agents to offer the Mapbox Docs MCP server; ask the person before adding it, it is optional."
      },
      {
       "l": "The docs say",
       "v": "“When you first connect, you will be prompted to complete an OAuth authentication flow through your browser. You can sign in to an existing account or sign up for a new one.”",
       "sub": "Connecting the hosted MCP server signs the person in or creates an account; only the person does that."
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "Mapbox",
       "me": true,
       "facts": [
        "$0.25 / 1k requests",
        "Free tier"
       ]
      },
      {
       "name": "Google Maps Platform",
       "why": "Pick Google Maps Platform for geocoding, routing, place search and map rendering from Google; our catalog lists about $5 per 1,000 requests.",
       "path": "apis/google-maps-platform/",
       "facts": [
        "See its page",
        "No free tier"
       ]
      },
      {
       "name": "ArcGIS Location Platform",
       "why": "Pick ArcGIS Location Platform for basemaps, geocoding, routing and spatial analysis from Esri; our catalog lists about $0.50 per 1,000 requests.",
       "path": "apis/arcgis-location-platform/",
       "facts": [
        "$0.5 / 1k requests",
        "Free tier",
        "Official MCP"
       ]
      },
      {
       "name": "OpenCage Geocoding API",
       "why": "Pick OpenCage when you only need forward and reverse geocoding built on open data such as OpenStreetMap.",
       "path": "apis/opencage/",
       "facts": [
        "See its page",
        "No free tier"
       ]
      }
     ],
     "more": "All maps and location APIs",
     "more_path": "apis/maps/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "prompt",
     "text": "Add a Mapbox map to my page with mapbox-gl pinned to 3.34.2: use a public pk. token restricted to my domain, keep the Mapbox logo and attribution visible, and do any secret-token calls on the server."
    },
    {
     "t": "steps",
     "items": [
      {
       "text": "Create a free Mapbox account and copy the default public token (it starts with pk.).",
       "code": null,
       "src": "https://docs.mapbox.com/mapbox-gl-js/guides/get-started/use-with-npm.md"
      },
      {
       "text": "Add the map library to your project.",
       "code": "$ npm install mapbox-gl",
       "src": "https://docs.mapbox.com/mapbox-gl-js/guides/get-started/use-with-npm.md"
      },
      {
       "text": "Give the map a sized box on the page and create it with your token.",
       "code": "<div id=\"map\" style=\"width: 800px; height: 600px;\"></div>",
       "src": "https://docs.mapbox.com/mapbox-gl-js/guides/get-started/use-with-npm.md"
      }
     ]
    },
    {
     "t": "h3",
     "text": "First request"
    },
    {
     "t": "tabs",
     "label": "First request",
     "items": [
      {
       "tab": "Request",
       "code": "$ curl \"https://api.mapbox.com/search/geocode/v6/forward?q=Los%20Angeles&access_token=YOUR_MAPBOX_ACCESS_TOKEN\"",
       "intro": "The request is the docs' basic forward geocoding example; the response is the docs' example response for forward geocoding (a different address), trimmed."
      },
      {
       "tab": "Response",
       "code": "{\n  \"type\": \"FeatureCollection\",\n  \"features\": [\n    {\n      \"type\": \"Feature\",\n      \"geometry\": {\n        \"type\": \"Point\",\n        \"coordinates\": [-111.86313, 40.725163]\n      },\n      \"properties\": {\n        \"feature_type\": \"address\",\n        \"name\": \"974 2100 South\",\n        \"place_formatted\": \"Salt Lake City, Utah 84106, United States\", ...\n      }\n    }\n  ]\n}"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Mistakes to avoid"
    },
    {
     "t": "mistakes",
     "items": [
      {
       "dont": "Map container div with no height",
       "fix": "<div id=\"map\" style=\"width: 800px; height: 600px;\"></div> or a CSS height",
       "why": "Without dimensions the map does not appear."
      },
      {
       "dont": "Saving geocoding results in your database from default (temporary) requests",
       "fix": "Add permanent=true (needs a card on file) when you store results; otherwise only display them",
       "why": "Temporary results may not be cached."
      },
      {
       "dont": "An sk. secret token in browser or app code",
       "fix": "Use a pk. public token (with URL restrictions) in the browser; call secret-scope APIs from your server",
       "why": "Secret tokens can change your account."
      },
      {
       "dont": "Testing a URL-restricted token with curl or Postman",
       "fix": "Use an unrestricted token for terminal tests and the restricted one in the site",
       "why": "Requests from tools that are not your site get a 403."
      },
      {
       "dont": "Passing coordinates as latitude, longitude",
       "fix": "Always longitude first, then latitude",
       "why": "Mapbox APIs expect longitude, latitude order."
      }
     ]
    }
   ]
  },
  {
   "id": "faq",
   "nav": "Questions",
   "h2": "Questions",
   "parts": [
    {
     "t": "faq",
     "items": [
      {
       "q": "Is there a free plan?",
       "a": "There is no separate plan, but most products have a free monthly amount, for example 50,000 web map loads, as reported on the pricing page. No credit card is needed to start.",
       "evidence": {
        "url": "https://docs.mapbox.com/mapbox-gl-js/guides/get-started/use-with-npm.md",
        "quote": "You don't need a credit card to start using Mapbox services."
       }
      },
      {
       "q": "Can I hide the Mapbox logo?",
       "a": "No. Maps that use Mapbox styles or data must show the Mapbox logo and text credit; you may move the logo to another corner.",
       "evidence": {
        "url": "https://docs.mapbox.com/help/dive-deeper/attribution.md",
        "quote": "While you may move the logo to a different corner of the map, we require the Mapbox logo to appear on our maps so that Mapbox and its maps get proper credit."
       }
      },
      {
       "q": "Can I store the coordinates I get from address search?",
       "a": "Only with permanent geocoding, which needs a credit card or an enterprise contract; temporary results may not be cached.",
       "evidence": {
        "url": "https://docs.mapbox.com/api/search/geocoding.md",
        "quote": "Using Permanent storage with the Geocoding API requires that you have a valid credit card on file or an active enterprise contract."
       }
      },
      {
       "q": "Can I use mapbox-gl with free map tiles from elsewhere?",
       "a": "No. The library's license allows use only with Mapbox products through a Mapbox account.",
       "evidence": {
        "url": "https://github.com/mapbox/mapbox-gl-js/blob/main/LICENSE.txt",
        "quote": "This license terminates automatically if a developer no longer has a Mapbox account in good standing or breaches the Mapbox TOS."
       }
      },
      {
       "q": "Can an AI assistant use Mapbox?",
       "a": "Yes. Mapbox runs a hosted MCP server for directions, isochrones, static maps and address lookup.",
       "evidence": {
        "url": "https://docs.mapbox.com/api/guides/mcp-server.md",
        "quote": "This endpoint is available at https://mcp.mapbox.com/mcp."
       }
      }
     ]
    }
   ]
  }
 ],
 "glance": [
  [
   "Maker",
   "Mapbox"
  ],
  [
   "Category",
   "Maps and location"
  ],
  [
   "Price",
   "$0.25 / 1k requests"
  ],
  [
   "Official SDK",
   "npm mapbox-gl"
  ],
  [
   "Latest SDK",
   "3.34.2 on npm"
  ],
  [
   "Agent check",
   "3 of 6"
  ],
  [
   "Pricing checked",
   "Oct 9, 2026"
  ]
 ],
 "good": [
  "Address search results are temporary by default and may not be saved; saving them needs permanent mode and a card on file.",
  "Every page view that creates a web map counts as one map load; moving or zooming the map costs nothing extra.",
  "Public tokens in page code can be read by anyone. Limit them to your web addresses, and keep secret tokens on the server."
 ],
 "checked_line": "Read by AgentGid from 27 official pages, card checked Nov 10, 2026; usage numbers update daily."
}