Interfaze

logo

Beta

pricing

docs

blog

sign in

Get Started

Introduction

Examples

Vision

Concepts

Resources

Projects

Integrations

API Reference

Web Scraping

copy markdown

AI web scraping that self-heals with built in residential proxies and browser infrastructure to scrape any site at scale.

  • Built in residential proxies that automatically rotates when needed and handle bot blocks
  • AI human behavior simulation and interactions with the site
  • Automatically scale up or down browser infrastructure based on usage with no concurrency limits

Scrape social media sites

OpenAI SDK

Vercel AI SDK

LangChain SDK

import { z } from "zod";
import { zodResponseFormat } from "openai/helpers/zod";

const LinkedInProfileSchema = z.object({
	first_name: z.string(),
	last_name: z.string(),
	location: z.string(),
	latest_education: z.string(),
	current_job: z.string(),
	followers: z.number(),
});

const response = await interfaze.chat.completions.create({
	model: "interfaze-beta",
	messages: [
		{
			role: "user",
			content: "Extract information from https://www.linkedin.com/in/yoeven/",
		},
	],
	response_format: zodResponseFormat(LinkedInProfileSchema, "linkedin_profile_schema"),
});

console.log(response.choices[0].message.content);

//@ts-expect-error precontext is not typed
const precontext = response.precontext;
console.log("Web Scrape Results:", precontext?.[0]?.result);

JSON output

Scrape ecommerce sites

OpenAI SDK

Vercel AI SDK

LangChain SDK

import { z } from "zod";
import { zodResponseFormat } from "openai/helpers/zod";

const ProductSchema = z.object({
	price: z.number(),
	listing_name: z.string(),
});

const response = await interfaze.chat.completions.create({
	model: "interfaze-beta",
	messages: [
		{
			role: "user",
			content:
				"Extract the information from https://www.amazon.com/Nintendo-SwitchTM-Neon-Blue-Joy%25E2%2580%2591ConTM-Switch/dp/B0BFJWCYTL?sr=8-2",
		},
	],
	response_format: zodResponseFormat(ProductSchema, "product_schema"),
});

console.log(response.choices[0].message.content);

//@ts-expect-error precontext is not typed
const precontext = response.precontext;
console.log("Web Scrape Results:", precontext?.[0]?.result);

JSON output

Web scrape raw outputs

Running Web scrape as a tasks with <task>scraper</task> in the system message make it faster and cheaper with a fixed structured output that's pre-defined.

Learn more about running a task.

OpenAI SDK

Vercel AI SDK

LangChain SDK

import { z } from "zod";
import { zodResponseFormat } from "openai/helpers/zod";

const response = await interfaze.chat.completions.create({
	model: "interfaze-beta",
	messages: [
		{ role: "system", content: "<task>scraper</task>" },
		{ role: "user", content: "Extract post titles and points from https://news.ycombinator.com" },
	],
	response_format: zodResponseFormat(z.any(), "scraper_schema"),
});

console.log(response.choices[0].message.content);

//@ts-expect-error precontext is not typed
const precontext = response.precontext;
console.log("Web Scrape Results:", precontext[0]?.result);

JSON output

Previous

Search

Next

Speech-to-Text (STT)