HiveKeyword(s)Fetcher - Search Posts on HIVE by mentioned Words

in HiveDevs15 hours ago

842shots_so.png

Today, during the day, I received a request from a friend who sometimes uses the search function on Ecency to find specific content on the Hive blockchain. He uses it mainly to curate posts more effectively. What he really needs is a way to search for certain words that were written inside the content of a post, not just in the title or tags.

He told me that there used to be a Discord bot that scanned the newest blog posts and sent a private message if it found something interesting. Sadly, that bot is no longer available.

That reminded me of a tool I had developed some time ago. It was built using hafSQL from @mahdiyari and allowed users to search for posts made by specific Hive accounts. The team at @hivewatchers also found the tool helpful, especially for looking up user behavior over time.

So I took the same codebase, adjusted it a bit, and built something new. Well, I should say I let it build itself, with a few clever prompts and some help from my AI assistant. The new version of the tool can now search up to ten keywords inside posts from the past three days. It uses hafSQL to scan the post bodies, not just the titles, and returns any matches it finds.

Right now, we do not really have a great notification or deep content search function on Hive that works like this, so I think this can be very useful. Especially for curators who want to quickly spot trending topics or specific terms that are being discussed in real time.

I have now also uploaded the tool to Render.com, where it can be accessed at the following URL:

https://hive-keyword-search.onrender.com

image.png

image.png

image.png


If the frontend or the tool is not reachable at some point, it does not mean that the whole service is broken or down. The reason is actually quite simple. I am currently using the free plan from Render to host the app. And with that plan, the service automatically goes to sleep after some time when nobody is using it.

So if you try to access the tool and it seems offline, just be patient. Click the link, wait a few moments, and the service will start up again by itself. This is completely normal for apps running on a free Render instance.

When it is waking up, it might take around 30 to 60 seconds before everything loads properly. But once it is online again, everything should work just fine. On your end, you might just see a loading screen or nothing happening at first — but do not worry, that is just the app starting up in the background.

image.png

Readme File:

🐝 Hive Keyword Tracker

A powerful, real-time search tool for the Hive Blockchain. This application allows users to monitor specific keywords across all Hive posts created in the last 3 days using a direct SQL connection to a HAF (Hive Application Framework) node.

✨ Features

  • Real-time HAF SQL: Queries the blockchain state directly for instant results.
  • Smart Keyword Monitoring: Track up to 10 keywords simultaneously.
  • Time Window: Automatically scans the last 72 hours (3 days) of blockchain activity.
  • Rich Post Previews:
    • Extracts and displays the first image from Markdown or HTML.
    • Highlights keyword context in snippets.
    • Shows author, date, and category/tags.
  • Platform Choice: Open posts directly in your favorite interface:
    • PeakD
    • Ecency
    • Hive.blog
  • Theme System: Built-in Dark Mode and Light Mode with persistence.
  • Local Persistence: Remembers your keywords, platform preference, and theme settings.
  • Debug Console: View the exact SQL queries generated and execution logs.

🏗 Architecture

Since web browsers cannot connect directly to PostgreSQL databases (due to security protocols), this project uses a lightweight Node.js Middleware architecture:

  1. Frontend (React + Vite): User interface and settings.
  2. Middleware (Express): Receives requests from the frontend, securely connects to the HAF SQL database, and returns sanitized JSON data.
  3. Database (HAF SQL): The public Hive Application Framework node (provided by Mahdiyari).

🚀 Getting Started (Local Development)

To run this project locally, you need to run both the Backend (Middleware) and the Frontend (React).

Prerequisites

  • Node.js (v18 or higher)
  • npm

1. Install Dependencies

npm install

2. Start the Backend Server

Open your first terminal window and run:

node server.js

This starts the middleware on http://localhost:3000.

3. Start the Frontend

Open a second terminal window and run:

npm run dev

This starts the UI (usually on http://localhost:3001).

4. Configure Connection (optional)

  1. Open the App in your browser.
  2. Go to Settings.
  3. Ensure Middleware URL is set to: http://localhost:3000/search.

☁️ Deployment (Render.com)

This project is optimized for deployment on Render as a "Web Service".

Build Command

Render needs to build the frontend and install backend dependencies:

npm install && npm run build

Start Command

Render needs to start the Node.js server (which serves the built frontend):

node server.js

Environment Variables

No manual environment variables are required. The application automatically detects:

  1. The PORT provided by Render.
  2. The environment (Production vs. Local) to adjust the API endpoint automatically to /search (relative path).

🛠️ Tech Stack

  • Frontend: React 18, TypeScript, Tailwind CSS, Lucide React
  • Backend: Node.js, Express.js, pg (PostgreSQL client)
  • Database: HAF (Hive Application Framework) PostgreSQL
  • Tooling: Vite

⚠️ Troubleshooting

"Failed to fetch" / Connection Error

  1. Local: Ensure node server.js is running in a separate terminal. Check your Settings > Middleware URL is http://localhost:3000/search.
  2. Production: Check the deployment logs. Ensure the build command successfully created the dist/ folder.

Database Errors (Status 500)

  • Check the Debug console at the bottom of the app.
  • If the HAF node is down or the query times out, the error details will appear there.

❤️ Credits

  • Creator: @louis88
  • HAF Node: Public endpoint provided by Mahdiyari.

Thank you very much! If you have any requests for changes, questions, or suggestions, please feel free to write them in the comments or tag me. Until then... have a wonderful Advent season!

Sort:  

Finally something to search from a word!

Could it be possible as future development to set a range of date to search? Last 3 days is kinda restrictive

Very restrictive.

Nice one will come in handy for sure.

Congratulations !!
You have been manual curated and upvoted by @ecency



Did you know that @stresskiller is also a witness now ?

Loading...

Are you talking about GINA on Discord? That got replaced by FRIDAY. Rishi created the new one.

Yes! that was the Bot. I checked their service and nothing found. GINA was the very first Discord Noti Bot <3

FRIDAY has been a good alternative. I have it set up so I can get alerted when someone posts in the Whisky community or my grilling and smoking community.

Loading...

Considering that none of searches in any Hive frontend work, this is a useful tool.

Loading...

What a beautiful

Loading...

Congratulations @louis88! Your post has been a top performer on the Hive blockchain and you have been rewarded with this rare badge

Post with the highest payout of the day.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Check out our last posts:

Our Hive Power Delegations to the November PUM Winners
Feedback from the December Hive Power Up Day
Hive Power Up Month Challenge - November 2025 Winners List
Loading...

This is very nice. I like the fact that it's user friendly and very easy to use.

Curating just got easier...

Loading...

very interesting concept

Loading...

Very handy, gave it a try and works very nicely. We definitely need more discovery tools like this

Loading...

This is totally amazing! well done!

Awesome but why only 3 days? Often I search old posts as a reference and often I fail, I could use that tool for this problem.

Easy to explain - Because of Curation. Friend wanted to actively curate special words written in the chain. Best Curation Window is within the 3 Days.

What exactly would you need to have your search more success?

Just to go for keywords in the text, like your tool. E.g. if one could add the timeframe (1d, 3d or all) that would be great!

Thank you for letting us know.

Loading...