Skip to content

πŸ‘€ A high-performance REST API built with FastAPI to simulate GitHub profile views using multi-threaded headless browsers and secure API key authentication.

Notifications You must be signed in to change notification settings

dewhush/Github-Profile-View-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Github Profile View API

Created by dewhush Python FastAPI

A REST API wrapper for the GitHub Profile Viewer tool. Simulate profile views on GitHub through API endpoints.

Features

  • πŸš€ FastAPI-based REST API
  • πŸ” API Key Authentication via X-API-Key header
  • 🧡 Multi-threaded view execution
  • πŸ›‘οΈ Anti-detection features with headless Chrome
  • πŸ“„ Swagger UI documentation at /docs

Prerequisites

  • Python 3.8+
  • Google Chrome browser installed

Setup

1. Clone Repository

git clone https://github.com/dewhush/Github-Profile-View-API.git
cd Github-Profile-View-API

2. Create Virtual Environment

python -m venv .venv
.venv\Scripts\activate  # Windows
# source .venv/bin/activate  # Linux/Mac

3. Install Dependencies

pip install -r requirements.txt

4. Configure Environment

copy .env.example .env

Edit .env and set your API key:

APP_NAME=Github-Profile-View-API
APP_ENV=development
API_KEY=your-secure-api-key-here

Running the API

Option 1: Using batch script (Windows)

run_api.bat

Option 2: Using uvicorn directly

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

API will be available at: http://localhost:8000

API Documentation

Interactive Docs


Endpoints

GET /health

Health check endpoint.

Response:

{
  "status": "healthy",
  "timestamp": "2024-01-17T00:00:00.000000"
}

GET /status

Get API status information.

Response:

{
  "app_name": "Github-Profile-View-API",
  "environment": "development",
  "version": "1.0.0",
  "status": "running",
  "timestamp": "2024-01-17T00:00:00.000000"
}

POST /v1/view

Execute profile views on a GitHub profile.

Headers:

Header Required Description
X-API-Key Yes Your API key
Content-Type Yes application/json

Request Body:

{
  "username": "dewhush",
  "view_count": 10,
  "max_workers": 5
}
Field Type Required Description
username string Yes Target GitHub username
view_count integer Yes Number of views (1-100)
max_workers integer No Concurrent threads (1-20, default: 5)

Response:

{
  "username": "dewhush",
  "total_count": 10,
  "success_count": 10,
  "failed_count": 0,
  "status": "completed",
  "message": "Completed 10/10 views successfully"
}

Example Usage

cURL

curl -X POST http://localhost:8000/v1/view \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-api-key" \
  -d '{"username": "dewhush", "view_count": 5}'

Python

import requests

response = requests.post(
    "http://localhost:8000/v1/view",
    headers={
        "Content-Type": "application/json",
        "X-API-Key": "your-api-key"
    },
    json={
        "username": "dewhush",
        "view_count": 5,
        "max_workers": 3
    }
)
print(response.json())

Error Responses

Status Code Description
401 Invalid or missing API key
422 Validation error (invalid input)
500 Internal server error

Disclaimer

This tool is for educational purposes only. Using automated scripts to artificially inflate metrics may violate GitHub's Terms of Service. Use at your own risk.


License

MIT License


Created by dewhush

About

πŸ‘€ A high-performance REST API built with FastAPI to simulate GitHub profile views using multi-threaded headless browsers and secure API key authentication.

Topics

Resources

Stars

Watchers

Forks