How can I get an API key?

Hi,

I see that there’s an API at https://api.l2beat.com/ but I couldn’t find how to get an API key for it.

I am planning to release an open source NPM package that compiles data from different sources in an efficiently importable way. (So I don’t need CORS or anything.) Parsing your HTML is obviously an option but it’s wasteful for both sides.

I’d appreciate if I could get a key for your API.

Thanks in advance,
JC

Hey!

Please use the public endpoints for the time being:

https://l2beat.com/api/scaling/summary - includes the latest information from our Summary page and the project slugs to be used in the other endpoints

TVS:

https://l2beat.com/api/scaling/tvs?range=max - includes historical total TVS (range can be any of [‘7d’, ‘30d’, ‘90d’, ‘180d’, ‘1y’, ‘max’], defaults to 30d)

https://l2beat.com/api/scaling/tvs/base - historical TVS per project, in this case Base. To control the range: https://l2beat.com/api/scaling/tvs/base?range=max (range can be any of [‘7d’, ‘30d’, ‘90d’, ‘180d’, ‘1y’, ‘max’], defaults to 30d)

https://l2beat.com/api/scaling/tvs/base/breakdown - breakdown of the TVS per project, in this case Base

Activity per project: https://l2beat.com/api/scaling/activity/base?range=max (in this case Base)

We’ll expose more data in the future, but if there’s anything in particular that you’re interested in, let me know! X/Telegram is radina_nt

1 Like

Thanks!

https://l2beat.com/api/scaling/summary seems to have all the data I need.

One important thing missing from your data IMO is the EIP-155 chain IDs. https://chainid.network/chains.json, https://chainlist.org/rpcs.json, and data from most providers I consume has the chain ID. This provides a way to uniquely identify chains across multiple data sets. Would be great to have them here but I can do a manual mapping otherwise.

1 Like