Skip to content

Vulners API introduction

Python 3 library for the Vulners database provides search, data retrieval, archive, and vulnerability scanning APIs for integration purposes. With this library you can develop game-changing security tools by embracing the power of the world's largest correlated security intelligence, which goes through constant updates and links more than 200+ data sources.

API key

Step-by-step guide with screenshots

Please, sign up on the Vulners website. To sign up on the Vulners website, click on your name in the bottom left corner to access the personal menu. From there, select the API KEYS tab and generate an API key with the api scope. From there, select the Create new API-key tab and generate an API key with the 'api' scope. Use this key for API interactions.

Validating API Key

Ensure that API key is active and valid with this quick Python test. Replace with actual API key. Remember, keep your API key confidential to prevent unauthorized access.

import requests

url = 'https://vulners.com/api/v3/search/lucene/'
data = {
    "query": "Cisco",
    "apiKey": "<Your-API-Key-Here>"  # Replace <Your-API-Key-Here> with actual API key
}

response = requests.post(url, json=data)
assert response.status_code == 200, f"Unexpected status code: {response.status_code}"

Python SDK Installation

The Vulners Python SDK is your gateway to integrating the biggest security database directly into your applications. It simplifies the process of searching, retrieving, and analyzing vulnerability data. Follow these steps to get started:

Installation

To install the Python SDK using pip. Next command installs the SDK and all necessary dependencies:

pip install vulners

Getting Started with the SDK

Integrate Vulners' capabilities into your projects with this example. The following script demonstrates how to use the SDK for a full-text search, showcasing the most common API method to translate your site search into API requests for equivalent results:

import vulners

vulners_api = vulners.Vulners(api_key="<Your-API-Key-Here>")
search_result = vulners_api.search("type:cve AND enchantments.exploitation.wildExploited:*")

Replace with your actual Vulners API key to start exploring the vast security database in your projects.

Back to top