Installation
Get started with ShopGraph in under 2 minutes. Choose your integration method below.
npm Package
Terminal
$ npm install shopgraph
usage.ts
import { ShopGraph } from 'shopgraph';
const sg = new ShopGraph({ apiKey: 'sg_live_...' });
const result = await sg.enrich('https://www.allbirds.com/products/mens-tree-runners', {
strict_confidence_threshold: 0.8,
});
console.log(result.product.title);
// "Men's Tree Runners"
console.log(result._shopgraph.confidence_score);
// 0.93
MCP Server Configuration
Connect ShopGraph to any MCP-compatible client (Claude, Cursor, CrewAI, etc.).
Remote (recommended)
MCP client config
{
"mcpServers": {
"shopgraph": {
"type": "url",
"url": "https://shopgraph.dev/mcp"
}
}
}
Local (self-hosted)
MCP client config
{
"mcpServers": {
"shopgraph": {
"command": "npx",
"args": ["-y", "shopgraph", "serve"],
"env": {
"SHOPGRAPH_API_KEY": "sg_live_..."
}
}
}
}
API Key Setup
- Free tier — 500 calls/month, no signup required. Just call the API.
- Authenticated tier — Sign up at the pricing page to get an API key (
sg_live_...). - Pass the key via the
Authorizationheader:
Authorization header
Authorization: Bearer sg_live_abc123def456
REST API Quick Start
Extract product data from any URL with a single curl command:
Terminal
$ curl -X POST https://shopgraph.dev/api/enrich/basic \
-H "Content-Type: application/json" \
-d '{"url": "https://www.allbirds.com/products/mens-tree-runners"}'
Response
{
"product": {
"title": "Men's Tree Runners",
"price": 98,
"currency": "USD",
"brand": "Allbirds",
"availability": "InStock",
"image": "https://cdn.allbirds.com/image/...",
"description": "Lightweight, breathable sneakers..."
},
"_shopgraph": {
"extraction_method": "schema_org",
"confidence_score": 0.93,
"field_confidence": {
"title": 0.98,
"price": 0.97,
"currency": 0.95,
"brand": 0.94,
"availability": 0.91,
"image": 0.93,
"description": 0.88
}
}
}
Next steps: Read about confidence scoring to understand field-level quality, or see the full REST API reference.