Cloudflare Docs

Connect AI Agents to
Cloudflare Docs

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

Back to Cloudflare Docs 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 provides direct, precise access to exactly what you're looking for.

Understanding Item IDs

Hacker News assigns sequential IDs to all content. These IDs appear in URLs when you browse the site. For example, in https://news.ycombinator.com/item?id=38471822, the ID is 38471822. Once you have an ID, you can use it to retrieve complete information about that specific item through the MCP server.

How to Query Items by ID

To retrieve a specific item, simply ask your AI assistant to fetch it using its Hacker News ID. You can phrase your request naturally:

  • "Get Hacker News item 38471822"
  • "Show me the details for HN item 38471822"
  • "Retrieve Hacker News story with ID 38471822"

The server will return comprehensive information about the item, including its type, title (if applicable), author, timestamp, score, and the full text or URL associated with it.

What You'll Get Back

The response includes all available data for the requested item:

  • Stories: Title, URL, author, submission time, score, and the number of comments
  • Comments: Comment text, author, timestamp, parent item reference, and any child comments
  • Polls: Question text, voting options, and scores
  • Job postings: Company name, position details, and description

Common Use Cases

Querying by ID is particularly useful when you've identified specific content you want to examine in detail. Perhaps you saw a story referenced elsewhere, found an ID in research notes, or want to follow up on a particular discussion. It's also valuable when working with comment threads—you can retrieve a specific comment and all its replies by requesting its ID.

Working with Comment Threads

When you query a story by ID, you'll receive references to its top-level comments. Each comment has its own ID, allowing you to drill down into specific conversation branches. This hierarchical structure lets you explore discussions at whatever level of detail you need.

Tips for Effective Queries

Keep your item IDs handy when conducting research. If you're tracking multiple stories or discussions, maintaining a list of relevant IDs makes it easy to return to specific content later. Remember that IDs are permanent—an item's ID never changes, making them reliable references for future retrieval.

Cloudflare Docs on Metorial

The Cloudflare Docs integration lets you search and retrieve documentation content directly within your workflow, enabling quick access to configuration guides, API references, and best practices without leaving your development environment.

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