Skip to content

API Keys

Serg edited this page Jun 6, 2026 · 7 revisions

API Keys Configuration

This page explains how ReconSR uses API keys for third-party services and how to configure them locally.

ReconSR stores API credentials in configs/keys.txt under the [Keys] section. Environment variables can also be used with the RECONSR_<SERVICE> format and have priority over values from the file.

Warning

ReconSR does not provide, manage, or validate third-party subscriptions, account limits, or API quotas. Obtain keys directly from the relevant service provider and review the limits in your own account before enabling API-backed modules.

Configuration File Creation

ReconSR checks for the API key configuration file during startup:

  1. If configs/keys.txt exists, ReconSR loads the existing settings.
  2. If configs/keys.txt is missing, ReconSR creates a default file with empty key values.
  3. If the file already exists, ReconSR reads it and does not overwrite it with defaults.

This behavior protects existing local credentials from being replaced by an automatically generated file.

Configuration File

The API key configuration file is located at:

configs/keys.txt

Default file content:

[Keys]
AbuseIPDB=
HackerTarget=
Shodan=
VirusTotal=
Hunterio=
HaveIBeenPwned=
Circl=
IPinfo=
Netlas=

Leave a value empty when you do not want to configure that service through the file.

Environment Variable Priority

ReconSR gives priority to system environment variables over values stored in configs/keys.txt.

Environment variables use the following format:

RECONSR_<SERVICE>

Replace <SERVICE> with the service name. Each service section below lists its own environment variable.

If configs/keys.txt contains one key and the environment variable contains another key, ReconSR uses the value from the environment variable.

Export a key into the current shell session:

export RECONSR_SHODAN=aaa

Run ReconSR with environment variables set only for one command:

RECONSR_SHODAN=aaa RECONSR_VIRUSTOTAL=bbb ./ReconSR example.com

Example priority behavior:

[Keys]
Shodan=file-key-value
export RECONSR_SHODAN=environment-key-value

In this case, ReconSR uses environment-key-value.

API-Backed Function Registration

For services that require a personal API key, ReconSR exposes the related functions only when the corresponding key is configured.

This applies to:

  • AbuseIPDB
  • VirusTotal
  • Hunterio
  • HaveIBeenPwned
  • IPinfo
  • LeakIX

If a required key is missing, the related functions are not returned to the dispatcher and are not scheduled for execution.

Circl, HackerTarget and Shodan have special behavior and are described separately below.

Demo Mode

Supported API-backed modules can run in demo mode by setting the service key to demo-api-key.

In demo mode, ReconSR returns bundled sample data instead of querying the external API. Demo mode must be enabled separately for each supported service.

Example:

[Keys]
AbuseIPDB=demo-api-key
HackerTarget=
Shodan=demo-api-key
VirusTotal=demo-api-key
Hunterio=demo-api-key
HaveIBeenPwned=demo-api-key
Circl=
IPinfo=demo-api-key
LeakIX=demo-api-key
Netlas=demo-api-key

HackerTarget is shown as empty because it does not use demo mode.

Note

Demo mode is intended for testing integrations and observing output structure without using a real third-party API account.

AbuseIPDB

AbuseIPDB requires an API key. If AbuseIPDB is empty, AbuseIPDB-backed functions are not returned to the dispatcher and are not scheduled for execution.

Official website: https://www.abuseipdb.com/

Configuration example:

[Keys]
AbuseIPDB=your-abuseipdb-key

Environment variable:

RECONSR_ABUSEIPDB

Demo mode example:

[Keys]
AbuseIPDB=demo-api-key

HackerTarget

HackerTarget can be used without an API key. When HackerTarget is empty, service limits are applied by source IP address.

Official website: https://hackertarget.com/

Configuration without a key:

[Keys]
HackerTarget=

Configuration with a key:

[Keys]
HackerTarget=your-hackertarget-key

Environment variable:

RECONSR_HACKERTARGET

Shodan

Shodan supports two capability modes.

When Shodan is empty, ReconSR uses only the public InternetDB function with reduced host exposure data.

When a Shodan API key is configured, the public InternetDB function is replaced by API-backed IP and domain functions with richer results.

Official website: https://shodan.io/

Configuration without a key:

[Keys]
Shodan=

Configuration with a key:

[Keys]
Shodan=your-shodan-key

Environment variable:

RECONSR_SHODAN

Demo mode example:

[Keys]
Shodan=demo-api-key

Note

Shodan API-backed domain lookups can consume query credits. Review your Shodan account limits before enabling broader Shodan options in Network Configuration.

VirusTotal

VirusTotal requires an API key. If VirusTotal is empty, VirusTotal-backed functions are not returned to the dispatcher and are not scheduled for execution.

Official website: https://www.virustotal.com

Configuration example:

[Keys]
VirusTotal=your-virustotal-key

Environment variable:

RECONSR_VIRUSTOTAL

Demo mode example:

[Keys]
VirusTotal=demo-api-key

Hunter.io

Hunter.io requires an API key. If Hunterio is empty, Hunter.io-backed functions are not returned to the dispatcher and are not scheduled for execution.

Official website: https://hunter.io/

Configuration example:

[Keys]
Hunterio=your-hunterio-key

Environment variable:

RECONSR_HUNTERIO

Demo mode example:

[Keys]
Hunterio=demo-api-key

Have I Been Pwned

Have I Been Pwned email-lookup requests require a paid subscription. If HaveIBeenPwned is empty, Have I Been Pwned-backed functions are not returned to the dispatcher and are not scheduled for execution.

Official website: https://haveibeenpwned.com/

Configuration example:

[Keys]
HaveIBeenPwned=your-haveibeenpwned-key

Environment variable:

RECONSR_HAVEIBEENPWNED

Demo mode example:

[Keys]
HaveIBeenPwned=demo-api-key

IPinfo

IPinfo requires an API key. If IPinfo is empty, IPinfo-backed functions are not returned to the dispatcher and are not scheduled for execution. The module supports both the free Lite API tier and paid API tiers.

Official website: https://ipinfo.io/

Configuration example:

[Keys]
IPinfo=your-ipinfo-key

Environment variable:

RECONSR_IPINFO

Demo mode example:

[Keys]
IPinfo=demo-api-key

LeakIX

LeakIX requires an API key. If LeakIX is empty, LeakIX-backed functions are not returned to the dispatcher and are not scheduled for execution.

Official website: https://leakix.net/

Configuration example:

[Keys]
LeakIX=your-leakix-key

Environment variable:

RECONSR_LEAKIX

Demo mode example:

[Keys]
LeakIX=demo-api-key

Netlas

Netlas requires an API key. If Netlas is empty, Netlas-backed functions are not returned to the dispatcher and are not scheduled for execution.

Official website: https://netlas.io/

Configuration example:

[Keys]
Netlas=your-netlas-key

Environment variable:

RECONSR_NETLAS

Demo mode example:

[Keys]
Netlas=demo-api-key

Circl

Circl can be used without an API key. When Circl is empty, the vuln_lookup module operates using standard public access.

Official website: https://vulnerability.circl.lu

Configuration without a key:

[Keys]
Circl=

Configuration with a key:

[Keys]
Circl=your-circl-key

Environment variable:

RECONSR_CIRCL

Complete Default Example

The following example shows the default API key configuration.

[Keys]
AbuseIPDB=
HackerTarget=
Shodan=
VirusTotal=
Hunterio=
HaveIBeenPwned=
Circl=
IPinfo=
LeakIX=
Netlas=

Clone this wiki locally