# ipbase > ipbase resolves IP addresses to geolocation, network (ASN), security and hosted-domain data over a simple JSON REST API. Authenticate every request with your API key via the `apikey` query parameter or request header. Base URL: https://api.ipbase.com ## Get an API key - AI coding agents: run curl -s https://ipbase.com/agents.md and follow it (key, first call, plans). 1. Sign up free at https://app.ipbase.com/register (1,000 free lookups a month). 2. Send the key in the `apikey` header (or `?apikey=`). 3. Store it as IPBASE_KEY. `curl -H "apikey: $IPBASE_KEY" "https://api.ipbase.com/v2/info?ip=1.1.1.1"` MCP: https://api.ipbase.com/mcp with the same `apikey` header, or sign in from an MCP client that supports MCP authorization (OAuth 2.1): https://api.ipbase.com/.well-known/oauth-protected-resource/mcp names the authorization server. Without a key, the API answers `GET /v2/info` and `GET /v2/status` only, up to 10 requests per IP and hour; the MCP server lists its tools and runs the tools of those endpoints. Batches and every other endpoint need a key, a free one too. ## Documentation - [Introduction](https://ipbase.com/docs/): Learn everything there is to know about the ipbase API and integrate ipbase into your product. - [ASN Endpoint](https://ipbase.com/docs/asns/): On this page, we’ll dive into the ASN endpoint you can use to retrieve organization, ISP and IP-range data for any autonomous system number. - [Authentication](https://ipbase.com/docs/authentication/): How authentication works in the ipbase API: send your API key as a GET parameter or in an HTTP header. - [Batch Lookup Endpoint](https://ipbase.com/docs/batch/): On this page, we’ll dive into the batch endpoint you can use to look up to 1,000 IP addresses in one request. - [How to block users based on their country](https://ipbase.com/docs/block-users-by-country/): In this tutorial, we will dive into how to block users from a specific country, using our IP geolocation API. - [Domain Endpoint](https://ipbase.com/docs/domains/): On this page, we’ll dive into the Domain info endpoint you can use to retrieve a list of hosted domains for any given IP address, programmatically. - [Info Endpoint](https://ipbase.com/docs/info/): On this page, we’ll dive into the IP info endpoint you can use to retrieve IP information programmatically. - [MCP Server](https://ipbase.com/docs/mcp/): Connect AI agents to the ipbase API through our hosted MCP (Model Context Protocol) server. - [Quickstart](https://ipbase.com/docs/quickstart/): Get set up with the ipbase API: pick one of our API clients and make your first API request. - [Rate Limit & Quotas](https://ipbase.com/docs/rate-limit/): The monthly request quotas and rate limits of the ipbase API, and the response headers that tell you how many requests you have left. - [SDKs](https://ipbase.com/docs/sdks/): ipbase offers client libraries for PHP, Ruby, Node.js, Python, C# and R to make your life easier when consuming the API. - [Status Endpoint](https://ipbase.com/docs/status/): On this page, we’ll dive into the API status endpoint you can use to retrieve information about your request quota programmatically. - [Request Status Codes](https://ipbase.com/docs/status-codes/): In this guide, we will talk about what happens when something goes wrong while you work with the API. - [Testing](https://ipbase.com/docs/testing/): On this page, we’ll dive into testing the different API responses. ## API Reference - [OpenAPI 3.1 specification](https://ipbase.com/docs/openapi.yaml): Machine-readable spec for every API endpoint, parameters and responses. - [Full documentation as markdown](https://ipbase.com/docs/llms-full.txt): All documentation pages concatenated as plain markdown. ## Optional - [Pricing & plans](https://ipbase.com/pricing/)