Most relays do not have a REST API like nostr.band. You have to use web sockets to get the data. Libraries like nostr-tools make it easy to do that. Also, make sure you read nip-01 and keep the nips repo bookmarked. You’ll probably need to refer to it a lot. https://github.com/nbd-wtf/nostr-tools https://github.com/nostr-protocol/nips/blob/master/01.md
Also, make sure to read nip-50. Keep in mind that not many relays support nip-50 though. Nostr.band is one of the few relays that I know of that supports it. You can check out my Advanced Nostr Search app to see how I use it. https://github.com/nostr-protocol/nips/blob/master/50.md https://github.com/SamSamskies/advancednostrsearch