An Application Programming Interface (API) is the means by which third parties can write interfaces to communicate with other code. A Webservice is a type of API, which almost always operates over HTTP (although some, such as SOAP, may use alternative protocols such as SMTP). The official W3C definition mentions that Web Services do not necessarily use HTTP, but this is not common. Apis in general can use any means of communication they wish.
REST, on the other hand, is a style of software architecture, which basically explores the technology and protocols existing on the Web. And Restful is usually used to refer to web services that implement this architecture.
https://answall.com/q/11183/101
– Maniero