An AI-powered website content verification system that analyzes web pages and determines if they match their expected content description.
- URL validation and web scraping
- AI-powered content analysis using GPT-4
- Trust score calculation (0-100%)
- Detailed content analysis and matching
- Python 3.8+
- OpenAI API key
- Clone the repository:
git clone https://github.com/codewithdark-git/TrustChecker.git
cd TrustChecker- Install dependencies:
pip install -r requirements.txt- Configure environment variables:
- Rename
.env.exampleto.env - Add your OpenAI API key to the
.envfile:OPENAI_API_KEY=your_api_key_here
- Rename
Start the FastAPI server:
uvicorn app.main:app --reloadThe API will be available at http://localhost:8000
Analyzes a website's content and compares it with the expected description.
{
"url": "https://example.com",
"expected_description": "An educational website about physics"
}{
"url": "https://example.com",
"title": "Example - Learn Physics",
"match_score": 85,
"analysis": "The website content largely aligns with the description..."
}- Interactive API docs (Swagger UI):
http://localhost:8000/docs - Alternative API docs (ReDoc):
http://localhost:8000/redoc
The API includes comprehensive error handling for:
- Invalid URLs
- Unreachable websites
- Scraping failures
- AI analysis errors
This project is licensed under the MIT License - see the LICENSE file for details.