Hi Ankit,
If you are using AdWords API/Google Ads API, you may use the status attribute to query only for the Ad status and get all the active ads. For instance, you may use
Ad Performance Report, with
Status field to check for the respective ad status. You will be able to use the
CampaignStatus and
AdGroupStatus to retrieve the ad group and campaign status too. Please refer to our
reporting code samples which might be helpful. You will be able to use the equivalent
Google Ads API resources to get the ad status. Let me know if you have any further questions.
Thanks,
Bharani, Google Ads API Team

ref:_00D1U1174p._5001UKMgcA:ref