Tavily

Connect AI Agents to
Tavily

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

Back to Tavily overview

Querying Specific Items by Identifier

Overview

When working with the Hacker News MCP Server, you'll often need to retrieve specific items using their unique identifiers. Every story, comment, and poll on Hacker News has a distinct numeric ID that allows you to access it directly. This guide explains how to query these items efficiently and what information you can expect to receive.

Understanding Item Identifiers

Hacker News assigns a unique integer ID to every piece of content on the platform. You'll encounter these IDs in various contexts:

  • Story IDs: Found in URLs when viewing articles (e.g., news.ycombinator.com/item?id=12345678)
  • Comment IDs: Each comment in a discussion thread has its own identifier
  • User-submitted content: All submissions, whether stories, polls, or jobs, carry unique IDs

These identifiers are permanent and stable, making them reliable references for retrieving specific content even as the front page and rankings change.

Querying Items by ID

To retrieve a specific item, simply ask your AI assistant for the Hacker News item using its identifier. For example:

  • "Get Hacker News item 38477259"
  • "Show me the details for HN story ID 38500123"
  • "Retrieve comment 38456789 from Hacker News"

The server will fetch the item and return comprehensive information about it, regardless of whether it's currently trending or buried in the archives.

What Information You'll Receive

When you query an item by its ID, the server returns structured data that varies depending on the item type:

For Stories and Submissions

You'll receive the title, URL (if it's a link post), author username, submission timestamp, current score, and an array of comment IDs associated with the discussion. This data gives you a complete snapshot of the submission and allows you to explore the conversation further.

For Comments

Comment queries return the comment text, author, timestamp, score, and the parent item ID. You'll also see any child comment IDs, enabling you to traverse the entire comment tree and understand the discussion hierarchy.

For Polls

Poll items include all the standard story information plus an array of poll option IDs, allowing you to examine voting choices and their respective scores.

Practical Applications

Querying by identifier is particularly useful when you need to:

  • Revisit specific discussions you've encountered previously
  • Investigate items referenced in other conversations or external sources
  • Build collections of related content using known IDs
  • Track the evolution of specific submissions over time by re-querying the same ID

This direct access method ensures you can always retrieve exactly what you need without searching or filtering through feeds.

Tavily on Metorial

The Tavily integration lets you perform AI-powered web searches and retrieve real-time information from across the internet directly within your MCP-enabled applications, enabling your AI assistants to access current data and factual content for more accurate and up-to-date responses.

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