How to prevent spams from admin-ajax.php file?

How to prevent spams from admin-ajax.php file?