I am thinking about ways of protecting against ransomware other than backing up all data. So i thought is there such service which could scan trough emails and find does email contains links or other ways to be infecter by ransomware?
Many mail providers scan by default for mails containing malicious code or links. Also browsers use blacklists like Google Safebrowsing to protect the user. And many enterprise firewalls try to protect their users as do local antivirus products. But, none of this is fully reliable so you should still use backups as an additional protection. Apart from that these backups also protect against hardware malfunctions (dead hard disk) or accidental data loss (i.e. delete the wrong file) so you should have such backups anyway.
Agree with everything posted so far, there is no such magic API. Quickest win with all the cases I dealt with so far was to block word macros on the mail gateway and in the organization GPO.