1. SDK
Dataify
English
  • 中文
  • English
  • Introduction
    • Overview
    • Support
  • Data Services
    • Getting Started Guide
    • MCP Setup Guide
    • Dataify cloud delivery tutorial
    • Web Scraper API
      • Introduction
      • Quick Start Guide
      • Send Your First Request
      • API Request Builder
      • Request Parameter Reference
        • Amazon Parameters
        • EBay Parameters
        • Walmart Parameters
    • Video Scraper API
      • Introduction
      • Quick Start Guide
      • Send Your First Request
      • API Request Builder
      • Request Parameter
    • SERP API
      • Overview
      • Quick Start Guide
      • Send your first request
      • Billing Information
      • FAQ
      • Status Code
      • Request Parameter Reference
        • Google
          • Google Search
          • Google Light
          • Google AI Mode
          • Google Map
          • Google Scholar
          • Google News
          • Google Lens
          • Google Jobs
          • Google Videos
          • Google Local
          • Google Trends
          • Google finance
          • Google Flight
          • Google Hotel
          • Google Images
          • Google Patent
          • Google Shopping
          • Google Play
        • Bing
          • Bing Search
          • Bing Map
          • Bing News
          • Bing Videos
          • Bing Images
          • Bing Shopping
        • DuckDuckGo
          • DuckDuckGo
        • Yandex
          • Yandex
      • Response Field Reference
        • Google
          • Google Search
          • Google AI Mode
          • Google Images
          • Google Shopping
          • Google videos
          • Google news
          • Google Map
          • Google Lens
          • Google Flight
          • Google Scholar
          • Google Hotel
          • Google Jobs
          • Google Trends
          • Google Local
          • Google Play
          • Google Finance
        • Bing
          • Bing search
          • Bing Map
          • Bing Shopping
          • Bing Video
          • Bing Images
          • Bing News
        • Yandex
          • Yandex
    • Web API
      • Overview
      • Quick Start
      • Billing Information
      • Send Your First Request
        • Search API
        • Extract API
        • Map API
      • Parameter Reference
        • Search API
        • Export API
        • Map API
        • Response code
    • Web Unlocker API
      • Overview
      • Quick Start
      • Send Your First Request
      • Parameter Reference
      • Billing Information
      • Response code
    • FAQ
      • Frequently Asked Questions
  • Network Infrastructure
    • Dynamic Network Services
      • Dynamic Residential Network
        • Introduction
        • Quick Start
          • Account and Password Authentication
          • Whitelist
          • List of countries/regions
      • High bandwidth network
        • Introduction
        • Quick Start
          • Account Verification
          • Whitelist
    • Static Network Services
      • Static ISP Network
        • Introduction
        • Quick Start
      • Static Data Center
        • Introduction
        • Quick Start
  • Public API
    • Overview
    • Get Token
    • Account
      • Query Credit Balance
      • Query Traffic Balance
      • Query Traffic Usage Records
    • Geolocation
      • Get Country Lists
      • Get State Lists
      • Get City Lists
      • Get ASN Lists
    • Network Service Users
      • Update user information
      • Delete user
      • Daily Traffic Usage Records
      • Hourly Traffic Usage Records
    • Whitelist
      • Query whitelist list
      • Add to Whitelist
      • Remove from Whitelist
    • ISP / Datacenter Proxies
      • Get a list of network nodes
      • Query network nodes expired
    • Dynamic High Bandwidth
      • Get a list of dynamic high-bandwidth servers
      • Restart dynamic high-bandwidth server
      • Renewal for Dynamic High-Bandwidth Servers
      • Dynamic High-Bandwidth Upgrade
      • Whitelist for High-Bandwidth Server Sub-accounts
      • Add sub-accounts to the high-bandwidth server whitelist
      • Remove the sub-account from the high-bandwidth server whitelist.
    • Web Scraper API
      • Usage Statistics
      • Task API
        • Create Task Instructions
        • Task Execution Status Description
        • Task List Retrieval Instructions
        • Task Download Instructions
        • Get Latest Task Instructions
    • SERP API
      • Interface Information
      • Task API
        • Google search API
        • Bing Search API
        • Duckduckgo search API
        • Yandex search API
    • Web API
      • Search API
      • Extract API
      • Map API
    • Web Unlocker API
      • Get Task Interface API
      • Using the statistics API
  • Integrations
    • AdsPower
    • BitBrowser
    • ClonBrowser
    • Hubstudio
    • Puppeteer
    • Playwright
    • Selenium
    • Chrome
  • FAQ
    • Payment Issues
    • Data Services
    • Network Infrastructure
  • SDK
    • Go SDK Guide
    • JavaScript SDK Guide
    • Python SDK Guide
    • TypeScript SDK Guide
  • CLI
    • Overview
    • Installation
    • Commands
    • Usage Examples
    • FAQ
  • MCP Server
    • Overview
    • Tools
    • Usage Examples
    • Output Format
    • FAQ
    • Agent Setup
      • Codex
      • Claude Code
      • Claude Desktop
      • Cursor
      • VS Code / GitHub Copilot
      • Windsurf / Devin Local
      • Cline
      • Google Antigravity
      • Gemini CLI
      • OpenClaw
      • CodeBuddy
      • WorkBuddy
      • Alibaba Qoder / Qoder CN
      • Alibaba Qwen Code
      • Moonshot AI Kimi Code
      • ByteDance Trae
      • ByteDance Coze
    • Remote Mode
      • Quick Start
      • Advanced
  • SKILLS
    • Guide
    • Agent Setup
      • WorkBuddy
  1. SDK

