API REFERENCE
IndexNow API Documentation
Complete API reference for the IndexNow protocol endpoint URLs, request formats, response codes, and working code examples in multiple languages.
API Endpoints
| Endpoint | Search Engine |
|---|---|
| https://api.indexnow.org/indexnow | Universal (all participating engines) |
| https://www.bing.com/indexnow | Microsoft Bing only |
| https://yandex.com/indexnow | Yandex only |
Use api.indexnow.org to submit to all participating engines simultaneously with a single request.
Method 1: GET Request (Single URL)
Use a GET request to submit a single URL. Simple but not recommended for frequent or bulk submissions.
# GET request format
GET https://api.indexnow.org/indexnow?url=https%3A%2F%2Fyourdomain.com%2Fnew-page&key=d47a82bc1e9f4a3b8c2d5e6f7a8b9c0d
| Parameter | Required | Description |
|---|---|---|
| url | Yes | The fully-qualified URL of the page. Must be URL-encoded. Must match the domain used in key file hosting. |
| key | Yes | Your IndexNow API key (8–128 alphanumeric characters). Must match the key stored in your verification file. |
| keyLocation | No | If your key file is not at the domain root, specify the full URL to the key file here. |
Method 2: POST Request (Bulk URLs Recommended)
Use POST to submit up to 10,000 URLs in a single request. Required for any bulk submission use case.
POST https://api.indexnow.org/indexnow
Content-Type: application/json; charset=utf-8
{
"host": "yourdomain.com",
"key": "d47a82bc1e9f4a3b8c2d5e6f7a8b9c0d",
"keyLocation": "https://yourdomain.com/d47a82bc1e9f4a3b8c2d5e6f7a8b9c0d.txt",
"urlList": [
"https://yourdomain.com/new-page-1",
"https://yourdomain.com/updated-page-2",
"https://yourdomain.com/new-category/product-3"
]
}
Note: The
keyLocation parameter is optional if your key file is at the domain root. Include it only if your key file is hosted at a non-standard path.Code Examples
JavaScript / Node.js
// Bulk URL submission with fetch
async function submitToIndexNow(urls) {
const response = await fetch('https://api.indexnow.org/indexnow', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
host: 'yourdomain.com',
key: 'your-api-key-here',
urlList: urls
})
});
return response.status;
}
Python
# Python with requests library
import requests
payload = {
"host": "yourdomain.com",
"key": "your-api-key-here",
"urlList": ["https://yourdomain.com/page"]
}
r = requests.post("https://api.indexnow.org/indexnow", json=payload)
print(r.status_code)
HTTP Response Codes
| Code | Meaning | Action Required |
|---|---|---|
| 200 OK | URL(s) accepted and queued for indexing | None submission successful |
| 202 Accepted | Request received, processing asynchronously | None submission successful |
| 400 Bad Request | Invalid request format or parameters | Check JSON structure, URL encoding, and required fields |
| 403 Forbidden | Key verification failed | Check key file is accessible at correct URL with correct content |
| 422 Unprocessable Entity | URLs are not on the specified host | Ensure all URLs in urlList match the host field |
| 429 Too Many Requests | Rate limit exceeded | Reduce submission frequency; batch URLs into fewer requests |