What it does
Takes raw HTML and returns clean structured JSON with the data you actually need — tables, links, email addresses, phone numbers, headings, meta tags, and images. Pass raw ScrapePay HTML output through StructExtract before giving it to an LLM. You'll get precise extracted fields instead of asking the LLM to parse markup.
When to use it
- Extract pricing tables from a competitor's website
- Pull all email addresses from a directory page
- Get the navigation link structure of a site for mapping
- Extract product metadata before indexing
Request schema
{
"html": "<html>...</html>",
"extract": [
"tables",
"emails",
"links"
]
} Response schema
{
"tables": [
{
"headers": [
"Name",
"Price"
],
"rows": [
[
"Item A",
"$9.99"
]
]
}
],
"emails": [
"contact@example.com"
],
"links": [
{
"text": "About",
"href": "https://example.com/about"
}
]
} Code example — TypeScript via MCP
Install the MCP server once; all 16 services become tool calls.
// Configure @melis-ai/x402-tools-mcp in your MCP client
// Then call the tool:
const result = await mcpClient.callTool("structextract", {
"html": "<html>...</html>",
"extract": [
"tables",
"emails",
"links"
]
});
console.log(result);
// ["tables","emails","links"]... → MCP setup guide Code example — Python via direct HTTP
import requests
# x402 payment header must be set by your wallet client
# See x402.org for client libraries
headers = {
"Content-Type": "application/json",
"x-payment": "<signed-x402-payment-header>",
}
resp = requests.post(
"https://structextract.melis.ai/extract",
json={
"html": "<html>...</html>",
"extract": [
"tables",
"emails",
"links"
]
},
headers=headers,
)
print(resp.json()) Code example — curl with internal key bypass
For testing with an issued internal key (skips x402 payment flow):
curl -X POST https://structextract.melis.ai/extract \
-H "Content-Type: application/json" \
-H "x-internal-key: YOUR_KEY" \
-d '{"html":"<html>...</html>","extract":["tables","emails","links"]}' How is this different from alternatives?
StructExtract vs UtilsForAgents
Similar structured extraction utility. StructExtract allows you to specify which fields to extract, reducing response size for agents that only need, say, emails from a contact page.
FAQ
Does it work without an account?
Yes. x402 is account-less. Your agent's wallet signs the payment and retries automatically. No registration, no API key, no subscription.
What happens on failure?
Returns HTTP 422 if HTML is empty or unparseable.
What is the rate limit?
None published.
Is this open-source?
The service code is closed-source for security reasons. The MCP wrapper that calls it is open-source and MIT-licensed: github.com/mizukaizen/x402-tools-mcp .
Who built this?
Part of the melis.ai agent infrastructure stack. Running on a dedicated Helsinki VPS since early 2026. Contact sean@melis.ai.