Supabase

Connect AI Agents to
Supabase

Automate workflows and connect AI agents to Supabase. Metorial is built for developers. Handling OAuth, compliance, observability, and more.

Back to Supabase overview

Querying Specific Items by ID

What Are Item IDs?

Every piece of content on Hacker News—whether it's a story, comment, poll, or job posting—has a unique numeric identifier called an item ID. These IDs are permanent and sequential, meaning they never change and are assigned in order as content is created. When you want to retrieve specific content from Hacker News through the MCP server, querying by item ID is the most direct and reliable method.

When to Use ID-Based Queries

ID-based queries are ideal when you already know exactly which piece of content you want to access. This situation commonly arises when you're following up on a specific story someone mentioned, diving deeper into a particular comment thread, or tracking content you've previously discovered. Unlike browsing feeds or searching, querying by ID gives you instant, precise access to the exact item you need.

You might also use ID queries when working programmatically with Hacker News data. For instance, if you've stored IDs from a previous search or analysis session, you can retrieve those specific items again to check for updates or gather additional details.

How to Query Items by ID

To retrieve a specific item, simply ask your AI assistant for content using the item's ID number. You can phrase your request naturally, such as:

  • "Get Hacker News item 12345678"
  • "Show me the details for HN story ID 87654321"
  • "Retrieve comment 11223344 from Hacker News"

The server will fetch the item and return structured information including the item type, author, timestamp, content text (for comments), URL (for stories), score, and any child items (like comments on a story).

Understanding the Response

When you query an item by ID, the response includes comprehensive metadata about that item. For stories, you'll receive the title, URL, submission time, author, score, and the IDs of all comments. For comments, you'll get the comment text, author, timestamp, and any replies. This structured format makes it easy to understand the item's context and navigate to related content.

Finding Item IDs

If you're browsing Hacker News through the MCP server and discover interesting content, note the item IDs returned in the results. You can also find item IDs in Hacker News URLs—they appear as the number after id= in the web address. This makes it simple to transition between browsing the website and querying through the server.

Supabase on Metorial

The Supabase integration lets you query and manage your database, authentication, and storage directly from your AI assistant, enabling natural language database operations and real-time data access.

Connect anything. Anywhere.

Ready to build with Metorial?

Let's take your AI-powered applications to the next level, together.

About Metorial

Metorial provides developers with instant access to 600+ MCP servers for building AI agents that can interact with real-world tools and services. Built on MCP, Metorial simplifies agent tool integration by offering pre-configured connections to popular platforms like Google Drive, Slack, GitHub, Notion, and hundreds of other APIs. Our platform supports all major AI agent frameworks—including LangChain, AutoGen, CrewAI, and LangGraph—enabling developers to add tool calling capabilities to their agents in just a few lines of code. By eliminating the need for custom integration code, Metorial helps AI developers move from prototype to production faster while maintaining security and reliability. Whether you're building autonomous research agents, customer service bots, or workflow automation tools, Metorial's MCP server library provides the integrations you need to connect your agents to the real world.

Star us on GitHub