Stripe

Connect AI Agents to
Stripe

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

Back to Stripe overview

Querying Specific Items by ID

Understanding Item IDs in Hacker News

Every piece of content on Hacker News—whether it's a story, comment, poll, or job posting—has a unique numerical identifier called an item ID. These IDs are assigned sequentially as content is created, and they serve as the primary way to retrieve specific content directly through the Hacker News MCP Server.

Why Query by ID?

Querying by item ID is essential when you need to access specific content that you've already identified. Perhaps you're following up on a particular discussion, analyzing a specific story over time, or retrieving content referenced elsewhere. Unlike browsing feeds that show curated lists, ID-based queries give you direct, precise access to exactly what you need.

How to Query Specific Items

To retrieve a specific item, you simply need its numerical ID. You can request content through natural language queries to your AI assistant. For example:

  • "Get Hacker News item 37845290"
  • "Show me the details for item ID 37845290"
  • "Retrieve Hacker News story 37845290"

The server will fetch the complete information about that item, including its type (story, comment, poll, etc.), title (if applicable), text content, author, timestamp, score, and any associated metadata.

Finding Item IDs

Item IDs appear in several places throughout Hacker News:

  • In URLs: When viewing content on Hacker News, the item ID appears in the URL as item?id=37845290
  • In story feeds: When you retrieve lists of top or new stories, each result includes its item ID
  • In comment threads: Each comment has its own unique ID, which is provided when you retrieve a story's comments

What You'll Get Back

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

For stories: You'll receive the title, URL (if it's a link post), submission time, author username, current score, and the number of comments.

For comments: The response includes the comment text, author, timestamp, and references to parent items, allowing you to understand the comment's context within a discussion thread.

For polls: You'll get the poll question along with its associated poll options and voting data.

Practical Applications

Direct ID queries are particularly useful for monitoring specific stories over time to track how scores and comment counts change, retrieving full comment trees by starting with a root comment ID, or building references to specific discussions in your own documentation or analysis.

This straightforward querying mechanism ensures you always have direct access to any Hacker News content, making it easy to build sophisticated workflows around specific items of interest.

Stripe on Metorial

Connect to Stripe to manage payments, subscriptions, and customer data directly from your workflows, enabling you to create charges, retrieve transaction details, and handle billing operations programmatically.

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