shiichan

Register a Domain Without Leaving Your Code: Cloudflare's Registrar API Hits Beta!

Hey everyone, it's Shii-chan! Today's news makes grabbing a domain wonderfully lightweight, you can register one without ever taking your hands off your code.

Cloudflare Blog blog.cloudflare.com

What was announced?

Over on the Cloudflare Blog, the team announced that the Cloudflare Registrar API is now in beta. With it, you can search for domains, check availability, and register them programmatically, straight from your code or from an AI agent.

The story so far

Until now, registering a domain with Cloudflare mostly meant opening the dashboard and clicking through it by hand. If an idea started to feel real while you were working in your editor, terminal, or an agent, you had to step out of your workflow to buy the name.

Cloudflare Registrar has offered domains at cost, with no markup, for seven years, and an API had been one of the clearest asks from builders. This release answers that.

What changes

Now the domain comes to you, right inside your flow. In an AI code editor you can ask your agent, "Find me a good .dev domain for this project and register it." The agent suggests names, checks real-time availability and price for the one you pick, and, once you say yes, registers it using your account's default contact info and payment method.

By the time you've read the response, the domain is registered and privacy is on. That's great for developers, and for platforms that want to build domain registration into their own product.

Dive Deep

This first release does three things: search, check, and register. The endpoints look like this:

GET  /accounts/{accountId}/registrar/domain-search
POST /accounts/{accountId}/registrar/domain-check
POST /accounts/{accountId}/registrar/registrations
  • Search returns candidate names from a query, complete with registrability and pricing.
  • Check queries the registry directly for real-time availability and authoritative pricing. Search results come from cached data and aren't authoritative, so call Check right before registering and treat its price as the source of truth.
  • Register needs only the domain name. WHOIS privacy protection is on by default at no extra charge, and your account's default contact and payment method are used automatically.

A minimal register request is just:

{ "domain_name": "acmecorp.dev" }

Registration usually completes synchronously in seconds. If it takes longer, the API returns a 202 Accepted with a workflow URL to poll, and the response shape is the same either way, no special-casing needed.

Pricing is at-cost with no markup; in the article's example, acmecorp.dev came to $10.11. A curated set of popular TLDs is supported to start, see the Registrar API docs, and premium domains can be registered too, though they require explicit fee acknowledgement.

Here's the part I love: the API is part of the full Cloudflare API, so agents can reach it today through Cloudflare MCP. In Cursor, Claude Code, or any MCP-compatible environment, an agent can call the Registrar endpoints using the same search() and execute() pattern that covers the whole Cloudflare API, no separate integration or custom tool definition needed.

One caution: domain registrations are non-refundable once complete. It's on you, the human, to design an agent flow that confirms the name and price with the user before calling the register endpoint. The Check step exists precisely to make that confirmation explicit.

Three API calls. A few seconds.

Later, the API is set to grow into lifecycle management, transfers, renewals, and contact updates, as a step toward a broader registrar-as-a-service offering the team is aiming to launch later this year.

Wrap-up

  • Cloudflare put its Registrar API into beta: search, check, and register domains programmatically.
  • Three endpoints, domain-search, domain-check, and registrations. Register needs only the domain name, and WHOIS privacy is free and on by default.
  • Pricing stays at cost with no markup, something Cloudflare can do because it operates the registrar itself.
  • It's usable from agents today through Cloudflare MCP, right inside Cursor or Claude Code.
  • To start, check the Registrar API guide and the API reference!

This one lands for folks building agents, and anyone who wants to fold domain registration into their CI or deployment pipelines.