So I'm trying to find specific text strings inside OP_RETURN outputs on the Bitcoin blockchain. Like if I wanna search for words like "Chancellor" or "fillippone" or whatever, is there any tool that actually lets you do that?
I know some sites used to do this, preturnio.com and blockchair.com come to mind, but one's gone offline and the other seems to be API-only now which doesn't work for what I need. I have a Windows-based Bitcoin node running (my Pi node is dead at the moment). Anyone know a solid step-by-step way to pull this off?
Thanks in advance.
Try opreturn.net. It searches OP_RETURN content across a few networks including BTC, worked fine for me a couple times. Also as a bonus you can use it to write OP_RETURN messages to the Dogecoin chain for free, which is kinda fun.
Oh interesting, this one never showed up in any of my searches before, appreciate it. But wait... it looks like Bitcoin search is disabled on there? Like I can't get it to return anything for BTC. Can you walk me through how you'd actually search for a word like "brink" on Bitcoin using that site? Explain it like I have zero clue what I'm doing, because I kinda don't lol.
Yeah the BTC connection seems to be down right now, honestly no idea why, it was working fine when I used it maybe six months back or so. You used to just type your word in the search bar on the front page and it'd pull results. Now it just throws an error. Probably a node issue on their end, worth checking back in a few days.
preturnio was actually solid, it even indexed Ordinal data which was cool. But it looks like it shut down, probably just too expensive to run and not enough people were using it.
I've poked around a few lightweight self-hosted block explorers and none of them bother indexing OP_RETURN at all. There's this obscure GitHub project called bitcoin-opreturn-indexer (sripwoud's repo) that does index it, but you query it with hex data which isn't exactly beginner-friendly.
Finding a site that does free-text search inside OP_RETURN without needing an API key is harder than it sounds. Your own node is probably the most reliable path but yeah there's no real guide for it.
Also just a side note, "Chancellor" specifically refers to the message Satoshi embedded in the Genesis block, you can see it at btc.com if you look up block 0.
There's a site called bitcoinstrings.com that shows plain text content from each blkXXXX.dat file. But it's manual, like you'd have to go through each file and CTRL+F your string yourself, no built-in search.
Bitcoin Core alone won't cut it here btw. There's no RPC command that converts OP_RETURN to readable text. You can use getrawtransaction or decodetransaction to find OP_RETURN outputs and then decode the hex yourself, but that's a completely different workflow from what you're asking for.
Ok but... how do I actually use any of this? I have a node, sure, but then what? Where do I even run that code and how do I tell it what text to look for? I need actual step-by-step instructions here. I'm really not a technical person, not gonna pretend otherwise.
That code I shared was more of a proof of concept to show that parsing blockchain data isn't rocket science. The point was: you could write your own parser pretty easily. Imo that's a cleaner solution than hunting for some half-broken third party tool.
Sure, writing a parser is "easy" if you know what you're doing. OP literally said he's not tech-savvy, so pointing him at raw parsing code isn't exactly helpful without some hand-holding. That script you shared goes through blocks, not individual transactions with OP_RETURN outputs, so it still needs work to be useful for this specific case. Could be adapted, but that takes time and skills, and OP has neither lol.
Here's a Python script I put together that searches for specific text inside blocks using the blockchain API. It logs transactions where your search string shows up. You can swap out the API calls and point it at your own node instead if you want better speed.
One thing I added: case-insensitive matching, just lowercase both your search term and the value before comparing and you're good.
Just to clarify on getrawtransaction: you need txids upfront to use it, and by default it pulls from mempool, not from confirmed blocks. And with over a billion transactions on chain now (yeah, billion with a B), trying to fetch and parse all of them through RPC to find OP_RETURNs is just... not realistic. Reading the blk*.dat files directly is way more practical.
Sorry for the late bump but just found ra0.org and it might be the easiest online tool for searching OP_RETURN text right now. bitcoinstrings.com still has no search feature at all, and opreturn.net's search is just broken, tried searching "EICAR" and "ordi" and got nothing back.
Also worth trying: bitcoinsearch.io. Works kind of like Google but for Bitcoin blockchain data. Full disclosure, I built it, so take that as you will lol.
I actually compared ra0.org against axcelvoid's tool and the latter returned way more results for the same query. Seems like ra0 caps the block range it searches. ra0 looks nicer for sure, cleaner interface, but I'd rather have full blockchain coverage even if the UI is more barebones.
Pretty much agree. I just blanked on axcelvoid's site when I posted earlier, even though I'd used it before. And yeah the result difference makes sense, ra0 only processes OP_RETURN outputs specifically so it's working with a smaller data set.
Alright this thread actually delivered, thanks everyone. And shoutout to axcelvoid for building that tool.
One thing though: for simple keyword searches I actually got more hits on ra0 than on bitcoinsearch, which surprised me. What I really didn't like about bitcoinsearch is that the results page doesn't show timestamps. Like I wanna know when a transaction happened without having to click into each one individually, that's kind of a basic thing to include.