In general terms, you can for sure award the owner of a service (an API makes no exception) according to some results. However keep in mind that the success condition cannot be checked direclty from the contract because contracts can only check what happens in the blockchain and cannot gather any kind of external data.
This is a consequence of blockchain design where all nodes perform the same computation. Imagine if all node would connect to a web service to assess some offchain condition. This is just impossible. Hence, to complete the design of your solution you might need a bridge between on chain and off chain. This usually comes in form of oracle, which is a software able to read data from the web and then produce a valid transaction to unlock money in a contract. Oracle can be human too. A software and so called provable honest implementation of oracles is Oraclize.it.
Regarding the second part of the question, about how to split the reward with a second API provider, this is pretty simple and a contract can manage this with few instructions. I insert some code here, but consider it more pseudo-code rather than actual code.
contract Reward{
address public api1=0x123;
address public api2=0x124;
bool goalAchieved=false;
address oracle=0x234;
function unlock (){
//only oracle can unlock
if (msg.sender !=oracle) throw;
goalAchieved = true;
}
function () payable {
//this receives funds from a customer
}
function redeem(){
//only api1 can redeem
if (msg.sender != api1)throw;
if (!goalAchieved)throw;
api1.send(this.balance / 2);
api2.send(this.balance / 2);
}
}
Regarding transaction fee, the GAS needed my outcost the value of your API invocation. But this really depends on your specific use case. A transaction for every single API invocation could be an overkill, consider selling quotas of N invocations instead.