HawkLens provides a modern REST + Streaming API for interacting with the platform.
http://localhost:8080/api/v1
GET /health
Verifies if the API server is up and running.
Response:
{
"status": "up"
}GET /plugins
Returns a list of all currently registered and active OSINT plugins.
Response:
{
"plugins": ["twitter", "youtube", "reddit", "instagram", "tiktok"]
}GET /scan-stream?query=[query]
Starts a concurrent scan across all platforms and streams results back to the client using Server-Sent Events.
Query Parameters:
query(required): The term to search for across social platforms.
Event Stream Type: text/event-stream
Message Data Structure:
{
"platform": "twitter",
"data_type": "tweet",
"data": {
"text": "OSINT is powerful!",
"id": "12345"
}
}GET /results?platform=[platform]
Retrieves previously saved results from the PostgreSQL persistence layer.
Query Parameters:
platform(optional): Filter results by a specific platform.
const eventSource = new EventSource('/api/v1/scan-stream?query=cybersecurity');
eventSource.onmessage = (event) => {
const result = JSON.parse(event.data);
console.log(`New result from ${result.platform}:`, result.data);
};
eventSource.onerror = (err) => {
console.error("Stream failed:", err);
eventSource.close();
};