Expand AI logo
DocsDocs
Login

Documentation

Introduction

WelcomeQuickstartConcepts

Product

FetchMCPCLI

SDKs

SDKsTypeScript SDKPython SDK

SDKs

SDKs

Official client libraries for expand.ai

expand.ai provides official SDKs for TypeScript and Python, enabling you to integrate web scraping capabilities directly into your applications with type safety and a clean API.

Available SDKs

TypeScript

Full-featured SDK with type-safe schemas and streaming support

Python

Pythonic interface for web content extraction

Quick Comparison

FeatureTypeScriptPython
Packageexpandaiexpandai
Fetch API✓✓
Markdown extraction✓✓
HTML extraction

Quick Example

import Expand from 'expandai'

const client = new Expand({
  apiKey: '{{API_KEY}}'
})

const result = await client.fetch({
  url: 'https://example.com',
  select: {
    markdown: true
  }
})

console.log(result.data.markdown)











Getting Started

Choose your preferred language to get started:

  • TypeScript SDK - Install via npm/pnpm/bun
  • Python SDK - Install via pip/uv/poetry
PreviousCLI
NextTypeScript SDK

On This Page

Available SDKsQuick ComparisonQuick ExampleGetting Started
✓
✓
JSON extraction✓✓
Sitemap streaming✓✓
Type-safe schemas✓—
from expandai import Expand
client = Expand(api_key="{{API_KEY}}")
result = client.fetch(
url="https://example.com",
select={
"markdown": True
}
)
print(result.data.markdown)