API Documentation

Public REST API for mobile number intelligence lookup.

๐ŸŒ Base URL

https://api.unknowns.app

Replace with your VPS domain or IP where the API is running.

๐Ÿ” Lookup Endpoint

GET /api/lookup?number={mobile}

Search a mobile number with deep-link analysis across all connected records.

Parameters

Param Type Required Description
number string Yes 10-digit Indian mobile. Auto-cleans +91, 0 prefixes.

Example Request

GET /api/lookup?number=9876543210

Example Response

{
  "query": "9876543210",
  "found": true,
  "total_records": 4,
  "total_phones": 3,
  "phones": [
    "9876543210",
    "8817342793",
    "7000419892"
  ],
  "names": ["Arun Kumar Patel"],
  "father_names": ["Sarita Patel"],
  "emails": [],
  "addresses": [
    "W/O Arun Kumar, Rewa, Madhya Pradesh, 486340",
    "Ward no. 7, Korawara, Satna, MP, 485661"
  ],
  "regions": ["AIRTEL MP", "JIO MP"],
  "response_time_ms": 156
}

Error Response (400)

{
  "detail": {
    "error": "Invalid number",
    "message": "Please provide a valid 10-digit Indian mobile number.",
    "example": "9876543210"
  }
}

๐Ÿ“Š Stats Endpoint

GET /api/stats

Get database statistics and health info.

Example Response

{
  "total_records": 1780000000,
  "database_size": "156.2 GB",
  "engine": "SQLite WAL",
  "cache": "64MB",
  "mmap": "2GB"
}

๐Ÿ’ป Usage Examples

cURL

curl "https://api.unknowns.app/api/lookup?number=9876543210"

Python

import requests

resp = requests.get(
    "https://api.unknowns.app/api/lookup",
    params={"number": "9876543210"}
)
data = resp.json()
print(f"Found: {data['total_records']} records")
for phone in data['phones']:
    print(f"  ๐Ÿ“ž {phone}")

JavaScript (fetch)

const resp = await fetch(
  'https://api.unknowns.app/api/lookup?number=9876543210'
);
const data = await resp.json();
console.log(`Found ${data.total_records} records`);
data.phones.forEach(p => console.log(`๐Ÿ“ž ${p}`));

๐Ÿš€ Self-Hosting

# Clone the repo
git clone https://github.com/Unknown-2829/Hitek_db_api-web.git
cd Hitek_db_api-web

# Install dependencies
pip install -r requirements.txt

# Set database path
export DB_PATH="/data/users.db"

# Start the API server
python -m api.main

The API runs on port 8000 by default. Configure via environment variables.

Environment Variables

Variable Default Description
DB_PATH /data/users.db SQLite database path
API_HOST 0.0.0.0 Bind address
API_PORT 8000 Port number
CORS_ORIGINS * Comma-separated origins
DEEP_SEARCH_DEPTH 3 Max BFS hops
MAX_RESULTS 25 Max rows per query

โš ๏ธ Notes