Is there an api where I can query if an address contains an erc20 token? I need it returned in JSON format.
Slightly different to what you asked... (in that in the below we're querying an ERC-20 token contract to see if it contains a balance for a specific address).
The following API will allow you to query an ERC-20 token contract (at a given address) for the balance associated with a particular account address.
(It works without specifying an API key, but might be rate limited.)