@builtwith/sdk
v1.4.4
Published
BuiltWith AI-first SDK for Node.js
Maintainers
Readme
BuiltWith AI First SDK
Official SDK for the BuiltWith MCP API. Available for Node.js and .NET.
API Key
Get your API key at https://api.builtwith.com.
Set it as an environment variable:
export BUILTWITH_API_KEY=your-key-hereNode.js
Requirements
- Node.js >= 22.0.0
Installation
npm install @builtwith/sdkQuick Start
const { BuiltWithClient } = require('@builtwith/sdk');
const client = new BuiltWithClient(process.env.BUILTWITH_API_KEY);
const result = await client.domain_lookup_live({ domain: 'spotify.com' });
if (result.ok) {
console.log(result.data);
} else {
console.log(result.error);
}Available Methods
| Method | Parameter | Description |
|---|---|---|
| domain_lookup_live({ domain }) | Root domain | Live technology lookup |
| domain_lookup({ lookup }) | Root domain | Full domain API data |
| change({ lookup, since? }) | Root domain or domain array | Technology additions/removals since a date |
| lists({ tech, otherTechs?, filters? }) | Technology name | Sites using a technology; supports numeric filters such as REVENUE, SPEND, and EMPLOYEES |
| relationships({ lookup }) | Root domain | Related websites |
| free_summary({ lookup }) | Root domain | Free category/group counts |
| company_to_url({ company }) | Company name | Domains from a company name |
| tags_lookup({ lookup }) | IP or attribute | Related domains from IP or attributes |
| recommendations({ lookup }) | Root domain | Technology recommendations |
| redirects({ lookup }) | Root domain | Live and historical redirects |
| keywords({ lookup }) | Root domain | Keyword data |
| trends({ tech }) | Technology name | Technology trend data |
| product_search({ query }) | Search query | Ecommerce product search |
| trust({ lookup }) | Root domain | Trust scoring |
| financial({ lookup }) | Root domain | Financial data |
| social({ lookup }) | Root domain | Social profile related domains |
| vector_search({ query, limit? }) | Search query | Semantic technology/category search |
| payment_discovery() | — | Agent Payment API: credit balance |
| payment_configuration() | — | Agent Payment API: spending limits |
| payment_purchase({ credits }) | Integer ≥ 2000 | Agent Payment API: purchase credits |
| BuiltWithClient.agent_auth_start() | — | Start Device-Code Authorization (static, no key required) |
| BuiltWithClient.agent_auth_token(device_code) | Device code string | Poll for auth result and access token (static, no key required) |
Response Format
Every method returns:
{
ok: true | false,
data: { ... }, // parsed result (null on error)
raw: { ... }, // raw JSON-RPC response
error: { ... }, // error details (null on success)
meta: { request_id, tool, cached }
}Running Examples
cd node
BUILTWITH_API_KEY=your-key npm run example.NET (C#)
Requirements
- .NET 8.0 or .NET Framework 4.8
Quick Start
using BuiltWith.Sdk;
var apiKey = Environment.GetEnvironmentVariable("BUILTWITH_API_KEY");
using var client = new BuiltWithClient(apiKey);
var result = await client.domain_lookup_live("spotify.com");
if (result.Ok)
Console.WriteLine(result.Data);
else
Console.WriteLine(result.Error.Message);Available Methods
All methods accept a CancellationToken as an optional last parameter.
| Method | Parameter | Description |
|---|---|---|
| domain_lookup_live(domain) | string | Live technology lookup |
| domain_lookup(lookup) | string | Full domain API data |
| lists(tech, otherTechs?, offset?, country?, since?, filters?) | string | Sites using a technology; supports numeric filters such as REVENUE, SPEND, and EMPLOYEES |
| relationships(lookup) | string | Related websites |
| free_summary(lookup) | string | Free category/group counts |
| company_to_url(company) | string | Domains from a company name |
| tags_lookup(lookup) | string | Related domains from IP or attributes |
| recommendations(lookup) | string | Technology recommendations |
| redirects(lookup) | string | Live and historical redirects |
| keywords(lookup) | string | Keyword data |
| trends(tech) | string | Technology trend data |
| product_search(query) | string | Ecommerce product search |
| trust(lookup) | string | Trust scoring |
| financial(lookup) | string | Financial data |
| social(lookup) | string | Social profile related domains |
| vector_search(query, limit?) | string, int? | Semantic technology/category search |
| payment_discovery() | — | Agent Payment API: credit balance |
| payment_configuration() | — | Agent Payment API: spending limits |
| payment_purchase(credits) | int ≥ 2000 | Agent Payment API: purchase credits |
| BuiltWithClient.agent_auth_start() | — | Start Device-Code Authorization (static, no key required) |
| BuiltWithClient.agent_auth_token(deviceCode) | string | Poll for auth result and access token (static, no key required) |
Response Format
Every method returns an SdkResult:
result.Ok // bool
result.Data // object - parsed result
result.Raw // object - raw JSON-RPC response
result.Error // SdkError - error details (null on success)
result.Meta // SdkMeta - request_id, tool, cachedRunning Examples
cd csharp/Examples
BUILTWITH_API_KEY=your-key dotnet runAgent Device-Code Authorization
Agents can obtain a temporary bw- prefixed API token without the user pasting their key. These are static methods — no API key or client instance required.
// Node.js
const { BuiltWithClient } = require('@builtwith/sdk');
// Step 1: start the flow
const start = await BuiltWithClient.agent_auth_start();
// start.data => { device_code, verification_uri }
console.log(`Open in browser: ${start.data.verification_uri}`);
// Step 2: poll every 5 seconds
const token = await BuiltWithClient.agent_auth_token(start.data.device_code);
// token.data => { status: 'pending' | 'approved' | 'denied', access_token? }
if (token.data.status === 'approved') {
const client = new BuiltWithClient(token.data.access_token);
// use client normally
}// C#
var start = await BuiltWithClient.agent_auth_start();
// start.Data => { device_code, verification_uri }
var token = await BuiltWithClient.agent_auth_token(deviceCode);
// token.Data => { status, access_token }Agent Payment API
The payment methods let AI agents check credit balances, view spending configuration, and purchase credits. They route through the standard MCP endpoint using your existing API key. Configure billing at payments.builtwith.com/agent-payment-api-config.
// Node.js
const result = await client.payment_discovery();
// result.data => { credits_total, credits_used, credits_available }// C#
var result = await client.payment_discovery();Prompt Helpers
Both SDKs include prompt helper methods for use with AI agents:
prompt_analyze_tech_stack(domain)prompt_find_related_websites(domain)prompt_get_technology_recommendations(domain)prompt_research_company(company)prompt_check_domain_trust(domain)
These return structured prompt objects for MCP-compatible AI workflows.
License
MIT
