Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

reverse-search-api

A robust API that converts images into structured, actionable data. By pairing the visual search power of Google Lens with the Wikipedia encyclopedia, this tool identifies objects and provides instant cultural or technical context.


Key Highlights

  • Visual Identification: Extracts the most relevant visual matches.
  • Semantic Enrichment: Automatic summaries via the Wikipedia-API.
  • Performance: High-performance asynchronous backend powered by FastAPI.
  • Strict Validation: Uses Pydantic to ensure the integrity of inputs and outputs.

Tech Stack

  • Backend: FastAPI (Python 3.10+)
  • Automation: Selenium (Chrome Headless)
  • Parsing: BeautifulSoup4 & LXML
  • Enrichment: Wikipedia-API

Installation & Configuration

1. Cloning & Environment

git clone https://github.com/your-username/image-to-info-api.git
cd image-to-info-api
python -m venv venv
source venv/bin/activate  # venv\Scripts\activate on Windows
pip install -r requirements.txt

2. Drivers

Ensure you have chromedriver installed and that it matches your current version of Chrome.

3. Launching

uvicorn main:app --host 0.0.0.0 --port 8000 --reload

📡 Endpoint Documentation

POST /reverse-search

Analyzes a remote image and returns the results.

Request Body:

{
    "img_url": "https://url-to-your-image.jpg",
    "max_result": 3
}

Sample Response:

{
  "success": true,
  "data": {
    "knowledgeGraph": {
      "title": "Xbox Series S",
      "description": "The Xbox Series S is a video game console developed by Microsoft...",
      "url": "https://en.wikipedia.org/wiki/Xbox_Series_X_and_Series_S"
    },
    "visualMatches": [
      {
        "title": "Microsoft Xbox Series S",
        "source": "Store Name",
        "link": "https://example.com/product",
        "thumbnail": "data:image/jpeg;base64..."
      }
    ]
  }
}

About

Reverse-Search-API is a specialized backend service designed to power reverse image search and metadata retrieval capabilities. By integrating advanced search logic with efficient data processing, this API allows users to find information, sources, or related content starting from an image or a specific identifier.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages