NodeJS

		npm install es-ss.js
                let esss = require("es-ss.js"); 
                let ESSS = esss.ESSS;
                let searchEngineProvider = new ESSS('https://ethereum.search.secondstate.io');
		

See this link for syntax. Here is one quick example.

                address = '0x1234...789';
		var addressSearch = searchEngineProvider.searchUsingAddress(address);
			addressSearch.then(function(result) {
			console.log("Result is " + result);
		})
			.catch(function() {
			console.log("Error");
		});
		

API via Javascript

The API can be accessed programatically from within your DApp. The API will not throw any CORS errors. Here is a Javascript (JQuery) example.
                    _data = {"query": {"match": {"contractAddress": "0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd"}}}
                    $.ajax({
                        url: "https://ethereum.search.secondstate.io/api/es_search",
                        type: "POST",
                        data: _dataString,
                        dataType: "json",
                        contentType: "application/json",
                        success: function(response) {
                            console.log(response);
                        },
                        error: function(xhr) {
                            console.log("Get items failed");
                        }
                    });
                
The above code (which fetches the Gemini (GUSD) token will return the following data)
                    TxHash: "0xf51a232b0e5604aa3549f5d22fd470971a627d55536eb7477b39a80b5c38b01b"
                    abiShaList: Array(2)
                        0: "0x66c13023af2b102c70f7b2f0217ee22fa1d91ebf8e8c0b8c65525ced4725abfd"
                        1: "0x2b5710e2cf7eb7c9bd50bfac8e89070bdfed6eb58f0c26915f034595e5443286"
                    blockNumber: 6301780
                    contractAddress: "0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd"
                    creator: "0x4c2f150fc90fed3d8281114c2349f1906cde5346"
                    functionData:
                        custodian: "0x9A7b5F6e453d0cDa978163Cb4a9A88367250a52d"
                        decimals: 2
                        erc20Impl: "0x6704ba24b8640BCcEe6BF2fd276a6a1b8EdF4Ade"
                        lockRequestCount: 7
                        name: "Gemini dollar"
                        symbol: "GUSD"
                        totalSupply: 1974889093
                    functionDataId: "0x457d284f691b898cfd8c2d8cb22838dbcfbeb76262d2ee1a05f14b24eb046f76"
                    uniqueAbiAndAddressHash: "0xbf4975d6d9d20a2a8a300beac225c91d0b0029fce0a5045d6b6a0480886d4d5e"
                    

API via command line

The API can be accessed from any command line using the following Curl syntax.
        curl -X GET "https://ethereum.search.secondstate.io/api/es_search" -H 'Content-Type: application/json' -d' {"query": {"match": {"contractAddress": "0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd"}}}'
    

The above code (which fetches the Gemini (GUSD) token will return the following data)
        [
          {
            "TxHash": "0xf51a232b0e5604aa3549f5d22fd470971a627d55536eb7477b39a80b5c38b01b", 
            "abiShaList": [
              "0x66c13023af2b102c70f7b2f0217ee22fa1d91ebf8e8c0b8c65525ced4725abfd", 
              "0x2b5710e2cf7eb7c9bd50bfac8e89070bdfed6eb58f0c26915f034595e5443286"
            ], 
            "blockNumber": 6301780, 
            "contractAddress": "0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd", 
            "creator": "0x4c2f150fc90fed3d8281114c2349f1906cde5346", 
            "functionData": {
              "custodian": "0x9A7b5F6e453d0cDa978163Cb4a9A88367250a52d", 
              "decimals": 2, 
              "erc20Impl": "0x6704ba24b8640BCcEe6BF2fd276a6a1b8EdF4Ade", 
              "lockRequestCount": 7, 
              "name": "Gemini dollar", 
              "symbol": "GUSD", 
              "totalSupply": 1974889093
            }, 
            "functionDataId": "0x457d284f691b898cfd8c2d8cb22838dbcfbeb76262d2ee1a05f14b24eb046f76", 
            "uniqueAbiAndAddressHash": "0xbf4975d6d9d20a2a8a300beac225c91d0b0029fce0a5045d6b6a0480886d4d5e"
          }
        ]
    

This is an open source smart contract search engine and API.

Logo by Artillar (CC-BY-SA)