Hi,
Thank you for reaching out to the Google Ads Scripts support team.
I would like to inform you that the function “stats.getSearchBudgetLostImpressionShare()” is not valid in the Google Ads Script. You can get the metrics by using the "SELECT metrics.search_budget_lost_impression_share FROM campaign" code.
I hope this helps. Kindly reach out to us with the below details if you still face any issue.
You can share the requested details via Reply privately to the author option or a direct private reply to this email.
Thanks,
Google Ads Scripts team