Using the Binary Ninja API

Language Specific Bindings

The Binary Ninja API is available through a Core API, through the C++ API, through a Python API, and a Rust API.

Core API

The Core API is designed to only be used as a shim from other languages and is not currently intended to be used to build C plugins directly.

  • Header (used by all other bindings)


The C++ API is what the Binary Ninja UI itself is built using so it's a robust and fully feature-complete interface to the core, however, it does not have the same level of detail in the documentation.

Python API

The most heavily documented of all of the APIs, the Python API serves as a useful documentation for the other APIs. Here's a list of the most important Python API documentation resources:

Rust API

The Rust API is still experimental and lacks complete coverage for all core APIs. Instructions on using are available in:

UI Elements

There are several ways to create UI elements in Binary Ninja. The first is to use the simplified interaction API which lets you make simple UI elements for use in GUI plugins in Binary Ninja. As an added bonus, they all have fallbacks that will work in headless console-based applications as well. Plugins that use these API include the angr and nampa plugins.

The second and more powerful (but more complicated) mechanism is to leverage the binaryninjaui module. Additional documentation is forthcoming, but there are several examples (1, 2, 3), and most of the APIs are backed by the documented C++ headers. Additionally, the generated binaryninjaui module is shipped with each build of binaryninja and the usual python dir() instructions are helpful for exploring its capabilities.