# How to let your agent read any web page as clean markdown By Alan Lui. Published 2026-09-13; last updated 2026-09-19. Page: https://apifare.com/blog/let-your-agent-read-any-web-page Give your agent apifare's [scrape capability](https://apifare.com/capabilities/scrape): 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 ```text 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](https://apifare.com/capabilities/scrapingbee). 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](https://apifare.com/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](https://apifare.com/blog/give-your-agent-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](https://apifare.com/errors). ## 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](https://apifare.com/start?origin=blog) and follow your client's [setup guide](https://apifare.com/integrations). 2. **Ask.** `Fetch https://example.com/pricing and summarize the plans.` ## Which tool for which job | Job | Tool | Runs on | | --- | --- | --- | | One page as clean markdown | [scrape](https://apifare.com/capabilities/scrape) | ready to run | | Find the pages first | [dataforseo](https://apifare.com/capabilities/dataforseo) | ready to run | | Fetch through your own ScrapingBee key | [scrapingbee](https://apifare.com/capabilities/scrapingbee) | your key | | Crawl a whole site into text | [Website Content Crawler](https://apifare.com/tools/apify/website-content-crawler) | ready to run | | Search and read the top pages in one run | [RAG Web Browser](https://apifare.com/tools/apify/rag-web-browser) | ready to run | | Emails and phone numbers from a company website | [Contact Details Scraper](https://apifare.com/tools/vdrmota/contact-info-scraper) | ready to run | More: [every crawler and scraper in the catalog](https://apifare.com/tools/c/developer-tools) ## When this is the wrong tool - **The page needs a login.** scrape takes a public URL and nothing else, so it can't sign in as you. - **You need a whole site, not one page.** Use a crawler such as [Website Content Crawler](https://apifare.com/tools/apify/website-content-crawler). - **You need structured fields from a big site** (prices, ratings, reviews). A dedicated tool returns them as fields. Start from the [API guides](https://apifare.com/apis). - **You need the raw HTML itself**, say to check your own markup. scrape never returns it. - **The URL is already text** — a `.txt`, `.json` or `.md` file, an llms.txt, a raw feed. Your agent can fetch those itself; scrape refuses them before charging anything. ## 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](https://apifare.com/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`: it takes it from there (key, config, first call). $5 of calls free. No agent open right now? Get a key at https://apifare.com/start?origin=blog-fetch, then give it to your agent (setup guides: https://apifare.com/integrations).