It is not recommended to use Selenium for testing APIs.
Reasons are as follows:-
Selenium is used to automate browsers, so it operates on the user interface level of an application.
The actions performed on a user interface might invoke API calls. Selenium is completely oblivious to this API interaction, however.
Also, Selenium is not a performance test tool.
There is no way to have Selenium interact with APIs directly.
If you want to make your career in automation testing you must take up the following Selenium Training Course. If you like reading you must read the following Selenium tutorial. You should also watch the below-mentioned video tutorial to learn the basic concepts of Selenium. .