Hubs
Hubs are peer to peer servers that work together to download and serve both onchain and offchain data for the Farcaster network. They are key to keeping the network running and for allowing developers to build apps on top of Farcaster. Any time you need to access data from Farcaster such as messages, users, or events, you’ll need to access it in the form of a Hub. Sometimes this might take place in the raw Hub API or through an abstraction.
Pinata offers free to use Hubs that can be accessed via API:
Or through gRPC:
Hub API
The Hub API can be used like any other API to fetch data like so:
For more info on how to use the Hub API, check out our Hub API Reference.
Hub gRPC
The gRPC endpoint can be used inside the hub-nodejs library and provides a level of abstraction.
Please consult the hub-nodejs documentation for more info on how to use it.