Skip to content

Jyotsana-Sharma/Geo-Insights-Pro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GEO Audit Tool - FastAPI Backend

A FastAPI backend for Generative Engine Optimization (GEO) auditing of educational course companies.

Features

  • AI Answer Audit: Analyzes Perplexity AI answers for brand and competitor mentions
  • Web Evidence Collection: Gathers data from web sources using Tavily API
  • Fact-Check Pass: Verifies factual claims about the brand
  • Reasoning Analysis: Uses CrewAI with Gemini to generate explanations and recommendations
  • Aggregate Scoring: Computes brand mention rates, competitor share, hallucination rates

Setup

  1. Install dependencies:
pip install -r requirements.txt
  1. Set environment variables (optional, defaults provided):
export PERPLEXITY_API_KEY="your-key"
export TAVILY_API_KEY="your-key"
export GEMINI_API_KEY="your-key"
  1. Run the server:
python main.py
# or
uvicorn main:app --reload

API Endpoints

GET /docs

Interactive API documentation (Swagger UI).

GET /health

Health check endpoint.

{
  "status": "ok"
}

POST /audit

Run a GEO audit for a brand.

Request:

{
  "brand_name": "Coursera",
  "brand_url": "https://www.coursera.org",
  "queries": [
    "best online courses for data science",
    "top educational platforms"
  ],
  "competitors": ["edX", "Udemy"]
}

Response: See the API specification in the code for the full response structure.

Architecture

  • main.py: FastAPI application and endpoints
  • services/perplexity_service.py: Perplexity API integration
  • services/tavily_service.py: Tavily search and extract API integration
  • services/crewai_service.py: CrewAI agent with Gemini for reasoning
  • services/audit_processor.py: Main audit workflow orchestration

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors