Could someone explain me or give me some general tutorial how API works. Is syntax for all APIs the same or there is difference between APIs of different applications. I tried to google it, but couldn't find useful tutorial
which API exactly? API is simply "application programming interface" everybody writes his own API for the service/product he has to server his needs and customers.. there's no universal
Most api systems work on fetching information from one server to another. API depending on what your trying to do is different for every company as all there features are different. Most API work based off your script connecting to them threw a given url they use.. example: graph.facebook.com
It's also worth mentioning that an API doesn't have to be language specific and most services can be connected to using whatever lang you're most comfortable with. Usually an API will begin by requiring some credentials and then depending on the guidelines you can send/receive/exchange data according to their specifications. API's are often well documented(or should be). API is a very general term.
An API is basicly a way of letting you do stuff 'easier'. It gives you building blocks to reach goals in a standardized effort. Usually you will have a certain number of methods/procedures/what not you can call that allow you to do your tasks in a straightforward manner. Think of an API as the switches on a device that you can use. If you have an oven for example, the API to the oven are the methods you can use on that oven. Example: API call 1: switch ON/OFF API call 2: set temperature API call 3: open/close door API call 4: activate/deactivate grill etc. etc.