I can get whether my IPs are in some black lists, such as DNSBL. But Is there any API that I can do the same work with it. Especially, I don't want the HTML text, I just want know where my IPs is in a black list, for example "127.0.0.1 YES". Who can help me?
You don't need an API to check blacklists.
It's a simple dns query for the blacklist dns zone like zen.spamhaus.org
Example:
to query ip 10.11.12.13 in dns blacklists you will perform the dns query from (reverse IP) + blacklist zone name.
in our example the query will be 13.12.11.10.zen.spamhaus.org if the result is 127.0.0.2 then it's blacklisted else it's not blacklisted
find a complete working example and dnsbl lists here