How to identify if the event is a repeat event?
The repeat entity is stored in civicrm_recurring_entity table so you might need to use the RecurringEntity api for this purpose. The following should result the repeating events for you -

$result = civicrm_api3('RecurringEntity', 'get', [
  'sequential' =&gt; 1,
  'entity_table' =&gt; "civicrm_event",
  'parent_id' =&gt; main_event_id,
]);


Similarly the api can also be used to find repeated activities.