TolcaCall the API

Extract structured data from a web page for an AI agent: the manual method, then one call

Updated 2026-11-23

When an AI agent needs a few facts from a web page (a company's address, a product price, the date of an event, the key points of an article), the problem is rarely the answer itself. It is the path to it: fetch the HTML, strip the navigation and scripts, find the right block of text, then ask a model to return fields in the shape your code expects.

This guide gives you the manual method first, because it costs nothing and you should know how it works. Then it shows the shortcut.

The manual method (free)

  1. Open the page and read the target fields by hand. Write down the exact fields you need, with their types: title: string, price: number, published: date, key_points: string[]. Without a schema, the output will drift from one run to the next.
  2. Get the clean text. In a browser, use reader view or select the main article. From a script, fetch the URL and remove script, style and nav elements before reading the text. For PDFs, use a PDF text extractor.
  3. Check the source. Keep the URL and the access date. An extracted value without its source cannot be audited later.
  4. Validate the output. Check that numbers are numbers, dates parse, and each value appears in the source text. If a value is not in the text, return null rather than guessing.
  5. Repeat for each page. This works for a few pages. It becomes fragile at scale because every site has its own layout.

The one-call method

Tolca's extract-url endpoint does steps 2 to 4 in one request. You send a public URL and the fields you want; it returns JSON matching your schema, plus the page title and the source URL.

Example request body:

{
  "url": "https://example.com/blog/post",
  "schema": {
    "title": "string",
    "author": "string",
    "key_points": "string[]"
  }
}

The same capability is available through the MCP endpoint https://tolca.tonbot.ca/mcp/public if your agent framework already speaks MCP.

When to use the manual method instead

Checklist before you ship an extraction step

Tolca's extraction is one tool among others; the manual method above works with any provider, and it is the baseline to test against.

Try it: Business Verification on the Apify Store ($0.05 per company, card payment) · for AI agents: POST https://tolca.tonbot.ca/v1/verify-business (x402, USDC on Base) · free in Claude or ChatGPT through MCP: https://tolca.tonbot.ca/mcp/public