The Backblaze B2 Native API, introduced alongside Backblaze B2 back in 2015, provides a low-level interface to B2 Cloud Storage. We generally recommend that developers use the S3 Compatible API when writing new applications and integrations, as it is supported by a wider range of SDKs and libraries, and many developers already have experience with Amazon S3. You can use the Backblaze B2 web console or the B2 Native API to access functionality, such as application key management and lifecycle rules, that is not covered by the S3 Compatible API.
The B2 native API is more efficient at retrieving object metadata in batches with the b2_list_file_names
API. The S3-compatible API would require one ListObjectsV2
call, and a HeadObject
call for each file.
The S3-compatible API is cheaper for HeadObject
, unless you are saving the fileId
somewhere else. b2_get_file_info
requires fileId
, which can only be retrieved via b2_list_file_names
or b2_list_file_versions
, both are Transaction Class C APIs that are 10x more expensive than HeadObject
under Transaction Class B. Note that b2_list_file_names
already returns file metadata, so you don’t need to make an extra call to b2_get_file_info
if you just need those information.
For other API calls, the pricing is mostly the same, and according to the general recommendation on their blog, developers should prefer the S3-compatible API.