---
title: "Run up to 20 public read operations in one request"
method: POST
path: "/api/batch"
---

# Run up to 20 public read operations in one request

`POST /api/batch`

## Request

- Base URL: `https://name.ai`
- URL: `https://name.ai/api/batch`
- Auth: none required

Public. Takes an array of operations and runs them together, so an agent acting on many domains or extensions makes one round trip instead of one per item. Every operation is a public unauthenticated read already documented in this spec, dispatched to that same route handler — a batch can reach nothing a direct anonymous call could not. Each operation is separately counted against the per-IP rate limit. Partial failure is normal and does not fail the batch: the envelope is 200 and each result carries its own status. Only a malformed envelope returns 4xx.

## Request body

- object
  - `operations` BatchOperation[], required
    - `id` string: Your label, echoed back on the matching result. Defaults to the array index.
    - `op` 'search_domain' | 'whois_lookup' | 'tld_registration_price' | 'tld_requirements', required: search_domain → POST /api/domain/search; whois_lookup → POST /api/tools/whois; tld_registration_price → GET /api/pricing/tld; tld_requirements → GET /api/tlds/{tld}/metadata.
    - `params` object: Arguments for that operation: {"q"} for search_domain, {"domain"} for whois_lookup, {"tld","op"} for tld_registration_price, {"tld"} for tld_requirements.

## Response `200`

Every operation ran. Results preserve request order; check each status.

- object
  - `results` BatchResult[], required
    - `id` string, required
    - `op` string, nullable, required
    - `status` integer, required: The status the equivalent single call would have returned.
    - `body` unknown, required
  - `count` integer, required
  - `failed` integer, required: How many results carry a status >= 400.

## Other responses

- `400`: Malformed or invalid request.
- `429`: Quota exceeded.

---

[API](https://skmtc.dev/name/apis/name-ai-api-public-rest-api-openapi-3-1.md) · [All operations](https://skmtc.dev/name/apis/name-ai-api-public-rest-api-openapi-3-1/llms.txt) · [OpenAPI document](https://skmtc.dev/name/apis/name-ai-api-public-rest-api-openapi-3-1/revisions/e04300069786?raw)
