The term
Windows API (API simply means "application programming interface") usually refers to the lower-level workings of the Windows operating system. AutoHotkey uses this interface to do most of the things it can do via its C++ source code which wraps the Windows API for easier handling into AHK commands and functions with easier syntax - while it also allows more direct
DLLCalls to the Windows API. All this has mostly not much to do with websites, webscraping or the internet - but the basic MS Windows functionalities.
What
you are referring to is - in contrast - an (sometimes free, sometimes paid) interface that a specific website
may offer for interaction - usually to extract data, but also sometimes to write data to the website's database.
So, of course, there is some overlap with the goal of "normal" webscraping techniques that can be used on most webpages - but in contrast to webscraping which often might be against the actual terms of service of a website and could get your IP banned, Web-APIs are usually
official interfaces that allow to extract data easily and are specifically created and offered for these tasks... that means in a standardized, easily processable form and mostly with less data transfer (often in JSON format)... but you will have to refer to the specific implementation and documentation of a Webservice API to be able to use it. Often, you will also need a personal, private API
key to use this service - especially if the API offers paid and/or personalized services.
To come back to your initial example - filling the AHK forum's search box: No, you cannot use the website's API for this because there is simply no such interface available to the user on autohotkey.com... like on many websites. Of course, something like this could be offered by our website but it would have to be explicitly implemented.
Perhaps read and watch the information again that you are linking to yourself. I think Joe Glines explains the most important aspects of Webservice APIs and the differences to general webscraping quite good. He also shows examples of websites that offer such API services and how to use them.
tl;dr:
Windows API != Webservice APIs