Skip to main content

OSINT tool for public records (CAC Nigeria, OpenSanctions, Wikipedia).

Project description

OSINT Public Records Package

A powerful, asynchronous Open Source Intelligence (OSINT) tool designed to retrieve public records from difficult-to-access sources. This package specializes in Nigerian Corporate Registry (CAC) data, Global Sanctions/PEP lists, and general encyclopedic data.

Features

Module Source Description
CAC Records CAC Nigeria Access hidden ICRP & BOR endpoints to find registered companies, directors, and Persons with Significant Control (PSC).
Sanctions Check OpenSanctions Screen individuals against global sanctions lists, PEP (Politically Exposed Persons) lists, and criminal databases.
Wiki Intel Wikipedia Extract summaries, images, references, and related links for quick entity profiling.

Installation

From Source

Navigate to the root directory of the package and install via pip:

cd OSINT-PUBLIC-RECORDS-PKG
pip install osint-public-records-pkg

Dependencies

httpx (for asynchronous API requests)

beautifulsoup4 (for HTML parsing)

lxml (for fast XML/HTML processing)

requests (for synchronous operations)

Configuration

To use the OpenSanctions module, you need an API Key. You can configure this in two ways:

Method 1: Environment Variable (Recommended) Set the variable in your terminal or .env file. The package will automatically detect it.

Linux/macOS:

export OPEN_SANCTIONS_API_KEY="your_api_key_here"

Windows (PowerShell):

$env:OPEN_SANCTIONS_API_KEY="your_api_key_here"

###Method 2: Direct Initialization Pass the key directly when initializing the class in Python.

sanctions = OpenSanctionsAPI(api_key="your_api_key_here")

Usage Examples

  1. Searching CAC Nigeria (Corporate Affairs Commission) Find companies and retrieve Person with Significant Control (PSC) details using hidden API endpoints.
import asyncio
from osint_public_records_pkg import CACRecordsAPI

async def search_cac():
    cac = CACRecordsAPI()
    
    # Step 1: Search for a company name
    print("--- Searching ICRP ---")
    company_name = "Dangote Cement"
    results = await cac.search_name(company_name)
    
    if results["success"]:
        top_match = results["records"][0]
        print(f"Found: {top_match['name']} (RC: {top_match['rc_number']})")
        
        # Step 2: Get Directors/PSC details (BOR)
        # Note: This searches the Beneficial Ownership Register
        print("\n--- Fetching PSC Details ---")
        psc_data = await cac.get_company_psc_details(
            company_name=top_match['name'], 
            rc_number=top_match['rc_number']
        )
        
        if psc_data["success"]:
            for person in psc_data["psc_records"]:
                print(f"Director/Owner: {person['name']}")
                print(f"Address: {person['address']}")
                print(f"Nationality: {person['nationality']}\n")

if __name__ == "__main__":
    asyncio.run(search_cac())
  1. Screening for Sanctions & PEPs Check if an individual appears on international sanctions lists (OFAC, UN, EU) or is a Politically Exposed Person.
import asyncio
from osint_public_records_pkg import OpenSanctionsAPI

async def check_sanctions():
    # Ensure you have set OPEN_SANCTIONS_API_KEY in your env
    api = OpenSanctionsAPI()
    
    target = "Vladimir Putin"
    print(f"--- Screening {target} ---")
    
    result = await api.search_entity(target)
    
    if result["success"]:
        record = result["records"][0]
        print(f"Name: {record['name']}")
        print(f"Is PEP: {record['is_pep']}")
        print(f"Is Sanctioned: {record['is_sanctioned']}")
        print(f"Reason: {record.get('designation_reason', 'N/A')}")
        print(f"Countries: {record['country']}")
    else:
        print("No records found or API error.")

if __name__ == "__main__":
    asyncio.run(check_sanctions())
  1. General Intelligence (Wikipedia) Quickly gather background information, images, and references.
from osint_public_records_pkg import WikipediaScraper

def get_wiki_info():
    wiki = WikipediaScraper()
    query = "Central Bank of Nigeria"
    
    print(f"--- Wiki Lookup: {query} ---")
    data = wiki.search(query)
    
    if "error" not in data:
        print(f"Title: {data['title']}")
        print(f"Summary: {data['summary'][:200]}...") # First 200 chars
        
        print("\nSections:")
        for section in data['sections'][:3]:
            print(f"- {section}")
            
        print("\nReferences Found:", len(data['references']))

get_wiki_info()

Disclaimer

This tool is intended for legitimate Open Source Intelligence (OSINT) research, compliance checking, and investigative journalism.

CAC Data: Accesses public endpoints (icrp.cac.gov.ng and bor.cac.gov.ng). While these are public, automated scraping should be done responsibly and in accordance with local regulations.

OpenSanctions: Usage is subject to the OpenSanctions API Terms of Service.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

osint_public_records_pkg-0.1.1.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

osint_public_records_pkg-0.1.1-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file osint_public_records_pkg-0.1.1.tar.gz.

File metadata

  • Download URL: osint_public_records_pkg-0.1.1.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for osint_public_records_pkg-0.1.1.tar.gz
Algorithm Hash digest
SHA256 eae792a57ee6c9bc51732f02ffc479d3240eed4c74994fb203d250e452ee58d7
MD5 bc4d49e0237f27b06b7690fa2170090b
BLAKE2b-256 2388e0516b7180b43e23a537a70f78af433820d18a686936d6862ea527fb2dbd

See more details on using hashes here.

File details

Details for the file osint_public_records_pkg-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for osint_public_records_pkg-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d75a415819e4559d2a426bd967239900acba23d5a417b3c257e9c66981fe41e0
MD5 2343d16ade3eb71aed07a23a2b74ef68
BLAKE2b-256 4b5019161c5d0b71bff13962419b70014d6b44b079ac5f18fa676a4f83b44ec3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page