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

JavaScript SDK Guide

This guide shows you how to use the Dataify SDK in plain JavaScript (Node.js). The Dataify TypeScript SDK is published as compiled ESM JavaScript (dist/index.js), so the same package works both in TypeScript and directly in JavaScript — the API is identical; the only difference is that JavaScript gets no type annotations. The SDK also provides Web API search, content extraction, and site discovery.

Relationship to the TypeScript SDK#

JavaScript and TypeScript use the same npm package, dataify-sdk: TypeScript consumes its type definitions (.d.ts), JavaScript consumes the compiled runtime code.
The package is declared as "type": "module" (ESM-only) and ships no CommonJS build. Make sure you import it as ESM:
Option A: use the .mjs file extension (recommended, simplest);
Option B: set "type": "module" in your project's package.json;
Option C (CommonJS projects): use a dynamic import().
⚠️ Calling require("dataify-sdk") from CommonJS (.cjs, or no "type":"module") throws ERR_REQUIRE_ESM. Use the CommonJS pattern described below instead.

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
DataifyClient constructor parameters: apiKey (required), scraperBaseUrl, webUnlockerBaseUrl, timeoutMs, fetchImpl.

Basic Usage (ESM, .mjs)#

Every call returns a Promise; consume it with await:
Run it with node demo.mjs.

SERP Searches#

SERP methods live under client.tools and are named after the engine. The sections below are grouped by engine.

Google Search#

Google Images#

Google News / Trends / Maps#

Bing Search#

For the full list of SERP methods, see client.tools.specs.

Platform Scrapers#

Scraper tools live under client.tools, with lowerCamelCase method names. The sections below are grouped by platform.

Amazon#

LinkedIn#

Instagram / YouTube / Walmart#

For the full list of tool names, see client.tools.specs.

Web Unlocker#

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#

Extract#

Map#

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#

CommonJS Projects#

If your project is CommonJS and cannot use top-level import, use a dynamic import():
Run it with node demo.cjs.

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.

Editor Support and Introspection#

JavaScript has no compile-time types, but you still get hints in TypeScript-aware editors from the .d.ts files in the same package. At runtime, client.tools.specs lets you introspect every tool's metadata (including params / required / id).
For every method name and parameter, see client.tools.specs.

Error Handling#

Every method returns a Promise; catch errors with try/catch:

Complete Example (.mjs)#

Resources#

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