Skip to content

Authentication Settings for IndexNow#

IndexNowAuthentication#

Authentication credentials for the IndexNow API.

Parameters:

Name Type Description Default
host str

The host of the website to be indexed, e.g. example.com.

required
api_key str

The IndexNow API key, e.g. a1b2c3d4.

required
api_key_location str

The URL of the IndexNow API key file, e.g. https://example.com/a1b2c3d4.txt.

required
Example

Basic usage:

Python
1
2
3
4
5
6
7
8
9
from index_now import submit_url_to_index_now, IndexNowAuthentication

authentication = IndexNowAuthentication(
    host="example.com",
    api_key="a1b2c3d4",
    api_key_location="https://example.com/a1b2c3d4.txt",
)

submit_url_to_index_now(authentication, "https://example.com/page1")