TypeScript SDK Guide

This guide shows you how to install the Dataify TypeScript SDK and use all of its features: SERP search engines (Google, Bing, Yandex, DuckDuckGo, Google Images / News / Maps, and more), platform-specific scrapers (Amazon, LinkedIn, Instagram, TikTok, YouTube, Reddit, Twitter, Airbnb, Booking, Crunchbase, eBay, Facebook, GitHub, Glassdoor, Indeed, Walmart, Zillow, Google Maps, and more), Web Unlocker, and Web API search, content extraction, and site mapping.

Installation and Configuration#

Configuration#

You need a Dataify API token, which you can get from the Dataify console.
Option 1: Environment variable (recommended)
Option 2: Initialize directly
import { DataifyClient } from "dataify-sdk";

// Initialize the client with apiKey (you can also use the DATAIFY_API_KEY environment variable)
const client = new DataifyClient({
  apiKey: "your_api_key_here",
});
DataifyClient constructor parameters (DataifyClientOptions):
ParameterDescriptionDefault
apiKeyDataify API tokenRequired
scraperBaseUrlScraper / SERP base URLhttps://scraperapi.dataify.com
webUnlockerBaseUrlWeb Unlocker base URLhttps://webunlocker.dataify.com
timeoutMsRequest timeout (milliseconds)Built-in default
fetchImplCustom fetch implementationGlobal fetch

Basic Usage#

Every call returns a Promise; consume it with await:
import { DataifyClient } from "dataify-sdk";

// Read the token from the environment (recommended in production)
const client = new DataifyClient({
  apiKey: process.env.DATAIFY_API_KEY!,
});

async function main() {
  // Every call returns a Promise; use await to get the result
  const result = await client.tools.google({ q: "Dataify", json: "1" });
  console.log(result);
}

// Top-level await is not available here, so catch errors on the promise
main().catch(console.error);

SERP Searches#

SERP methods live under client.tools and are named after the engine (for example google, bing, googleImages, googleNews). The sections below are grouped by engine.

Google Search#

// q is the keyword; json:"1" makes the upstream return JSON instead of HTML
const result = await client.tools.google({
  q: "best shoes of 2025",
  json: "1",
});
console.log(result);

Google Images#

const result = await client.tools.googleImages({
  q: "noise cancelling headphones",
});
console.log(result);

Google News / Trends / Maps#

const news = await client.tools.googleNews({ q: "AI latest" });
const trends = await client.tools.googleTrends({ q: "fashion" });
const maps = await client.tools.googleMaps({ q: "coffee shop near me" });

Bing Search#

const result = await client.tools.bing({ q: "python tutorial" });
console.log(result);
For the full list of SERP methods, see client.tools.specs.

Platform Scrapers#

Scraper tools also live under client.tools, with lowerCamelCase method names (for example amazonProductByAsin, linkedinCompanyInformationByUrl). The sections below are grouped by platform.

Amazon#

// Scrape a product by ASIN
const product = await client.tools.amazonProductByAsin({
  asin: "B0BZYCJK89",
});
console.log(product);

// Scrape comments by product URL
const comments = await client.tools.amazonCommentByUrl({
  url: "https://www.amazon.com/dp/B0BZYCJK89",
});

LinkedIn#

// Scrape company information by company URL
const company = await client.tools.linkedinCompanyInformationByUrl({
  url: "https://www.linkedin.com/company/example",
});

// Scrape job listings by keyword
const jobs = await client.tools.linkedinJobListingsInformationByKeyword({
  keyword: "data engineer",
  location: "Remote",
});

Instagram / YouTube / Walmart#

