Lightweight package that makes it easy to submit URLs to the IndexNow API of various search engines
Project description
🔍 Submit URLs to the IndexNow API of Various Search Engines 🔎
Are you concerned about search engine optimization (SEO)? Do you want to make sure your website is indexed frequently by Bing, Yandex, DuckDuckGo, and other search engines?
IndexNow for Python is a lightweight, yet powerful Python package that makes it easy to submit URLs or entire sitemaps to the IndexNow API of various search engines, so your pages can be indexed faster.
Ready to try? Learn how to install and find tutorials in the user guide.
Getting Started
Basic Usage and Submit Individual URLs
Firstly, ensure that you have an API key for IndexNow. Hereafter, add your authentication credentials to the IndexNowAuthentication class, which will be used throughout the examples. You can now submit individual URLs to the IndexNow API:
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")
[!IMPORTANT] Instances of
authentication = IndexNowAuthentication(...)below refer to this section:authentication = IndexNowAuthentication( host="example.com", api_key="a1b2c3d4", api_key_location="https://example.com/a1b2c3d4.txt", )
Submit Multiple URLs in Bulk
How to submit multiple URLs in bulk to the IndexNow API:
from index_now import submit_urls_to_index_now, IndexNowAuthentication
authentication = IndexNowAuthentication(...)
urls = ["https://example.com/page1", "https://example.com/page2", "https://example.com/page3"]
submit_urls_to_index_now(authentication, urls)
Submit Entire Sitemap
How to submit an entire sitemap to the IndexNow API:
from index_now import submit_sitemap_to_index_now, IndexNowAuthentication
authentication = IndexNowAuthentication(...)
sitemap_location = "https://example.com/sitemap.xml"
submit_sitemap_to_index_now(authentication, sitemap_location)
Submit to Specific Search Engines
How to use the default SearchEngineEndpoint options or a custom endpoint:
from index_now import submit_url_to_index_now, IndexNowAuthentication, SearchEngineEndpoint
authentication = IndexNowAuthentication(...)
endpoint_bing = SearchEngineEndpoint.BING
endpoint_custom = "https://example.com/indexnow"
for endpoint in [endpoint_bing, endpoint_custom]:
submit_url_to_index_now(authentication, "https://example.com/page1", endpoint)
Become a Sponsor 🏅
If you find this project helpful, please consider supporting its development. Your donations will help keep it alive and growing. Every contribution makes a difference, whether you buy a coffee or support with a monthly donation. Find your tier here:
Thank you for your support! 🙌
Contribute
If you have suggestions or changes to the module, feel free to add to the code and create a pull request.
Report Bugs
If you encounter any issues, you can report them as bugs or raise issues.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file index_now_for_python-1.0.23.tar.gz.
File metadata
- Download URL: index_now_for_python-1.0.23.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53d3a18ff36941edc52832dee7e8b44ea0f03c822bc514403f3d073fb7116287
|
|
| MD5 |
e562614b80aeee694f6e19e7d2e187ba
|
|
| BLAKE2b-256 |
ed4ecf607273c4fed1fb09c12119854117be46f11e78b8a521fce46604e6fe4d
|
Provenance
The following attestation bundles were made for index_now_for_python-1.0.23.tar.gz:
Publisher:
release.yml on jakob-bagterp/index-now-for-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
index_now_for_python-1.0.23.tar.gz -
Subject digest:
53d3a18ff36941edc52832dee7e8b44ea0f03c822bc514403f3d073fb7116287 - Sigstore transparency entry: 1409162229
- Sigstore integration time:
-
Permalink:
jakob-bagterp/index-now-for-python@d25d714cbe546f3ba0a571358cdf9a8188040fff -
Branch / Tag:
refs/tags/v1.0.23 - Owner: https://github.com/jakob-bagterp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d25d714cbe546f3ba0a571358cdf9a8188040fff -
Trigger Event:
push
-
Statement type:
File details
Details for the file index_now_for_python-1.0.23-py3-none-any.whl.
File metadata
- Download URL: index_now_for_python-1.0.23-py3-none-any.whl
- Upload date:
- Size: 18.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59d2ae3eff7bace1dcca4bff1fefc9e5b229076dfd668ff9a848a4cb2bc9c673
|
|
| MD5 |
35ecad3561e194a9482f75df9800822f
|
|
| BLAKE2b-256 |
d0e18ef806292a7f60fe522eb2a8c8ff9cec5a20234fde790cb2cebf1b332df0
|
Provenance
The following attestation bundles were made for index_now_for_python-1.0.23-py3-none-any.whl:
Publisher:
release.yml on jakob-bagterp/index-now-for-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
index_now_for_python-1.0.23-py3-none-any.whl -
Subject digest:
59d2ae3eff7bace1dcca4bff1fefc9e5b229076dfd668ff9a848a4cb2bc9c673 - Sigstore transparency entry: 1409162234
- Sigstore integration time:
-
Permalink:
jakob-bagterp/index-now-for-python@d25d714cbe546f3ba0a571358cdf9a8188040fff -
Branch / Tag:
refs/tags/v1.0.23 - Owner: https://github.com/jakob-bagterp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d25d714cbe546f3ba0a571358cdf9a8188040fff -
Trigger Event:
push
-
Statement type: