Ampersand (&) and Apostrophe (') not recognised in API SOAP request

Job ID: 33800693

Budget: $30 – $250 AUD

I have a PHP code that uses an API search request to search for available business names in Australia.

However, if you search a name with the ampersand symbol or apostrophe it does not return any results.
It works fine with other symbols like exclamation mark or question mark. Need to fix this error so that business name searches containing the ampersand symbol or apostrophe are recognised.
Related categories: PHP WordPress SOAP API