### GET Database Statistics Request Source: https://docs.snusbase.com/ Example GET request to retrieve statistics about the current databases. This endpoint does not require authentication. ```http GET https://api.snusbase.com/data/stats ``` -------------------------------- ### Python Example: Search Database Source: https://docs.snusbase.com/ Demonstrates how to perform a database search using Python. Ensure you have your API key and include it in the 'Auth' header. ```python import requests import json url = "https://api.snusbase.com/data/search" api_key = "YOUR_API_KEY_HERE" headers = { "Content-Type": "application/json", "Auth": api_key } data = { "terms": ["example@gmail.com"], "types": ["email"] } response = requests.post(url, headers=headers, data=json.dumps(data)) if response.status_code == 200: print(response.json()) else: print(f"Error: {response.status_code}") ``` -------------------------------- ### JavaScript Example: Search Database Source: https://docs.snusbase.com/ Demonstrates how to perform a database search using JavaScript. Ensure you have your API key and include it in the 'Auth' header. ```javascript const url = "https://api.snusbase.com/data/search"; const apiKey = "YOUR_API_KEY_HERE"; fetch(url, { method: "POST", headers: { "Content-Type": "application/json", "Auth": apiKey }, body: JSON.stringify({ "terms": ["example@gmail.com"], "types": ["email"] }) }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error("Error:", error)); ``` -------------------------------- ### POST Combo Lookup Request Source: https://docs.snusbase.com/ Example POST request for combo lookups in the combolist database. Requires 'Content-Type: application/json' and 'Auth' headers. 'terms' and 'types' are mandatory. ```http POST https://api.snusbase.com/tools/combo-lookup Content-Type: application/json Auth: YOUR_API_KEY_HERE { "terms": ["example@gmail.com"], "types": ["username"] } ``` -------------------------------- ### Python: Get Database Statistics Source: https://docs.snusbase.com/ Fetches general statistics from the Snusbase database using the send_request function. This is a GET request. ```python stats_response = send_request('data/stats') print(stats_response) ``` -------------------------------- ### POST Database Search Request Source: https://docs.snusbase.com/ Example POST request to search the Snusbase database. Requires 'Content-Type: application/json' and 'Auth' headers. The 'terms' and 'types' parameters are mandatory. ```http POST https://api.snusbase.com/data/search Content-Type: application/json Auth: YOUR_API_KEY_HERE { "terms": ["example@gmail.com"], "types": ["email"] } ``` -------------------------------- ### JavaScript: Get Database Statistics Source: https://docs.snusbase.com/ Fetches general statistics from the Snusbase database. This is a simple GET request. ```javascript sendRequest('data/stats').then(response => console.log(response)); ``` -------------------------------- ### API Authentication Header Source: https://docs.snusbase.com/ Include your activation code in the 'Auth' header for all API requests. Activation codes generated after September 2021 start with 'sb'. ```http Auth: sb[...] ``` -------------------------------- ### Get Database Statistics Source: https://docs.snusbase.com/ Retrieves statistics about the Snusbase database. This endpoint does not require a request body. ```APIDOC ## GET data/stats ### Description Retrieves statistics about the Snusbase database. ### Method GET ### Endpoint /data/stats ### Parameters None ### Request Example None ### Response #### Success Response (200) - **stats** (object) - An object containing various database statistics. #### Response Example ```json { "stats": { "total_records": 123456789, "total_emails": 98765432, "total_passwords": 87654321 } } ``` ``` -------------------------------- ### JavaScript: Send API Request Source: https://docs.snusbase.com/ A utility function to send authenticated GET or POST requests to the Snusbase API. Ensure your API key is securely stored and not exposed client-side. ```javascript const snusbaseAuth = 'YOUR_API_KEY_HERE'; const snusbaseAPI = 'https://api.snusbase.com/'; const sendRequest = async (url, body = null) => { const options = { method: body ? 'POST' : 'GET', headers: { 'Auth': snusbaseAuth, 'Content-Type': 'application/json', }, body: body ? JSON.stringify(body) : null, }; const response = await fetch(snusbaseAPI + url, options); return await response.json(); }; ``` -------------------------------- ### Python: Send API Request Source: https://docs.snusbase.com/ A Python function to send authenticated GET or POST requests to the Snusbase API using the requests library. Ensure your API key is kept secure. ```python import requests snusbase_auth = 'YOUR_API_KEY_HERE' snusbase_api = 'https://api.snusbase.com/' def send_request(url, body=None): headers = { 'Auth': snusbase_auth, 'Content-Type': 'application/json', } method = 'POST' if body else 'GET' response = requests.request(method, snusbase_api + url, headers=headers, json=body) return response.json() ``` -------------------------------- ### Python: Perform Combo Lookup Source: https://docs.snusbase.com/ Performs a combo lookup using specified terms and types. This is a POST request. ```python combo_lookup_response = send_request('tools/combo-lookup', { 'terms': ['example@gmail.com'], 'types': ['username'], }) print(combo_lookup_response) ``` -------------------------------- ### Python: Perform IP WHOIS Lookup Source: https://docs.snusbase.com/ Retrieves WHOIS information for a given IP address. This is a POST request. ```python ip_whois_response = send_request('tools/ip-whois', { 'terms': ['12.34.56.78'], }) print(ip_whois_response) ``` -------------------------------- ### JavaScript: Perform IP WHOIS Lookup Source: https://docs.snusbase.com/ Retrieves WHOIS information for a given IP address. This is a POST request. ```javascript sendRequest('tools/ip-whois', { terms: ['12.34.56.78'], }).then(response => console.log(response)); ``` -------------------------------- ### Combo Lookup Source: https://docs.snusbase.com/ Search the combolist database for username/password combinations. ```APIDOC ## POST /tools/combo-lookup ### Description Search the combolist database for username/password combinations from large credential dumps. ### Method POST ### Endpoint https://api.snusbase.com/tools/combo-lookup ### Headers - `Content-Type: application/json` - `Auth: YOUR_API_KEY_HERE` ### Parameters #### Request Body - **terms** (Array of strings) - Required - Search terms (usernames or passwords). - **types** (Array of strings) - Required - Types of data to search. Possible values: `"username"`, `"password"`. - **wildcard** (Boolean) - Optional - Enable wildcard search (`true` or `false`). - **group_by** (Boolean or string) - Optional - Group results. Defaults to `"db"`. Set to `false` to disable grouping. ### Request Example ``` POST https://api.snusbase.com/tools/combo-lookup Content-Type: application/json Auth: YOUR_API_KEY_HERE { "terms": ["example@gmail.com"], "types": ["username"] } ``` ### Response #### Success Response (200) - **took** (float) - Time taken for the search in milliseconds. - **size** (integer) - The number of results found. - **results** (object) - An object containing search results, where keys are combolist names and values are arrays of credential objects. #### Response Example ```json { "took": 2.905, "size": 1194, "results": { "0007_COLLECTION3_COMBOLIST_300M_2019": [ { "username": "example@gmail.com", "password": "0981122847" }, { "username": "example@gmail.com", "password": "123456" } ] } } ``` ``` -------------------------------- ### Search with Wildcards Source: https://docs.snusbase.com/ Utilize wildcard characters '%' (any number of characters) and '_' (exactly one character) in search terms. Wildcards cannot be the first character. Escape them with a backslash '\'. ```json POST https://api.snusbase.com/data/search Content-Type: application/json Auth: YOUR_API_KEY_HERE { "terms": ["exa____@%.tld"], "types": ["email"], "wildcard": true } ``` -------------------------------- ### Python: Perform Hash Lookup Source: https://docs.snusbase.com/ Looks up information associated with a given hash. This is a POST request. ```python hash_lookup_response = send_request('tools/hash-lookup', { 'terms': ['482c811da5d5b4bc6d497ffa98491e38'], 'types': ['hash'], }) print(hash_lookup_response) ``` -------------------------------- ### JavaScript: Perform Combo Lookup Source: https://docs.snusbase.com/ Performs a combo lookup using specified terms and types. This is a POST request. ```javascript sendRequest('tools/combo-lookup', { terms: ['example@gmail.com'], types: ['username'], }).then(response => console.log(response)); ``` -------------------------------- ### JavaScript: Perform Hash Lookup Source: https://docs.snusbase.com/ Looks up information associated with a given hash. This is a POST request. ```javascript sendRequest('tools/hash-lookup', { terms: ['482c811da5d5b4bc6d497ffa98491e38'], types: ['hash'], }).then(response => console.log(response)); ``` -------------------------------- ### Search with Multiple Terms and Types Source: https://docs.snusbase.com/ Perform a search query with multiple terms and a broad range of types. Each type will be applied to all terms. ```json POST https://api.snusbase.com/data/search Content-Type: application/json Auth: YOUR_API_KEY_HERE { "terms": ["example1", "example2"], "types": ["username", "email", "lastip", "hash", "password", "name"] } ``` -------------------------------- ### Hash Lookup Request Source: https://docs.snusbase.com/ Use this endpoint to look up hashes or passwords. Specify the terms and their types (e.g., 'hash', 'password'). ```json POST https://api.snusbase.com/tools/hash-lookup Content-Type: application/json Auth: YOUR_API_KEY_HERE { "terms": ["482c811da5d5b4bc6d497ffa98491e38"], "types": ["hash"] } ``` -------------------------------- ### Hash Lookup Source: https://docs.snusbase.com/ Perform a lookup for given hashes or passwords. You can specify the types of lookup and enable wildcard search. ```APIDOC ## POST /tools/hash-lookup ### Description Performs a lookup for given hashes or passwords. You can specify the types of lookup and enable wildcard search. ### Method POST ### Endpoint https://api.snusbase.com/tools/hash-lookup ### Parameters #### Request Body - **terms** (Array of strings) - Required - Hashes or passwords to look up. - **types** (Array of strings) - Required - Types of lookup. Possible values: `"hash"`, `"password"`. - **wildcard** (Boolean) - Optional - Enable wildcard search. - **group_by** (Boolean or string) - Optional - Group results. Defaults to `"db"`. Set to `false` to disable grouping. ### Request Example ```json { "terms": ["482c811da5d5b4bc6d497ffa98491e38"], "types": ["hash"] } ``` ### Response #### Success Response (200) - **took** (number) - Time taken for the request in seconds. - **size** (number) - Number of results returned. - **results** (object) - Object containing the lookup results. - **HASHES** (Array of objects) - Array of hash lookup results. - **hash** (string) - The hash that was looked up. - **password** (string) - The associated password. #### Response Example ```json { "took": 0.102, "size": 1, "results": { "HASHES": [ { "hash": "482c811da5d5b4bc6d497ffa98491e38", "password": "password123" } ] } } ``` ``` -------------------------------- ### Combo Lookup Source: https://docs.snusbase.com/ Performs a combo lookup using provided terms and types. Requires a JSON request body. ```APIDOC ## POST tools/combo-lookup ### Description Performs a combo lookup using provided terms and types. ### Method POST ### Endpoint /tools/combo-lookup ### Parameters None #### Request Body - **terms** (array[string]) - Required - The terms to look up (e.g., emails, usernames). - **types** (array[string]) - Required - The types of data to look up (e.g., 'username', 'password'). ### Request Example ```json { "terms": ["example@gmail.com"], "types": ["username"] } ``` ### Response #### Success Response (200) - **results** (object) - An object containing the lookup results. #### Response Example ```json { "results": { "example@gmail.com": { "username": "example_user", "password": "hashed_password_example" } } } ``` ``` -------------------------------- ### Search Specific Tables Source: https://docs.snusbase.com/ Specify one or multiple tables for your search query. This is useful for retrieving all available columns for specific datasets. ```json POST https://api.snusbase.com/data/search Content-Type: application/json Auth: YOUR_API_KEY_HERE { "terms": ["example"], "types": ["username"], "tables": ["0001_STEALERLOGS_NA_106M_MALWARE_2023"] } ``` -------------------------------- ### Database Statistics Source: https://docs.snusbase.com/ Retrieve information about the current databases in the main search engine. This endpoint does not require authentication. ```APIDOC ## GET /data/stats ### Description Retrieve information about the current databases in the main search engine. ### Method GET ### Endpoint https://api.snusbase.com/data/stats ### Request Example ``` GET https://api.snusbase.com/data/stats ``` ### Response #### Success Response (200) - **rows** (integer) - The total number of rows across all databases. - **tables** (object) - An object where keys are table names and values are arrays of column names. - **features** (object) - An object detailing features like 'view_more' and 'combo_lookup' with associated table names. #### Response Example ```json { "rows": 18006941078, "tables": { "0001_STEALERLOGS_NA_121M_MALWARE_2023": [ "email", "username", "password", "host", "_domain" ] }, "features": { "view_more": [ "0005_ZING_VN_51M_ENTERTAINMENT_052015" ], "combo_lookup": [ "0001_PEMIBLANC_COMBOLIST_245M_2018" ] } } ``` ``` -------------------------------- ### IP WHOIS Lookup Request Source: https://docs.snusbase.com/ Retrieve WHOIS information for a list of IP addresses. Requires the 'terms' parameter containing the IP addresses. ```json POST https://api.snusbase.com/tools/ip-whois Content-Type: application/json Auth: YOUR_API_KEY_HERE { "terms": ["12.34.56.78"] } ``` -------------------------------- ### Python: Search Snusbase Data Source: https://docs.snusbase.com/ Searches the Snusbase database for specific terms, such as email addresses. Requires a POST request with terms and types specified. ```python search_response = send_request('data/search', { 'terms': ['example@gmail.com'], 'types': ['email'], }) print(search_response) ``` -------------------------------- ### IP WHOIS Lookup Source: https://docs.snusbase.com/ Retrieve WHOIS information for IP addresses. ```APIDOC ## POST /tools/ip-whois ### Description Retrieve WHOIS information for IP addresses. ### Method POST ### Endpoint https://api.snusbase.com/tools/ip-whois ### Parameters #### Request Body - **terms** (Array of strings) - Required - IP addresses to look up. ### Request Example ```json { "terms": ["12.34.56.78"] } ``` ### Response #### Success Response (200) - **took** (number) - Time taken for the request in seconds. - **size** (number) - Number of results returned. - **results** (object) - Object containing the WHOIS information for each IP address. - **[IP_ADDRESS]** (object) - WHOIS information for a specific IP address. - **continent** (string) - The continent of the IP address. - **continentCode** (string) - The continent code. - **country** (string) - The country of the IP address. - **countryCode** (string) - The country code. - **region** (string) - The region of the IP address. - **regionName** (string) - The name of the region. - **city** (string) - The city of the IP address. - **zip** (string) - The zip code. - **lat** (number) - The latitude. - **lon** (number) - The longitude. - **timezone** (string) - The timezone. - **isp** (string) - The Internet Service Provider. - **org** (string) - The organization. - **as** (string) - The Autonomous System number and name. - **asname** (string) - The Autonomous System name. - **mobile** (boolean) - Whether the IP is associated with a mobile device. - **proxy** (boolean) - Whether the IP is a proxy. - **hosting** (boolean) - Whether the IP is used for hosting. #### Response Example ```json { "took": 6.4, "size": 1, "results": { "12.34.56.78": { "continent": "North America", "continentCode": "NA", "country": "United States", "countryCode": "US", "region": "OH", "regionName": "Ohio", "city": "Columbus", "zip": "43215", "lat": 39.9612, "lon": -82.9988, "timezone": "America/New_York", "isp": "AT&T Enterprises, LLC", "org": "AT&T Enterprises, LLC", "as": "AS7018 AT&T Enterprises, LLC", "asname": "ATT-INTERNET4", "mobile": false, "proxy": false, "hosting": false } } } ``` ``` -------------------------------- ### Hash Lookup Source: https://docs.snusbase.com/ Performs a hash lookup using provided hash terms and types. Requires a JSON request body. ```APIDOC ## POST tools/hash-lookup ### Description Performs a hash lookup using provided hash terms and types. ### Method POST ### Endpoint /tools/hash-lookup ### Parameters None #### Request Body - **terms** (array[string]) - Required - The hash terms to look up. - **types** (array[string]) - Required - The types of hashes to look up (e.g., 'hash'). ### Request Example ```json { "terms": ["482c811da5d5b4bc6d497ffa98491e38"], "types": ["hash"] } ``` ### Response #### Success Response (200) - **results** (object) - An object containing the lookup results. #### Response Example ```json { "results": { "482c811da5d5b4bc6d497ffa98491e38": { "plaintext": "example_password", "type": "md5" } } } ``` ``` -------------------------------- ### IP WHOIS Lookup Source: https://docs.snusbase.com/ Performs an IP WHOIS lookup for a given IP address. Requires a JSON request body with 'terms'. ```APIDOC ## POST tools/ip-whois ### Description Performs an IP WHOIS lookup for a given IP address. ### Method POST ### Endpoint /tools/ip-whois ### Parameters None #### Request Body - **terms** (array[string]) - Required - The IP address to look up. ### Request Example ```json { "terms": ["12.34.56.78"] } ``` ### Response #### Success Response (200) - **results** (object) - An object containing the WHOIS lookup results for the IP address. #### Response Example ```json { "results": { "12.34.56.78": { "country": "US", "asn": "AS12345", "isp": "Example ISP" } } } ``` ``` -------------------------------- ### Hash Lookup Source: https://docs.snusbase.com/ Search for corresponding plaintext passwords or vice versa in the cracked password hash database. ```APIDOC ## POST /tools/hash-lookup ### Description Search for corresponding plaintext passwords or vice versa in the cracked password hash database. ### Method POST ### Endpoint https://api.snusbase.com/tools/hash-lookup ### Headers - `Content-Type: application/json` - `Auth: YOUR_API_KEY_HERE` ### Parameters #### Request Body - **terms** (Array of strings) - Required - Hashes or plaintext passwords to search for. - **types** (Array of strings) - Required - Types of data to search. Possible values: `"hash"`, `"password"`. ### Request Example ``` POST https://api.snusbase.com/tools/hash-lookup Content-Type: application/json Auth: YOUR_API_KEY_HERE { "terms": ["$argon2i$v=19$m=65536,t=4,p=1$NVphazc1SUg3YUVxNFV3Nw$EmshtvIzcwhG8lnDTsl0XvzCyg7h8k+Qr3tgTQihvZI"], "types": ["hash"] } ``` ### Response #### Success Response (200) - **took** (float) - Time taken for the search in milliseconds. - **size** (integer) - The number of results found. - **results** (object) - An object containing search results, where keys are table names and values are arrays of matching credential objects. #### Response Example ```json { "took": 1.567, "size": 1, "results": { "2123_BREACHFORUMS_BF_323K_HACKING_012026": [ { "username": "avvd", "email": "example@gmail.com", "password": "$argon2i$v=19$m=65536,t=4,p=1$NVphazc1SUg3YUVxNFV3Nw$EmshtvIzcwhG8lnDTsl0XvzCyg7h8k+Qr3tgTQihvZI" } ] } } ``` ``` -------------------------------- ### Search with Grouping by Specific Column Source: https://docs.snusbase.com/ Group search results by a specific column. If a result lacks the specified column, it will be placed in a 'NO_{GROUP_BY}' object. Set `group_by` to `false` to disable grouping. ```json POST https://api.snusbase.com/data/search Content-Type: application/json Auth: YOUR_API_KEY_HERE { "terms": ["example"], "types": ["username"], "group_by": "_domain" } ``` -------------------------------- ### JavaScript: Search Snusbase Data Source: https://docs.snusbase.com/ Searches the Snusbase database for specific terms, such as email addresses. Requires a POST request with terms and types specified. ```javascript sendRequest('data/search', { terms: ['example@gmail.com'], types: ['email'], }).then(response => console.log(response)); ``` -------------------------------- ### Search Snusbase Source: https://docs.snusbase.com/ Searches the Snusbase database for specific terms and types. Requires a JSON request body with 'terms' and 'types'. ```APIDOC ## POST data/search ### Description Searches the Snusbase database for specific terms and types. ### Method POST ### Endpoint /data/search ### Parameters None #### Request Body - **terms** (array[string]) - Required - The terms to search for (e.g., emails, usernames). - **types** (array[string]) - Required - The types of data to search for (e.g., 'email', 'username', 'password'). ### Request Example ```json { "terms": ["example@gmail.com"], "types": ["email"] } ``` ### Response #### Success Response (200) - **data** (array[object]) - An array of objects containing search results. #### Response Example ```json { "data": [ { "email": "example@gmail.com", "password": "hashed_password_example", "source": "example_source" } ] } ``` ``` -------------------------------- ### Database Search Source: https://docs.snusbase.com/ Search the Snusbase database for leaked information using specified terms and types. ```APIDOC ## POST /data/search ### Description Search the Snusbase database for leaked information. ### Method POST ### Endpoint https://api.snusbase.com/data/search ### Headers - `Content-Type: application/json` - `Auth: YOUR_API_KEY_HERE` ### Parameters #### Request Body - **terms** (Array of strings) - Required - Search terms. - **types** (Array of strings) - Required - Types of data to search. Possible values: `"email"`, `"username"`, `"lastip"`, `"password"`, `"hash"`, `"name"`, `"_domain"`. - **wildcard** (Boolean) - Optional - Enable wildcard search (`true` or `false`). - **group_by** (Boolean or string) - Optional - Group results. Defaults to `"db"`. Set to `false` to disable grouping. - **tables** (Array of strings) - Optional - Limit search to specific tables. ### Request Example ``` POST https://api.snusbase.com/data/search Content-Type: application/json Auth: YOUR_API_KEY_HERE { "terms": ["example@gmail.com"], "types": ["email"] } ``` ### Response #### Success Response (200) - **took** (float) - Time taken for the search in milliseconds. - **size** (integer) - The number of results found. - **results** (object) - An object containing search results, where keys are table names and values are arrays of result objects. #### Response Example ```json { "took": 31.714, "size": 1233, "results": { "2123_BREACHFORUMS_BF_323K_HACKING_012026": [ { "username": "avvd", "email": "example@gmail.com", "lastip": "127.0.0.9", "hash": "$argon2i$v=19$m=65536,t=4,p=1$NVphazc1SUg3YUVxNFV3Nw$EmshtvIzcwhG8lnDTsl0XvzCyg7h8k+Qr3tgTQihvZI", "salt": "Wlwirmmh", "uid": "331153", "created": "1729340505", "updated": "1729341708" } ] } } ``` ``` -------------------------------- ### Data Search Source: https://docs.snusbase.com/ General data search endpoint supporting various search criteria including multiple terms and types, specific table searches, grouping, and wildcard searches. ```APIDOC ## POST /data/search ### Description Performs a general data search. Supports searching with multiple terms and types, specifying tables, grouping results by a column, and using wildcard characters. ### Method POST ### Endpoint https://api.snusbase.com/data/search ### Parameters #### Request Body - **terms** (Array of strings) - Required - Terms to search for. - **types** (Array of strings) - Required - Types of data to search. Possible values include: `"username"`, `"email"`, `"lastip"`, `"hash"`, `"password"`, `"name"`, `"_domain"`. - **tables** (Array of strings) - Optional - Specify one or more tables to search within. - **group_by** (Boolean or string) - Optional - Group results by a specific column. Defaults to `"db"`. Set to `false` to disable grouping. - **wildcard** (Boolean) - Optional - Enable wildcard search. Wildcard characters are `%` (any number of any characters) and `_` (exactly one character). Wildcard characters cannot be the first character in a search term. Escape wildcard characters with a backslash (`\`). ### Request Example (Multiple Terms and Types) ```json { "terms": ["example1", "example2"], "types": ["username", "email", "lastip", "hash", "password", "name"] } ``` ### Request Example (Search Specific Tables) ```json { "terms": ["example"], "types": ["username"], "tables": ["0001_STEALERLOGS_NA_106M_MALWARE_2023"] } ``` ### Request Example (Group by Specific Column) ```json { "terms": ["example"], "types": ["username"], "group_by": "_domain" } ``` ### Request Example (Search with Wildcards) ```json { "terms": ["exa____@%.tld"], "types": ["email"], "wildcard": true } ``` ### Response #### Success Response (200) - The structure of the response will vary based on the `types` and `group_by` parameters. It typically includes `took` (time taken) and `size` (number of results), and a `results` object containing the data. If `group_by` is used, results will be organized by the specified column. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.