Complete Guide with Code Examples

IndexNow API Tutorial — Submit URLs to Search Engines Instantly

Complete 2026 guide with step-by-step instructions and code examples in Python, Node.js, and PHP. Get your content indexed faster on Bing, Yandex, Seznam, and Naver.

What is IndexNow?

IndexNow is an open-source protocol that allows website owners to instantly notify search engines when content is created, updated, or deleted. Instead of waiting for search engine crawlers to discover changes, you can push notifications directly to participating search engines.

Launched in October 2021 by Microsoft Bing and Yandex, IndexNow has grown to include multiple search engines and is now one of the fastest ways to get content indexed outside of Google.

How IndexNow Works

Your Website

Content is published or updated on your site

POST Request

You send a POST request to IndexNow API with URL list

Search Engines

All participating engines are notified instantly

When you submit a URL to one IndexNow endpoint (e.g., Bing), all participating search engines are automatically notified. This means you only need to submit once to reach multiple search engines.

Supported Search Engines

Microsoft Bing

api.indexnow.org (primary endpoint)

Yandex

Russia's largest search engine

Seznam.cz

Czech Republic's top search engine

Naver

South Korea's leading search engine

Note: Google does not currently support IndexNow. Use Google Indexing API for Google-specific submissions.

Step-by-Step Setup Guide

1

Generate Your API Key

Create a random API key (minimum 8 characters, maximum 128 characters). You can use any combination of letters and numbers.

Example: a1b2c3d4e5f6g7h8i9j0

Tip: Use a UUID generator or random string generator for security.

2

Host the API Key File

Create a text file named [your-api-key].txt containing only your API key. Upload it to the root of your website.

File location:

https://example.com/a1b2c3d4e5f6g7h8i9j0.txt

File contents:

a1b2c3d4e5f6g7h8i9j0

Ensure the file is publicly accessible (returns 200 status code when visited).

3

Submit Single URL (cURL Example)

Test your setup by submitting a single URL using cURL:

curl -X POST "https://api.indexnow.org/indexnow" \
  -H "Content-Type: application/json" \
  -d '{
    "host": "example.com",
    "key": "your-api-key-here",
    "keyLocation": "https://example.com/your-api-key.txt",
    "urlList": [
      "https://example.com/page1",
      "https://example.com/page2"
    ]
  }'

A 200 response code indicates success. 400/403 indicates an error with your API key or URL format.

Code Examples

Python Example

import requests
import json

def submit_to_indexnow(urls, api_key, domain):
    """
    Submit URLs to IndexNow API

    Args:
        urls: List of URLs to submit
        api_key: Your IndexNow API key
        domain: Your domain (e.g., 'example.com')
    """
    endpoint = "https://api.indexnow.org/indexnow"

    payload = {
        "host": domain,
        "key": api_key,
        "keyLocation": f"https://{domain}/{api_key}.txt",
        "urlList": urls
    }

    response = requests.post(
        endpoint,
        headers={"Content-Type": "application/json"},
        data=json.dumps(payload)
    )

    if response.status_code == 200:
        print(f"✓ Successfully submitted {len(urls)} URLs")
        return True
    else:
        print(f"✗ Error: {response.status_code}")
        return False

# Usage example
urls = [
    "https://example.com/blog/post-1",
    "https://example.com/blog/post-2",
    "https://example.com/products/new-product"
]

api_key = "your-api-key-here"
domain = "example.com"

submit_to_indexnow(urls, api_key, domain)

Node.js Example

const axios = require('axios');

async function submitToIndexNow(urls, apiKey, domain) {
  const endpoint = 'https://api.indexnow.org/indexnow';

  const payload = {
    host: domain,
    key: apiKey,
    keyLocation: `https://${domain}/${apiKey}.txt`,
    urlList: urls
  };

  try {
    const response = await axios.post(endpoint, payload, {
      headers: { 'Content-Type': 'application/json' }
    });

    if (response.status === 200) {
      console.log(`✓ Successfully submitted ${urls.length} URLs`);
      return true;
    }
  } catch (error) {
    console.error('✗ Error:', error.response?.status || error.message);
    return false;
  }
}

// Usage example
const urls = [
  'https://example.com/blog/post-1',
  'https://example.com/blog/post-2',
  'https://example.com/products/new-product'
];

const apiKey = 'your-api-key-here';
const domain = 'example.com';

