The request to get random user-agent takes time, also sometimes times out. This increase the average execution time of the API.
Check if proxy end points set its own user-agent header. Also, see if using fixed or randomly drawn headers of locally stored set might help.
https://github.com/RaidasGrisk/nameSpy/blob/788acb5de1d065b373c7b358541cd535d9a4ea4c/api/data_sources/google.py#L64