How to get Target Contacts from Api4 Activity.get call?
For joining explicitly by adding an ActivityContact join then a Contact join instead of just a Contact join with &quot;Using ActivityContact&quot; in the explorer, I think it's just the Contact join that is causing you problems.  Either join on contact.id not id, or omit the explicit clause to use the implicit one.
ie use:
    ['Contact AS contact', TRUE, NULL, ['contact.id', '=', 'activity_contact.contact_id']],

or
    ['Contact AS contact', TRUE, NULL],

Both this:
$activities = \Civi\Api4\Activity::get()
  -&gt;addSelect('activity_date_time', 'subject', 'details', 'contact.display_name')
  -&gt;setJoin([
    ['ActivityContact AS activity_contact', TRUE, NULL, ['activity_contact.record_type_id', '=', 3]], 
    ['Contact AS contact', TRUE, NULL, ['activity_contact.id', '=', 'contact.id']],
  ])
  -&gt;setLimit(3)
  -&gt;execute();

and this:
$activities = \Civi\Api4\Activity::get()
  -&gt;addSelect('activity_date_time', 'subject', 'details', 'contact.display_name')
  -&gt;setJoin([
    ['ActivityContact AS activity_contact', TRUE, NULL, ['activity_contact.record_type_id', '=', 3]], 
    ['Contact AS contact', TRUE, NULL],
  ])
  -&gt;setLimit(3)
  -&gt;execute();

produce the same sql:
SELECT `a`.`id` AS `id`, `a`.`activity_date_time` AS `activity_date_time`, `a`.`subject` AS `subject`, `a`.`details` AS `details`, `contact`.`display_name` AS `contact.display_name`
FROM civicrm_activity a
INNER JOIN `civicrm_activity_contact` `activity_contact` ON `activity_contact`.`activity_id` = `a`.`id` AND `activity_contact`.`record_type_id` = \&quot;3\&quot;
INNER JOIN `civicrm_contact` `contact` ON `activity_contact`.`id` = `contact`.`id`
WHERE ((`a`.`activity_type_id` IS NULL OR (`a`.`activity_type_id` IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 17, 19, 22, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57)))) AND (`a`.`is_test` = \&quot;0\&quot;) AND (`a`.`is_deleted` = \&quot;0\&quot;)
LIMIT 3
OFFSET 0

(API Explorer 4 on 5.36.alpha1)