Thread:Project:Support desk/How to use the API in an extension (PHP, not Javascript)

I once was told that you can use the API DB queries also in extensions. All I find in the docs are use cases for calling api.php via ajax.