Scrape a page into JSON
Put a public URL in a chat prompt and get a JSON object back. Both Interfaze chat models take the same call.
The call is a chat completion. Put a public URL in the user message, send a JSON schema, and read the object on choices[0].message.content.
Models
Two listed models take this call. Both are Interfaze chat models. The vendor documents the fetch on Web scraping. Their SDK also returns the raw page extract on precontext, from a tool named web_extract. AnyRouter returns an OpenAI chat completion and does not include precontext.
| Model | Context | List price per 1M, in / out | Inputs |
|---|---|---|---|
interfaze/interfaze-1 | 1,000,000 | $1.50 / $3.50 | Text, image, audio, file, video |
interfaze/interfaze-1.1-lite | 131,072 | $0.85 / $1.50 | Text, image, audio, file |
List prices are Interfaze's published rates on 2026-11-22. Lite is the open-weight model. The samples below use interfaze/interfaze-1. Use interfaze/interfaze-1.1-lite in the same body when you want the smaller model.
No other listed model fetches a URL from the prompt into that JSON field. These models can search the web, which is a different request. openai/gpt-4o and openai/gpt-4o-mini list web_search_options. So do perplexity/sonar-pro-search, perplexity/sonar-reasoning-pro, perplexity/sonar-deep-research, and sakana/fugu-max. sakana/fugu, sakana/fugu-ultra, and sakana/sakana-namazu are marked web-search. qwen/qwen4-max documents web_extractor and web_fetch on QwenCloud's Responses and Anthropic tools, not on this chat body.
Before the call
- Create an Interfaze API key in the Interfaze dashboard.
- Add that key under Dashboard, BYOK, Interfaze. Interfaze bills that key. AnyRouter does not charge credits for the hop.
- Create an AnyRouter key (
sk-ar-v1-...) under Dashboard, Keys. The examples below use that key.
List price on 2026-11-22 is $1.50 per million input tokens and $3.50 per million output tokens for Interfaze 1. Interfaze 1.1 Lite is $0.85 and $1.50. Interfaze's published profile example reports 22,451 prompt tokens and 49,971 completion tokens. Check pricing before a large run. Use a URL you are allowed to fetch.
Extract fields from a public page
The schema asks for the title and a one-sentence summary of Interfaze's own scraping page.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://anyrouter.dev/api/v1",
api_key=os.environ["ANYROUTER_API_KEY"],
)
completion = client.chat.completions.create(
model="interfaze/interfaze-1",
messages=[
{
"role": "user",
"content": "Extract the title and a one-sentence summary from https://interfaze.ai/docs/web/web-scraping",
}
],
response_format={
"type": "json_schema",
"json_schema": {
"name": "page",
"schema": {
"type": "object",
"properties": {
"title": {"type": "string"},
"summary": {"type": "string"},
},
"required": ["title", "summary"],
"additionalProperties": False,
},
},
},
)
print(completion.choices[0].message.content)import OpenAI from "openai"
const client = new OpenAI({
baseURL: "https://anyrouter.dev/api/v1",
apiKey: process.env.ANYROUTER_API_KEY,
})
const completion = await client.chat.completions.create({
model: "interfaze/interfaze-1",
messages: [
{
role: "user",
content:
"Extract the title and a one-sentence summary from https://interfaze.ai/docs/web/web-scraping",
},
],
response_format: {
type: "json_schema",
json_schema: {
name: "page",
schema: {
type: "object",
properties: {
title: { type: "string" },
summary: { type: "string" },
},
required: ["title", "summary"],
additionalProperties: false,
},
},
},
})
console.log(completion.choices[0]?.message.content)import { createAnyRouter } from "@anyr/ai-sdk-provider"
import { generateText, Output } from "ai"
import { z } from "zod"
const anyrouter = createAnyRouter()
const { output } = await generateText({
model: anyrouter("interfaze/interfaze-1"),
output: Output.object({
schema: z.object({
title: z.string(),
summary: z.string(),
}),
}),
prompt:
"Extract the title and a one-sentence summary from https://interfaze.ai/docs/web/web-scraping",
})
console.log(output)MCP scrape tool
These connectors scrape or fetch pages. They are not chat model ids, and they do not use the call above.
| Connector | Server | What it does |
|---|---|---|
| Interfaze | https://api.interfaze.ai/mcp | scraper, plus search, OCR, transcription, translation, and forecast. Needs an Interfaze API key. |
| Firecrawl | https://mcp.firecrawl.dev/v2/mcp | Scrape, crawl, and search. Needs a Firecrawl API key. |
| Exa | https://mcp.exa.ai/mcp | Search and fetch page content. Connects without a key. |
Each one calls that vendor directly. None of them goes through interfaze/interfaze-1 or interfaze/interfaze-1.1-lite.
AnyRouter routes requests to third-party models. Models and outputs are provided as is, with no warranty; you use them at your own risk. Disclaimer