Skip to main content

Python SDK for the Noimosiny API.

Project description

Noimosiny Python SDK

PyPI version Python versions License Code Style

Python client library for the Noimosiny API (OSINT and reverse-lookup platform).


Installation

Install the package via pip:

pip install noimosiny

Note: For local development, ensure dependencies are installed via pip install requests.


Quick Start

Initialize the Client using your API token (which can be obtained from the settings page on the Noimosiny dashboard). You can retrieve your balance and perform searches within a context manager block:

import os
from noimosiny import Client, NoimosinyError

def main():
    # Load API token from environment
    api_key = os.environ.get("NOIMOSINY_API_KEY", "your-api-key-here")
    
    try:
        # Use Client as a context manager for clean session closing
        with Client(api_key) as client:
            # Check account balances
            gold = client.get_gold_credits()
            silver = client.get_silver_credits()
            print(f"Balances: Gold={gold} credits | Silver={silver} credits")
            
            # Perform a reverse email lookup
            print("Running reverse email lookup...")
            results = client.search_email("user@example.com")
            print("Results:", results)
            
    except NoimosinyError as e:
        print(f"API Error occurred: {e}")

if __name__ == "__main__":
    main()

API Reference & Endpoints

Under the hood, the Noimosiny API routes all client actions to a single endpoint (POST https://api.noimosiny.com/v1/execute). The SDK abstracts this payload structure entirely into clean, pythonic method calls.

Rate Limits

  • 5 simultaneous requests.
  • 60 requests per minute.

Account & Balances

get_gold_credits() -> int

Retrieves your current Gold credit balance. Gold credits are consumed by reverse search queries (email, phone, username).

  • Equivalent API payload method: getGoldCredits
  • Example Return Value: 1000

get_silver_credits() -> int

Retrieves your current Silver credit balance. Silver credits are consumed by advanced tool queries.

  • Equivalent API payload method: getSilverCredits
  • Example Return Value: 5000

get_usage() -> dict

Retrieves detailed metrics about your API usage.

  • Equivalent API payload method: getUsage
  • Example Return Value:
    {
        "gold_usage": 1,
        "silver_usage": 0,
        "total_usage": 1
    }
    

Reverse Search Operations

All search operations return a python dictionary matching the API's standard response format. Each query will scan several internal modules and return success statuses along with metadata from matches.

search_email(email: str) -> dict

Perform a reverse email lookup to find associated social media profiles and online registration records.

  • Equivalent API payload parameter: "type": "reverse_email"
  • Response Format Example:
    {
        "type": "reverse_email",
        "query": "user@example.com",
        "results": [
            {
                "module": "TikTok",
                "success": true,
                "data": {
                    "id": "70397021345678",
                    "likes": 28506,
                    "region": "Australia",
                    "videos": 792,
                    "private": false,
                    "language": "en",
                    "username": "johndoe",
                    "verified": false,
                    "followers": 1029,
                    "following": 670,
                    "created_at": "2021-12-10 00:14:02",
                    "profile_url": "https://tiktok.com/@johndoe",
                    "display_name": "John Doe",
                    "social_profiles": {
                        "youtube": "John Doe"
                    }
                }
            }
        ]
    }
    

search_phone(phone: str) -> dict

Perform a reverse phone number search to find ownership details, carrier details, and geographical location info.

  • Equivalent API payload parameter: "type": "reverse_phone"
  • Response Format Example:
    {
        "type": "reverse_phone",
        "query": "+1234567890",
        "results": [
            {
                "module": "PhoneUS1",
                "success": true,
                "data": {
                    "zip": "12345",
                    "city": "New York",
                    "name": "John Doe",
                    "type": "Landline",
                    "state": "NY",
                    "county": "New York",
                    "carrier": "WINDSTREAM NUVOX, INC. - FL",
                    "latitude": "40.7128",
                    "longitude": "-74.0060",
                    "risk_scale": 0.6,
                    "risk_description": "possibly unsafe caller"
                }
            }
        ]
    }
    

search_username(username: str) -> dict

Perform a reverse search on a username to check registry status and profiles across multiple social networks.

  • Equivalent API payload parameter: "type": "reverse_username"
  • Response Format Example:
    {
        "type": "reverse_username",
        "query": "johndoe",
        "results": [
            {
                "module": "Instagram",
                "success": true,
                "data": {
                    "url": "https://instagram.com/johndoe",
                    "username": "johndoe",
                    "image": "https://scontent-atl3-1.cdninstagram.com/v/............",
                    "followers_count": 918,
                    "following_count": 0,
                    "posts_count": 0,
                    "is_private": true,
                    "is_verified": false,
                    "is_business": false,
                    "is_professional": false
                }
            }
        ]
    }
    

Error Handling

All SDK-specific exceptions subclass NoimosinyError. Catching it handles any API or connection issue:

from noimosiny import Client
from noimosiny.exceptions import (
    NoimosinyError,
    AuthenticationError,
    RateLimitError,
    InsufficientCreditsError,
    BadRequestError,
    ServerError
)

try:
    with Client("API_KEY") as client:
        client.search_email("test@example.com")
except AuthenticationError:
    print("Invalid API Key.")
except RateLimitError:
    print("Too many requests. Please throttle your queries.")
except InsufficientCreditsError:
    print("Your account is out of credits.")
except BadRequestError as e:
    print(f"Invalid query parameters: {e}")
except ServerError:
    print("An unexpected server-side error occurred on the Noimosiny API.")
except NoimosinyError as e:
    print(f"Generic SDK error: {e}")

Exception Hierarchy

  • NoimosinyError (Base exception class)
    • AuthenticationError (401 Unauthorized)
    • RateLimitError (429 Too Many Requests)
    • APIRequestError (Base for request validation & API responses)
      • BadRequestError (400 Bad Request)
      • InsufficientCreditsError (403 Forbidden)
      • APITimeoutError (408 Request Timeout)
      • ServerError (500+ Internal Server Error)

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

noimosiny-1.0.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

noimosiny-1.0.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file noimosiny-1.0.0.tar.gz.

File metadata

  • Download URL: noimosiny-1.0.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for noimosiny-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0cdedda19808e1a78b6d5e6fa8ffd7e676d03fb7d0c1551f92ef556d53a050e0
MD5 e6e1ed94fd50f0621ff0dbb7b336009a
BLAKE2b-256 54419f688df3e11878c36e780794820ffff27671362303523c18def209e98b26

See more details on using hashes here.

Provenance

The following attestation bundles were made for noimosiny-1.0.0.tar.gz:

Publisher: publish.yml on noimosiny/py-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file noimosiny-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: noimosiny-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for noimosiny-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 712861cef31908a50f9f1592868db9631fecb2cbd0d58d2728113467dcccdb05
MD5 222bbee1ee3ab203064349c214c90032
BLAKE2b-256 4f7c26ba4be02a3df35290dc91de07801ba54fcbe60d0c1c719635c28bfd7385

See more details on using hashes here.

Provenance

The following attestation bundles were made for noimosiny-1.0.0-py3-none-any.whl:

Publisher: publish.yml on noimosiny/py-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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