Connect Api GPT-3.5 to internet

Could you explain to me step by step how to establish a connection between the GPT-3.5 API and the Internet to allow it to search online and rephrase the information it gets? I would like this process to be as simple as possible. I plan on using either Python or JavaScript for this, so I would appreciate if your help could be geared towards either of these programming languages.