Hi Priya,
Could you please clarify if your concern is about audience targeting or Custom affinity audience targeting? If your concern is about targeting ads by custom affinity audience interests, y
ou can target Interest categories by adding a CriterionUserInterest criteria. You will need to use a fixed set of user interest category IDs (In-market | Affinity). Please note Custom affinity audience is not yet supported in AdWords API services. You can use CRITERIA_PERFORMANCE_REPORT to retrieve Custom affinity audiences.
If your concern is different, could you please elaborate, so I can assist you further.
Regards,
Bharani, AdWords API Team