A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
Dear Ashish,
Good day!!
I understand you are having a problem with SharePoint Online Search Rest API, since it's related to custom search, I suggest you post your concern in the related community i.e., Microsoft Q&A Community: https://learn.microsoft.com/en-us/answers/questions/ with SharePoint Development tag to get the help from experts.
Sorry for redirecting you to a different community as members in this community help the users with the box concern in Office 365 and SharePoint Online, to get better and fast assistance, we redirected you to the correct community.
Thanks for your understanding and patience. Have a good day!!
Best Regards,
Sophia