submitToIndexNow(urls, apiKey, domain);

PHP Example

<?php
function submitToIndexNow($urls, $apiKey, $domain) {
    $endpoint = 'https://api.indexnow.org/indexnow';

    $payload = [
        'host' => $domain,
        'key' => $apiKey,
        'keyLocation' => "https://$domain/$apiKey.txt",
        'urlList' => $urls
    ];

    $options = [
        'http' => [
            'method' => 'POST',
            'header' => 'Content-Type: application/json',
            'content' => json_encode($payload)
        ]
    ];

    $context = stream_context_create($options);
    $response = file_get_contents($endpoint, false, $context);

    if ($response !== false) {
        echo "✓ Successfully submitted " . count($urls) . " URLs\n";
        return true;
    } else {
        echo "✗ Error submitting URLs\n";
        return false;
    }
}

// Usage example
$urls = [
    'https://example.com/blog/post-1',
    'https://example.com/blog/post-2',
    'https://example.com/products/new-product'
];

$apiKey = 'your-api-key-here';
$domain = 'example.com';

submitToIndexNow($urls, $apiKey, $domain);
?>

Verification & Testing

How to Verify Your Submission

  • Check Response Code: A 200 response means your submission was accepted.
  • Use Bing Webmaster Tools: View IndexNow submissions in the URL Submission section.
  • Monitor Indexing: Check if URLs appear in Bing search within 24-48 hours using site: operator.
  • Error Codes: 400 = bad request format, 403 = invalid API key, 422 = URL not from specified host.

Automation with Webhooks

For WordPress, Shopify, and custom CMS platforms, you can automate IndexNow submissions by triggering API calls whenever content is published or updated. Here are common approaches:

WordPress Integration

Use the IndexNow WordPress plugin or add a custom hook to your theme's functions.php to auto-submit new posts and pages.

Webhook Automation

Set up webhooks in your CMS to call your IndexNow submission script whenever content is created, updated, or deleted.

IndexNow vs Google Indexing API

FeatureIndexNowGoogle Indexing API
Supported EnginesBing, Yandex, Seznam, NaverGoogle only
Setup ComplexitySimple (API key + text file)Complex (OAuth, Service Account)
Daily QuotaUnlimited (rate-limited per domain)200 requests/day
Use CasesAll content typesJob postings & livestream videos only
Response Time24-48 hours (Bing)1-24 hours (Google)
CostFreeFree

Recommendation: Use both! IndexNow for Bing/Yandex and Google Indexing API for Google (if eligible).

Use IndexFlow to Automate IndexNow

IndexFlow automatically submits your URLs to IndexNow, Google Indexing API, Bing Webmaster API, and our proprietary crawl network. No coding required — just paste URLs and we handle the rest.

100 free credits on signup • No credit card required

Frequently Asked Questions

Is IndexNow free to use?
Yes, IndexNow is completely free with no usage limits. It's an open protocol maintained by Microsoft and Yandex. You can submit as many URLs as needed at no cost.
How many URLs can I submit at once?
You can submit up to 10,000 URLs in a single API request. For larger batches, split them into multiple requests with a few seconds delay between each submission.
Does IndexNow work for Google?
No, Google does not currently support IndexNow. For Google indexing, use Google Search Console URL inspection tool, Google Indexing API (for job postings/livestreams), or sitemaps.
How fast does IndexNow work?
Bing typically crawls and indexes submitted URLs within 24-48 hours. Yandex is similar. This is much faster than waiting for natural discovery which can take weeks.
Do I need to submit to each search engine separately?
No! When you submit to one IndexNow endpoint (e.g., api.indexnow.org), all participating search engines are automatically notified. One submission reaches multiple engines.
Can I use IndexNow for backlinks?
IndexNow only works for URLs you control (where you can host the API key file). For backlinks on external sites, you cannot use IndexNow unless you have access to those domains.
What happens if I submit a URL that's already indexed?
No problem! IndexNow accepts already-indexed URLs. This is useful when you update content and want search engines to recrawl the page to pick up the latest version.
Can I automate IndexNow for WordPress or Shopify?
Yes! WordPress has official IndexNow plugins (IndexNow by Bing, Rank Math). For Shopify, you can use webhooks or third-party apps. IndexFlow also offers automatic IndexNow submission for all major platforms.