advertools — SEO & SEM Productivity Toolkit
MIT-licensed Python library for SEO, SEM, and digital marketing analysis: sitemap parsing, robots.txt analysis, keyword planning, and log file analysis.
advertools — SEO & SEM Productivity Toolkit
advertools is a Python library by Elias Dabbas that provides a comprehensive suite of SEO and SEM analytical tools. It handles the data-heavy workflows that digital marketers and SEO specialists encounter daily — crawling sitemaps, auditing robots.txt, generating keyword combinations, analyzing ad accounts, parsing structured data, and processing server log files.
Key Features
- Sitemap analysis: parse XML sitemaps and sitemap indexes into DataFrames
- robots.txt parsing: analyze crawl rules and
Disallow/Allowdirectives - Keyword tools: combinatorial keyword expansion, match-type normalization, keyword clustering
- SEM tools: account budget analysis, ad copy grading, Quality Score inputs
- Log file analysis: parse Apache/Nginx access logs to find SEO crawl patterns
- Structured data: extract JSON-LD and OpenGraph metadata from URLs
Quick Start
pip install advertools
import advertools as adv
# Analyze a sitemap
sitemap_df = adv.sitemap_to_df("https://example.com/sitemap.xml")
print(sitemap_df[["loc", "lastmod", "priority"]].head())
# Generate keyword combinations for Google Ads
keywords = adv.kw_generate(
products=["running shoes", "trail shoes"],
words=["buy", "best", "review"],
match_types=["Exact", "Phrase"]
)
print(keywords.head(10))
npx ai-supply add advertools-seo-sem-toolkit
Curated mirror of the open-source advertools (MIT). Get it from the source.
Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.
Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).
The same gate an agent runs before installing (POST /api/v1/trust/advertools-seo-sem-toolkit/check). Click a policy:
Consume advertools — SEO & SEM Productivity Toolkit programmatically. Authenticate with an API key or session — see Authorize an agent.
# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/advertools-seo-sem-toolkit
# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/advertools-seo-sem-toolkit/check \
-H "Content-Type: application/json" \
-d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'
# CLI
npx ai-supply add advertools-seo-sem-toolkit
# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/advertools-seo-sem-toolkit/install \
-H "Authorization: Bearer $AIM_KEY"
# MCP tool
install_listing({ "slug": "advertools-seo-sem-toolkit" })OpenAPI spec →Curated mirror — latest upstream source. See the repository for tagged releases.