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

EndpointSearch Engine
https://api.indexnow.org/indexnowUniversal (all participating engines)
https://www.bing.com/indexnowMicrosoft Bing only
https://yandex.com/indexnowYandex 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
ParameterRequiredDescription
urlYesThe fully-qualified URL of the page. Must be URL-encoded. Must match the domain used in key file hosting.
keyYesYour IndexNow API key (8–128 alphanumeric characters). Must match the key stored in your verification file.
keyLocationNoIf 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

CodeMeaningAction Required
200 OKURL(s) accepted and queued for indexingNone submission successful
202 AcceptedRequest received, processing asynchronouslyNone submission successful
400 Bad RequestInvalid request format or parametersCheck JSON structure, URL encoding, and required fields
403 ForbiddenKey verification failedCheck key file is accessible at correct URL with correct content
422 Unprocessable EntityURLs are not on the specified hostEnsure all URLs in urlList match the host field
429 Too Many RequestsRate limit exceededReduce submission frequency; batch URLs into fewer requests