const profile = await client.tools.insProfilesByUsername({ username: "nasa" });
const video = await client.tools.youtubeProductById({ videoId: "dQw4w9WgXcQ" });
const item = await client.tools.walmartProductByUrl({ url: "https://www.walmart.com/ip/..." });
For every tool name (and its parameters), see client.tools.specs, or hover over client.tools in your IDE to see the full list and type hints.

Web Unlocker#

// Unlock and scrape any web page
const result = await client.webUnlocker.request({
  url: "https://example.com",
  type: "html",
  js_render: false, // whether to render JavaScript
});
console.log(result);

Web API (Search / Extract / Map)#

The Web API provides synchronous search, content extraction, and site discovery. Call it through client.aiWeb.
MethodUpstream endpointDescription
client.aiWeb.search(params)POST /searchSearch news, shopping, or academic results, with optional content extraction
client.aiWeb.extract(params)POST /extractExtract Markdown, HTML, or links
client.aiWeb.map(params)POST /mapDiscover the URLs, titles, and descriptions of a site's pages

Search#

import { AI_WEB_UNIQUE_IDS, DataifyClient } from "dataify-sdk";

const client = new DataifyClient({
  apiKey: process.env.DATAIFY_API_KEY,
  aiWebBaseUrl: process.env.AI_WEB_API_BASE_URL,
});

const result = await client.aiWeb.search({
  unique_id: AI_WEB_UNIQUE_IDS.searchNews,
  query: "OpenAI",
  source: "news",
  max_results: 5,
  time_range: "week",
});
console.log(result.request_id, result.outputs);

Extract#

const extracted = await client.aiWeb.extract({
  unique_id: AI_WEB_UNIQUE_IDS.extract,
  url: "https://example.com/article",
  formats: ["markdown", "links"],
  only_main_content: true,
  timeout_ms: 60_000,
});

Map#

const pages = await client.aiWeb.map({
  unique_id: AI_WEB_UNIQUE_IDS.map,
  url: "https://docs.example.com",
  country: "US",
  domain_filter: "all",
  limit: 100,
  sitemap: "include",
});

Output and Request ID#

The X-Request-Id response header is exposed as result.request_id.
An empty or null outputs value is normalized to [].
Arrays stay arrays; a single object is wrapped as a one-element array.
Use client.aiWeb.executeRaw(...) when you need to keep the raw upstream structure.

Downloading Scrape Results#

// Download the JSON result by task ID
const json = await client.scraper.downloadTaskResult("task_id_here");
console.log(json);

// Download as a file (format: xlsx / csv / json)
const response = await client.scraper.downloadTaskFile("task_id_here", "csv");
console.log(response.status);

Runtime Endpoints and Authentication#

CapabilityEndpoint
Scraper / SERPhttps://scraperapi.dataify.com
Web Unlockerhttps://webunlocker.dataify.com
Every request carries Authorization: Bearer <apiKey>.

Security Notes#

Do not use this SDK directly in browser frontend code, or your API token will be exposed.
Recommended architecture: frontend → your backend → dataify-sdk → Dataify APIs.

Type Hints and Editor Support (IntelliSense)#

Every method parameter, ParamRecord, and return value is fully typed. In VS Code or WebStorm, hover over client.tools.amazonProductByAsin and similar symbols to see the parameters and documentation.
At runtime, client.tools.specs lets you introspect every tool's metadata (including params / required / id).

Error Handling#

Every method returns a Promise; catch errors with try/catch. The error object (network or upstream error) carries status and body fields:
try {
  const r = await client.tools.google({ q: "Dataify", json: "1" });
  console.log(r);
} catch (e: any) {
  // The error object carries status (HTTP status code) and body (response body)
  console.error("HTTP", e?.status, "body:", e?.body ?? e?.message);
}

Complete Example#

import { DataifyClient } from "dataify-sdk";

// 1) Initialize the client with the token from the environment
const client = new DataifyClient({
  apiKey: process.env.DATAIFY_API_KEY!,
});

async function main() {
  // 2) SERP: Google Search
  const result = await client.tools.google({
    q: "Dataify",
    json: "1",
  });
  console.log(result);

  // 3) Platform scraper: Amazon product by ASIN
  const product = await client.tools.amazonProductByAsin({
    asin: "B0BZYCJK89",
  });
  console.log(product);
}

main().catch(console.error);

Resources#

ResourceDescriptionLink
📘 GitHub repositoryBrowse the source, try the examples, and contributeGitHub
📦 npm pagePackage listing and release historydataify-sdk
修改于 2026-11-19 03:34:16
上一页
Python SDK Guide
下一页
Overview
Built with