Blog

How to let your agent read any web page as clean markdown

By Alan Lui · Published · Last updated

Give your agent apifare's scrape capability: it takes a URL and returns the page as clean markdown, never raw HTML. It runs on your apifare key, so you don't need a scraping account of your own.

Copy this line to your agent once apifare is connected:

Use apifare's scrape capability with {"url": "https://example.com"} and summarize the page in five bullet points.

Why not let the agent fetch the HTML itself?

A web page is mostly markup: navigation, scripts, styles and tracking tags around the text you actually wanted. Fed to a model as-is, that markup crowds out the content and uses up the context window. Markdown keeps the headings, lists, links and text, and little else.

What comes back?

The page's content as markdown, and only markdown: never raw HTML or the provider's full response. It takes one field, url, which must be an http or https address.

Which URLs does it accept?

HTML pages. A raw text or data URL — .txt, .md, .json, .xml, .csv, .yaml, .yml — is refused before anything is charged: the call comes back as a 400 telling your agent to fetch that file directly with its own HTTP tool, and no credits are spent. There is no parsing to pay for in a file that is already text.

When a page does fail to parse, a specific article or page URL usually works where a bare homepage or a redirecting URL does not; some sites block the provider's fetcher outright. Failed fetches are refunded, and the error says which case you hit.

Do I need a ScrapingBee or DataForSEO account?

No. scrape is resold: apifare holds the provider account, and your balance pays the listed price per call.

Already paying for ScrapingBee? Vault your key once and use the scrapingbee capability. apifare meters those calls at a flat fee, and your ScrapingBee account pays ScrapingBee.

What does a fetch cost, and what if it fails?

The per-call price is listed on /capabilities, and that listed number is what your balance is debited. If the provider fails to deliver the page, the call is refunded automatically, and the error body says so (refunded: true).

How do search and fetch work together?

Search finds the pages; fetch reads them. Together they give your agent a research loop on one balance, under the same caps, kill switch and receipts: search for a question, read the top two or three results, answer with links. See live web search for the search half.

For agents: the exact calls

  1. Over MCP (apifare-mcp): call_api with slug scrape and params {"url": "https://example.com/pricing"}. Not sure of the slug? search_apis finds it.
  2. Over HTTP: POST https://apifare.com/v1/call/scrape with Authorization: Bearer $APIFARE_TOKEN and the JSON body {"url": "https://example.com/pricing"}.
  3. On HTTP 402 the balance is empty: relay the body's human_readable line to your human, wait for the top-up, then retry the same call. Every other error and its fix: the error catalog.

For humans: set it up

  1. Connect your agent. Paste set up https://apifare.com/SKILL.md into it: it gets a key ($5 of calls free), writes its own config and makes a first call. Or get a key at /start and follow your client's setup guide.
  2. Ask. Fetch https://example.com/pricing and summarize the plans.

Which tool for which job

JobToolRuns on
One page as clean markdownscrapeready to run
Find the pages firstdataforseoready to run
Fetch through your own ScrapingBee keyscrapingbeeyour key
Crawl a whole site into textWebsite Content Crawlerready to run
Search and read the top pages in one runRAG Web Browserready to run
Emails and phone numbers from a company websiteContact Details Scraperready to run

"Ready to run" means your apifare key is all it needs; "your key" means you vault your own provider key once. Catalog tools come from the apifare tool index. More: every crawler and scraper in the catalog.

When this is the wrong tool

FAQ

Does it return HTML?

No. Markdown only: never raw HTML or the provider’s full response.

What does it take?

One field: url, an http or https address.

Do I need a scraping account?

No. scrape runs on apifare’s provider account; you need only your apifare key. With a ScrapingBee key of your own, the scrapingbee capability uses it instead.

What does a fetch cost?

The per-call price is listed on /capabilities, and that listed number is what your balance is debited. Failed provider calls are refunded.

Can it read pages behind a login?

No. It fetches a public URL, with no way to sign in.

Can it fetch a .txt or .json file?

No, and it does not charge you for asking: raw text and data URLs are refused up front with a 400, because your agent can fetch a file that is already text by itself. scrape is for HTML pages.

A page would not parse — what now?

Try the specific article or page URL rather than a bare homepage or a redirecting link; some sites block the provider’s fetcher entirely. Failed fetches are refunded, and with your own ScrapingBee key the scrapingbee capability uses that instead.

Give this to your agent

set up https://apifare.com/SKILL.md — and it takes it from there: key, config, first call. $5 of calls free.

No agent open right now? ① Get a key — $5 of calls free, then ② give it to your agent (setup guides).

Related posts

How to give your AI agent live web search without a search API keyGive Claude Code, Cursor or any MCP agent live Google results with one prepaid apifare key: no search provider account, no search key.How to pull Google Maps places and reviews into your AI agentGive your AI agent Google Maps places, ratings and reviews on one prepaid, capped apifare key, with no separate maps account.How to pull SEC filings and UK company records into your AI agentGive your agent US SEC EDGAR filings and the UK Companies House register with one prepaid key: no provider account and no provider key.How to get YouTube transcripts into your AI agentLet Claude Code, Cursor or any MCP agent pull YouTube transcripts, videos and channel data on one prepaid, capped apifare key.

For agents: this post as Markdown.