Skip to main content

Developer-first GEO (Generative Engine Optimization) toolkit โ€” make your website visible to AI systems like ChatGPT, Claude, Gemini, and Perplexity.

Project description

GeoRankPy ๐ŸŒ๐Ÿค–

Generative Engine Optimization toolkit for Python developers.
Make your website visible to AI systems โ€” ChatGPT, Claude, Gemini, Perplexity, RAG pipelines, and autonomous agents.

PyPI Python CI License: MIT


Why GeoRankPy?

Traditional SEO tools optimise for Google's crawlers. Modern AI systems โ€” ChatGPT, Claude, Gemini, Perplexity โ€” rely on semantic structure, entity clarity, chunk retrievability, and metadata quality.

GeoRankPy is the developer-first toolkit for this new layer.

What GeoRankPy provides What existing tools provide
Python library + CLI SaaS dashboards
Flask / Django middleware WordPress plugins
llms.txt generation llms.txt checking
Semantic chunk analysis Keyword scoring
Entity extraction Backlink tracking
Open-source, self-hosted API subscriptions

Installation

pip install georankpy

With spaCy NLP entity extraction:

pip install georankpy[nlp]
python -m spacy download en_core_web_sm

With Flask integration:

pip install georankpy[flask]

With Django integration:

pip install georankpy[django]

Quick Start

Python API

from georankpy import audit, generate_llms_txt, analyze

# Full GEO audit
result = audit("https://example.com")
print(result.geo_score.geo_score)        # e.g. 74
print(result.geo_score.band)             # ScoreBand.GOOD
print(result.geo_score.issues)           # list of GeoIssue
print(result.geo_score.recommendations)  # actionable fixes

# Generate llms.txt only
llms = generate_llms_txt("https://example.com")
print(llms.content)  # save to /llms.txt on your server

# Semantic analysis only (faster)
report = analyze("https://example.com")
print(report.overall_score)   # 0.0โ€“1.0
print(report.chunks)          # RAG-ready chunks

CLI

# Full audit
georank audit https://example.com

# Save report
georank audit https://example.com --format html --output report.html
georank audit https://example.com --format md   --output report.md

# Generate llms.txt
georank generate llms https://example.com
georank generate llms https://example.com --output llms.txt

# Semantic analysis only
georank analyze https://example.com

Example CLI output:

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿ” GEO Score โ€” https://example.com โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚                  74/100  โ€ข  GOOD                                    โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

 Score Breakdown
 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”
 โ”‚ Dimension               โ”‚ Score โ”‚ Max โ”‚
 โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ค
 โ”‚ Semantic Clarity        โ”‚  18.5 โ”‚  25 โ”‚
 โ”‚ Metadata Completeness   โ”‚  17.0 โ”‚  20 โ”‚
 โ”‚ Chunk Retrievability    โ”‚  14.2 โ”‚  20 โ”‚
 โ”‚ Schema Quality          โ”‚  10.0 โ”‚  15 โ”‚
 โ”‚ Entity Richness         โ”‚   7.5 โ”‚  10 โ”‚
 โ”‚ llms.txt Quality        โ”‚   6.8 โ”‚  10 โ”‚
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”˜

Issues:
  ๐ŸŸก [MISSING_LLMS_TXT] No /llms.txt file found.
     โ†’ Run: georank generate llms https://example.com
  ๐Ÿ”ต [WEAK_ANCHOR_SENTENCES] Most sections lack strong opening sentences.

Flask Integration

from flask import Flask
from georankpy.integrations.flask_ext import GEO

app = Flask(__name__)

geo = GEO(
    app,
    site_name="My App",
    site_description="A Python web application.",
)

# Manually register key pages for llms.txt
geo.add_route("/docs",  "Documentation", "Full API reference")
geo.add_route("/about", "About",         "About our team and mission")
geo.add_route("/blog",  "Blog",          "Technical articles and tutorials")

