Skip to main content

ANY.RUN logo


PyPI version Downloads Coverage contributions welcome

ANY.RUN SDK

This is the official Python client library for ANY.RUN, supporting the cybersecurity solutions like the Interactive Sandbox, TI Lookup, and TI Feeds.
With this library you can interact with the ANY.RUN REST API and automate your workflow quickly and efficiently.

Available features

  • Built-in objects iterator and exception handling
  • Synchronous and asynchronous interface
  • Python 3.5-3.13 support

Sandbox API

ANY.RUN Sandbox is an online interactive sandbox for malware analysis, a tool for detection, monitoring, and research of cyber threats in real time.

  • Submit files and URLs for analysis
  • Monitor analysis progress in real-time
  • Get detailed reports
  • Manage the tasks

TI Lookup API and YARA Search

TI Lookup is a searchable database of IOCs, IOAs, IOBs, and events for threat hunting and a service for browsing malicious files by their content. Perform deep searches, look up threats online, and enrich your security solutions.

  • Look up URLs and file hashes
  • Search for IOCs using YARA rules
  • Get threat intelligence data
  • Monitor search progress in real time
  • Get detailed analysis results

TI Feeds API

Threat Intelligence Feeds provide data on the known indicators of compromise: malicious IPs, URLs, Domains Supports the TAXII STIX feed format.

Note:

You can access ANY.RUN services using an API key without a prefix. Legacy access methods are supported for backward compatibility but will be removed in future releases.

API key format: WmNfqnpo...2Sjon7mtvm8e 

The library public interface overview

import os
from anyrun.connectors import SandboxConnector


def main():
    with SandboxConnector.android(api_key) as connector:
        # Initialize the url analysis
        analysis_id = connector.run_url_analysis('https://any.run')
        print(f'Analysis successfully initialized. Analysis uuid: {analysis_id}')
        
        # View analysis status in real time
        for status in connector.get_task_status(analysis_id):
            print(status)
        
        # Get analysis verdict
        verdict = connector.get_analysis_verdict(analysis_id)
        
        if verdict in ('Suspicious', 'Malicious'):
            # Get analysis report
            connector.get_analysis_report(analysis_id, report_format='html', filepath='.')
        
        # Remove the analysis from history
        connector.delete_task(analysis_id)


if __name__ == '__main__':
    # Setup ANY.RUN api key
    api_key = os.getenv('ANY_RUN_Sandbox_API_KEY')
    main()

You can find additional usage examples here

Installation Guide

You can install the SDK using pip or any other package manager

$ pip install anyrun-sdk

Also, you can install the SDK manually using pyproject.toml

$ git clone git@github.com:anyrun/anyrun-sdk.git
$ cd anyrun-sdk
$ python -m pip install .

Contributing

We welcome contributions! Please see our Contributing Guide for details.

Useful links

TI Lookup query Guide
ANY.RUN API documentation

Contact us

Sales, demo and trial inquiries - sales@any.run
Technical support - techsupport@any.run
Public relations and partnerships – pr@any.run

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anyrun_sdk-1.14.16.tar.gz (35.8 kB view details)

Uploaded Source

Built Distribution

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

anyrun_sdk-1.14.16-py3-none-any.whl (54.3 kB view details)

Uploaded Python 3

File details

Details for the file anyrun_sdk-1.14.16.tar.gz.

File metadata

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

File hashes

Hashes for anyrun_sdk-1.14.16.tar.gz
Algorithm Hash digest
SHA256 71fe7d6f4914ece804466a9dad9c7afa575fd06ab22165f20d52819fef85b454
MD5 373129294f72031e8dfc1f364ec09b6b
BLAKE2b-256 aab46dd465badcd4738278452823e77db6a56a749b1a335e98771204e8380dd9

See more details on using hashes here.

Provenance

The following attestation bundles were made for anyrun_sdk-1.14.16.tar.gz:

Publisher: release-action.yml on anyrun/anyrun-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 anyrun_sdk-1.14.16-py3-none-any.whl.

File metadata

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

File hashes

Hashes for anyrun_sdk-1.14.16-py3-none-any.whl
Algorithm Hash digest
SHA256 15699a84d40a26df5f8b2f56c0eb1c2734966b73a9970c1adc318f6f6bf01921
MD5 4a59fe8144634a4a6eafee386209a76d
BLAKE2b-256 56397ef367d8e14c8e583f3a049d9123582331b708a389ef7d886af6642cd056

See more details on using hashes here.

Provenance

The following attestation bundles were made for anyrun_sdk-1.14.16-py3-none-any.whl:

Publisher: release-action.yml on anyrun/anyrun-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