Confused About API Results
It should be 'case_id' => 223 instead of 'id' => 223 for the CaseContact one. It seems to work with either on the public demo, but that might be coincidence - in the civicrm_case_contact table the 'id' field is an autoincrement technically unrelated to case_id, but may or may not match the case_id depending on creation order, multiple clients, and other happenings.

I would use 'case_id', like so

$result = civicrm_api3('CaseContact', 'get', array(
  'sequential' =&gt; 1,
  'return' =&gt; array("contact_id"),
  'case_id' =&gt; 223,
));