---
title: SDKs, CLI & MCP
description: Install and first-request snippets for the official Node, Python, Go, CLI, and MCP integrations. Each wraps auth, retries, rate limits, and typed responses.
order: 30
---

# SDKs, CLI & MCP

We publish official SDKs for the languages most customers use, plus a CLI and an MCP server. Each wraps the HTTP API with typed helpers, built-in retry/backoff on 408/429/5xx, and a token-bucket rate limiter that respects your plan's ceiling. Pick the one that matches your stack and skip the raw `fetch` code.

| Surface | Package | Install |
|---|---|---|
| Node.js / TypeScript | [`chocodata`](https://www.npmjs.com/package/chocodata) | `npm install chocodata` |
| Python | [`chocodata`](https://pypi.org/project/chocodata/) | `pip install chocodata` |
| Go | [`github.com/Chocodata-com/chocodata-go`](https://pkg.go.dev/github.com/Chocodata-com/chocodata-go) | `go get github.com/Chocodata-com/chocodata-go` |
| CLI (any language) | [`chocodata-cli`](https://www.npmjs.com/package/chocodata-cli) | `npm install -g chocodata-cli` |
| MCP server (AI agents) | [`chocodata-mcp`](https://www.npmjs.com/package/chocodata-mcp) | `npx chocodata-mcp` |

## Node / TypeScript

```bash
npm install chocodata
```

```typescript
import { Chocodata } from "chocodata";

const chocodata = new Chocodata("cd_live_YOUR_KEY");

const product = await chocodata.product({
  site: "walmart",
  query: "5085206428",
});

console.log(product.title, product.price);
```

Typed responses, auto-pagination on Search, webhook-signature verification on Batch. Works in Node 18+ and any ESM/CJS setup. See the [npm README](https://www.npmjs.com/package/chocodata) for the full reference.

## Python

```bash
pip install chocodata
```

```python
from chocodata import Chocodata

chocodata = Chocodata(api_key="cd_live_YOUR_KEY")

product = chocodata.product(site="walmart", query="5085206428")
print(product["title"], product["price"])
```

Works on Python 3.9+. Sync and async variants ship side by side (`chocodata.product` vs `await chocodata.product_async`). Type hints via `TypedDict`.

## Go

```bash
go get github.com/Chocodata-com/chocodata-go
```

```go
package main

import (
    "context"
    "fmt"
    "log"

    chocodata "github.com/Chocodata-com/chocodata-go"
)

func main() {
    client := chocodata.New("cd_live_YOUR_KEY")
    data, err := client.Product(context.Background(), chocodata.ProductParams{
        Site:  "walmart",
        Query: "5085206428",
    })
    if err != nil {
        log.Fatal(err)
    }
    fmt.Println(data.Title, data.Price)
}
```

Context-aware cancellation, idiomatic Go error wrapping, zero external deps beyond `net/http`.

## CLI

The CLI is handy for quick one-off scrapes from a terminal or shell script.

```bash
npm install -g chocodata-cli
chocodata login cd_live_YOUR_KEY     # stored in ~/.chocodata/config

# Single product
chocodata walmart product --query 5085206428

# Search
chocodata google search --query "laptop" --pages 2

# Pipe a list of IDs from a file
cat ids.txt | chocodata walmart product --json-per-line > out.ndjson
```

The CLI outputs JSON by default, or NDJSON (one row per line) with `--json-per-line` - easy to pipe into `jq`, `awk`, or a warehouse loader.

## MCP server (Claude, Cursor, and other agents)

The MCP server exposes Chocodata as tools that an AI agent can call directly, so a coding agent or chat client can scrape the web without you writing glue code. It runs over stdio and works with any MCP-compatible client (Claude Desktop, Cursor, Windsurf, and others).

Add it to your client's MCP config:

```json
{
  "mcpServers": {
    "chocodata": {
      "command": "npx",
      "args": ["-y", "chocodata-mcp"],
      "env": { "CHOCODATA_API_KEY": "cd_live_YOUR_KEY" }
    }
  }
}
```

The agent then has tools for the dedicated endpoints and the [Universal Web Scraper API](/docs/endpoints/universal): point it at a site and resource, or hand it a URL, and it returns structured JSON. Pricing and the only-2xx billing rule are identical to the HTTP API.

## Raw HTTP (no SDK)

For stacks we don't publish an SDK for yet (Java, Ruby, PHP, C#), the API is a plain `GET` with your key in the `?api_key=` query parameter. Every endpoint page has a `cURL` snippet you can port. Examples:

- [Product endpoint](/docs/endpoints/product)
- [Search endpoint](/docs/endpoints/search)
- [Universal Web Scraper API](/docs/endpoints/universal)
- [Async Batch endpoint](/docs/endpoints/batch)

## What the SDKs do that raw HTTP doesn't

- **Exponential backoff with jitter** on 408 / 429 / 5xx.
- **Client-side rate limiter** so you don't have to think about your plan's ceiling.
- **Webhook-signature verification** (Batch endpoint) in one line.
- **Typed response shapes** - autocomplete every product field in your editor.
- **Sensible defaults** - `Accept-Encoding: gzip`, `User-Agent` identifying the SDK + version, a 30s request timeout you can override per call.

If you ever find the SDK doing something unexpected, pass `debug: true` at construction and you'll get every HTTP call printed to stderr with timings.

## Related

- [Authentication](/docs/guides/authentication) - API key format and rotation
- [Rate limits & concurrency](/docs/guides/rate-limits) - what the built-in limiter is protecting you from
- [Error codes](/docs/guides/errors) - what the SDK's retry policy is reacting to
