Hello there,
Yes, there is an API with your requirements.
Driver and firmware updates are published to Windows Update by independent hardware vendors and original equipment manufacturers, who continuously build new drivers and firmware or update existing ones. The deployment service will only show you driver and firmware updates that are applicable and better (normally by version number or version date) than what is currently installed on your devices . The service takes the guess work out of identifying what drivers and firmware updates apply to your devices and lets you focus on approving content that will help keep your devices protected and productive.
Windows Update Agent API https://video2.skills-academy.com/en-us/windows/win32/api/_wua/
Hope this resolves your Query !!
--If the reply is helpful, please Upvote and Accept it as an answer–