Hello Ranjana,
Could you please confirm if you're referring to Google Ads API or Google Ads Scripts? If API, you may use the
campaign resource segmenting by device using the
segments.device. If you're referring to Google Ads Scripts, we suggest that you post the concern on
this forum.
Thanks,
Bharani, Google Ads API Team

ref:_00D1U1174p._5001UAqrKE:ref