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
- 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())
- 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())
- 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.
Metadata
Release files for osint-public-records-pkg 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| osint_public_records_pkg-0.1.1.tar.gz | 10.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| osint_public_records_pkg-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.9 kB
Release files / osint_public_records_pkg-0.1.1.tar.gz
| Download URL | osint_public_records_pkg-0.1.1.tar.gz |
|---|---|
| Size | 10.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eae792a57ee6c9bc51732f02ffc479d3240eed4c74994fb203d250e452ee58d7
|
|
BLAKE2b-256 checksum How to use checksums |
2388e0516b7180b43e23a537a70f78af433820d18a686936d6862ea527fb2dbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Release files / osint_public_records_pkg-0.1.1-py3-none-any.whl
| Download URL | osint_public_records_pkg-0.1.1-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d75a415819e4559d2a426bd967239900acba23d5a417b3c257e9c66981fe41e0
|
|
BLAKE2b-256 checksum How to use checksums |
4b5019161c5d0b71bff13962419b70014d6b44b079ac5f18fa676a4f83b44ec3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|