Hello,
There is no way to simply get the total cost of a campaign from the API. You would have to fetch a CAMPAIGN_PERFORMANCE_REPORT, including the cost field.
Setting up the API is more involved than a simple HTTP request, so this might not be the right solution.
Regards,
Mike, AdWords API Team