Jam

Connect AI Agents to
Jam

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

Back to Jam overview

Querying Specific Items by ID

Overview

Every item on Hacker News—whether it's a story, comment, poll, or job posting—has a unique numeric identifier. When you need to retrieve specific content rather than browsing feeds, querying by ID gives you direct access to exactly what you're looking for. This approach is particularly useful when you have a reference to a specific discussion, want to follow up on a particular comment thread, or need to retrieve detailed information about an item you've identified elsewhere.

How Item IDs Work

Hacker News assigns sequential numeric IDs to every piece of content created on the platform. These IDs are permanent and never change, making them reliable references for retrieving content even years after publication. You'll typically encounter item IDs in URLs (like https://news.ycombinator.com/item?id=12345678), in search results, or when browsing through stories and comments programmatically.

Querying an Item

To retrieve a specific item, simply provide its numeric ID to the server. You can request this through natural language with your AI assistant by saying something like "Get Hacker News item 12345678" or "Show me the details for item ID 38471234."

The server will return comprehensive information about the requested item, including:

  • Type: Whether it's a story, comment, poll, or other content type
  • Author: The username of who posted it
  • Content: The text or URL associated with the item
  • Metadata: Score, timestamp, and parent relationships
  • Children: IDs of direct replies or comments (for stories and comments)

Common Use Cases

Following Comment Threads: When exploring discussions, you'll often want to retrieve specific comments and their replies. By querying a comment's ID, you can access its full text and discover the IDs of responses, allowing you to navigate the conversation tree systematically.

Revisiting Specific Stories: If you've previously identified a valuable story, you can retrieve it again using its ID rather than searching through feeds. This is especially helpful for referencing discussions that are no longer on the front page.

Deep-Diving into Polls: Polls and their associated options each have unique IDs. Querying these lets you examine voting options and poll results in detail.

Tips for Effective Queries

When working with item IDs, remember that you can chain queries together. Start by retrieving a story to get its comment IDs, then query those comments individually to explore the discussion. This systematic approach helps you navigate complex threads efficiently without getting overwhelmed by large data structures.

Jam on Metorial

The Jam integration lets you manage bug reports and product feedback directly from your development environment, allowing you to create, search, update, and organize issues without switching contexts.

Connect anything. Anywhere.

Ready to build with Metorial?

Connect any AI agent to 600+ apps.

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