They perform much the same function. A WSDL (Web Service Definition Language file) is a file or set of files that describe a contract between a producer of a Web Service and a consumer of a Web Service. An API (Application Programming Interface) is a contract between a producer and consumer of a local software library. API is limited to the local system. WSDL can be used locally or remotely.
If you're gonna buy things, buy this thing and I get a fat kickback: