Examples

Fetch an arXiv paper for an AI agent

arXiv URLs come in two flavors: `/abs/` (HTML abstract page) and `/pdf/` (full paper PDF). AgentFetch routes each to the right extractor — Trafilatura for the abstract, pypdf for the paper — and returns Markdown with title, authors, abstract, and body text.

Try it

Get a free key at agentfetch.dev (500 free fetches/mo, no credit card).

curl -X POST https://api.agentfetch.dev/fetch \
  -H "Content-Type: application/json" \
  -H "X-AgentFetch-Key: af_xxx" \
  -d '{
    "url": "https://arxiv.org/abs/2402.12345",
    "max_tokens": 2000
  }'

In an MCP-aware agent

fetch_url(
  url="https://arxiv.org/abs/2402.12345",
  max_tokens=2000,
)

In LangChain

from langchain_agentfetch import AgentFetchTool

tool = AgentFetchTool(api_key="af_xxx")
result = tool.run({"url": "https://arxiv.org/abs/2402.12345"})

How it routes

AgentFetch automatically routes fetch arxiv paper-style URLs through Trafilatura (abstract) / pypdf (full paper) based on domain heuristics — you don't pick a fetcher.

When agents reach for this

Build a research assistant, summarize papers, extract citations.


Related patterns

Fetch a Hacker News thread for an AI agent
Fetch a Twitter / X thread for an AI agent
Fetch a GitHub README for an AI agent
Fetch and extract text from a PDF for an AI agent
Fetch a public Notion page for an AI agent
Fetch a Reddit thread for an AI agent