{"id":37088906,"url":"https://github.com/positivesecurity/blockscout-go-api","last_synced_at":"2026-01-14T10:54:51.229Z","repository":{"id":196564867,"uuid":"694674336","full_name":"PositiveSecurity/blockscout-go-api","owner":"PositiveSecurity","description":"Golang client for Blockscout API","archived":false,"fork":false,"pushed_at":"2024-04-06T19:53:18.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-06-19T17:57:27.838Z","etag":null,"topics":["blockscout","blockscout-api","ethereum","go"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PositiveSecurity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-21T13:20:00.000Z","updated_at":"2024-04-05T18:18:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"4644f432-1dbf-4913-af09-9ec9657bd1ff","html_url":"https://github.com/PositiveSecurity/blockscout-go-api","commit_stats":null,"previous_names":["positivesecurity/blockscout-go-api"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/PositiveSecurity/blockscout-go-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PositiveSecurity%2Fblockscout-go-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PositiveSecurity%2Fblockscout-go-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PositiveSecurity%2Fblockscout-go-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PositiveSecurity%2Fblockscout-go-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PositiveSecurity","download_url":"https://codeload.github.com/PositiveSecurity/blockscout-go-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PositiveSecurity%2Fblockscout-go-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28417733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockscout","blockscout-api","ethereum","go"],"created_at":"2026-01-14T10:54:50.760Z","updated_at":"2026-01-14T10:54:51.218Z","avatar_url":"https://github.com/PositiveSecurity.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# blockscout-api\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/PositiveSecurity/blockscout-go-api.svg)](https://pkg.go.dev/github.com/PositiveSecurity/blockscout-go-api)\n[![Go Report Card](https://goreportcard.com/badge/github.com/PositiveSecurity/blockscout-go-api)](https://goreportcard.com/report/github.com/PositiveSecurity/blockscout-go-api)\n\nGolang-client for [blockscout.com](https://www.blockscout.com/) (and its family), with almost complete implementation (accounts, transactions, tokens, contracts, blocks, epoch)\n\n- RPC API Endpoints\n- ETH RPC API\n- REST API\n\nWhile there are several explores available to blockchain projects, most are closed systems (ie Etherscan, Etherchain). Blockscout provides a much needed open-source alternative.\n\n# Usage\n\n```\ngo get github.com/PositiveSecurity/blockscout-go-api\n```\n\nCreate an API instance and off you go.\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/PositiveSecurity/blockscout-go-api\"\n\t\"github.com/PositiveSecurity/blockscout-go-api/client\"\n\t\"github.com/PositiveSecurity/blockscout-go-api/common\"\n)\n\nfunc main() {\n\n\tvar client client.BlockScoutAPIClient\n\n\t// set your url api\n\tclient.SetBlockScoutApiUrl(blockscout.EthMainnet)\n\tclient.SetBlockScoutApiUrlV2(blockscout.EthMainnetV2)\n\n\t// get the current block number\n\tblock, err := client.GetCurrentBlockRpcApi()\n\tif err != nil {\n\t\tfmt.Println(err)\n\t}\n\tfmt.Println(block)\n\n\t// convert *big.Int to uint64\n\tblocknum, err := common.BigIntToUint64(block)\n\tif err != nil {\n\t\tfmt.Println(err)\n\t}\n\n\t// get the ETH balance  of vitalik.eth on the current block number\n\taddr := \"0xd8da6bf26964af9d7eed9e03e53415d37aa96045\"\n\tbalance, err := client.GetBalance(addr, blocknum)\n\tif err != nil {\n\t\tfmt.Println(err)\n\t}\n\tfmt.Println(balance)\n\n\t// api v2\n\tbody, err := client.GetBlockInfo(\"0\")\n\tif err != nil {\n\t\tfmt.Println(err)\n\t}\n\n\t// print json\n\tcommon.PrettyPrintJSON(body)\n\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpositivesecurity%2Fblockscout-go-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpositivesecurity%2Fblockscout-go-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpositivesecurity%2Fblockscout-go-api/lists"}