
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
index-now-for-python
Advanced tools
Lightweight Python package that makes it easy to 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.
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", )
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)
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)
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)
If you find this project helpful, please consider supporting its development. Your donations will help keep it alive and growing. Every contribution, no matter the size, makes a difference.
Thank you for your support! 🙌
If you have suggestions or changes to the module, feel free to add to the code and create a pull request.
If you encounter any issues, you can report them as bugs or raise issues.
Copyright (c) 2025 – present, Jakob Bagterp
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Lightweight Python package that makes it easy to submit URLs to the IndexNow API of various search engines
We found that index-now-for-python demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.