Auto-created routes:

  • GET /llms.txt โ€” AI-readable site summary
  • GET /geo/score โ€” JSON status endpoint
  • GET /ai-sitemap.xml โ€” AI-friendly sitemap

Auto-injected into every response:

<meta name="ai-optimized" content="georankpy" data-version="0.1">
X-GEO-Optimized: georankpy/0.1

Django Integration

settings.py:

INSTALLED_APPS = [
    ...
    "georankpy.integrations.django_ext",
]

MIDDLEWARE = [
    ...
    "georankpy.integrations.django_ext.middleware.GeoMiddleware",
]

GEORANKPY = {
    "SITE_NAME": "My Django App",
    "SITE_DESCRIPTION": "A Django-powered application.",
    "INJECT_META": True,
    "ROUTES": [
        {"path": "/",       "title": "Home",          "description": "Main page"},
        {"path": "/about/", "title": "About",         "description": "About us"},
        {"path": "/docs/",  "title": "Documentation", "description": "API docs"},
    ],
}

urls.py:

from georankpy.integrations.django_ext.urls import geo_urlpatterns

urlpatterns = [
    ...
] + geo_urlpatterns

Score Dimensions

Dimension Max What it measures
Semantic Clarity 25 Heading structure, chunk quality, readability
Metadata Completeness 20 Title, description, Open Graph, canonical
Chunk Retrievability 20 RAG-readiness of content sections
Schema Quality 15 JSON-LD structured data richness
Entity Richness 10 Named entities: people, orgs, technologies
llms.txt Quality 10 AI-readable site summary file
Total 100

Export Formats

from georankpy import audit
from georankpy.reports.formatter import save_html, save_json, save_markdown

result = audit("https://example.com")

save_json(result,     "report.json")
save_markdown(result, "report.md")
save_html(result,     "report.html")

Roadmap

  • Core crawler + parser
  • Semantic analyzer
  • Entity extraction (rule-based + spaCy)
  • GEO scoring engine
  • llms.txt generator
  • Flask integration
  • Django integration
  • CLI (typer + rich)
  • JSON / Markdown / HTML reports
  • Django management command (python manage.py geo_audit)
  • Async crawler for multi-page audits
  • Benchmark dataset + research paper
  • Node.js SDK
  • VS Code extension

Contributing

Contributions are very welcome! Please read CONTRIBUTING.md first.

git clone https://github.com/Hero777-tech/georankpy
cd georankpy
pip install -e ".[dev]"
pytest tests/ -v

License

MIT โ€” see LICENSE.


Citation

If you use GeoRankPy in research, please cite:

@software{georankpy2025,
  author = {Nath, Akash},
  title  = {GeoRankPy: A Python Toolkit for Generative Engine Optimization},
  year   = {2025},
  url    = {https://github.com/Hero777-tech/georankpy}
}

Built by Akash Nath

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

georankpy-0.1.0.tar.gz (29.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

georankpy-0.1.0-py3-none-any.whl (36.3 kB view details)

Uploaded Python 3

File details

Details for the file georankpy-0.1.0.tar.gz.

File metadata

  • Download URL: georankpy-0.1.0.tar.gz
  • Upload date:
  • Size: 29.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for georankpy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d7b0dfd71117c1a550ee2675cecc377a92de6695405b86cbc7121b398aa09968
MD5 17c517214c9a122823e5536b503b77cc
BLAKE2b-256 3a7a14d03f7c6920e8014733512baa08ea0a4d403183e6c63377c6a936223925

See more details on using hashes here.

File details

Details for the file georankpy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: georankpy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 36.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for georankpy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b389f1706036fb7b715ebb6c06a339aab3a3634dadc23503b661a90744f71955
MD5 17a9600f760132f90f1d258880e589fc
BLAKE2b-256 b86475f16d431eb27ce2450e5f16003ce7a3c69a73bf2bc78cf25720ba8a78ed

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page