selldatatoai
v1.0.1
Published
Node.js client for the AI Data Value Score API from selldatatoai.com: score any company domain from 0 to 100 for the data AI buyers want, with grade, data systems, likely data assets and web history, from an index of 120 million domains.
Maintainers
Readme
selldatatoai
Node.js client for the AI Data Value Score API. Send a company domain, get back a score from 0 to 100 that says how much of the data AI buyers want that company likely holds.
The API is run by Sell Data to AI, and every answer comes from an index of 120 million domains, 99.99% of the active internet, with domain history going back decades.
npm install selldatatoai- Zero dependencies. Uses the built-in
httpsmodule. - Node 14 or newer. TypeScript types ship in the package.
- One class, six methods, one error type.
Contents
- What you get back
- Quick start
- Methods
- Scoring a list
- Errors
- Three working examples
- Plans and lookups
- Questions developers ask
- Links
What you get back
A single call returns one JSON object per company. These are the fields you will use most:
| Field | What it tells you |
|---|---|
| data_asset_score | 0 to 100. Higher means more valuable, sellable data is likely held. |
| grade | A to E, derived from the score. A is the top band. |
| status | active, winding_down_or_acquired, parked, unreachable or error. |
| verified_active | true when the domain resolves, has not expired and the site is a real site. |
| iab_category | The IAB content category (taxonomy v3) of the company website. |
| country | The company country in the index. |
| history | first_seen_year, years_online, founded_year, pre_ai_years. |
| pre_ai_archive_likely | true when the company was online 10 or more years before 2023. |
| data_systems | Systems of record the company runs, each with the data type it holds. |
| likely_data_assets | Data types the company likely holds, such as support tickets or code history. |
| strengths | Up to three factor groups where the company scores best. |
| data_coverage | full, partial or limited: how complete the data on this company is. |
| cached | true when the result was computed in the last 30 days and served again. |
The full field list, with a real example response, is in the AI Data Value Score API documentation.
The score is an estimate from public signals. It is a way to decide which companies to look at first, not a valuation and not an offer.
Quick start
Get a key from your dashboard once a plan is active, then put it in an environment variable. Never hard-code it.
const { DataAssetScoreClient } = require('selldatatoai');
const client = new DataAssetScoreClient(process.env.SDA_API_KEY);
(async () => {
const s = await client.score('example.com');
console.log(s.domain, s.data_asset_score, s.grade, s.status);
console.log('Systems:', s.data_systems.map((x) => `${x.system} (${x.data_type})`).join(', '));
console.log('Pre-AI years online:', s.history.pre_ai_years);
})();ES modules work the same way:
import pkg from 'selldatatoai';
const { DataAssetScoreClient } = pkg;TypeScript users get typed results:
import { DataAssetScoreClient, ScoreResult } from 'selldatatoai';
const client = new DataAssetScoreClient(process.env.SDA_API_KEY as string);
const s: ScoreResult = await client.score('https://www.example.com/about');
if (s.grade === 'A' && s.verified_active) {
// put it at the top of the outreach queue
}Full URLs are fine. The API reads the domain out of them.
Methods
| Method | HTTP call | Lookups used |
|---|---|---|
| score(domain) | GET /api/v1/score?domain= | 1 |
| submitBatch(domains) | POST /api/v1/score/batch | 1 per valid, unique domain |
| getBatch(id) | GET /api/v1/score/batch?id= | 0 |
| waitForBatch(id, { interval, maxWait }) | repeated getBatch | 0 |
| scoreMany(domains, { interval, maxWait, onBatch }) | submit and wait, 100 at a time | 1 per valid, unique domain |
| usage() | GET /api/v1/usage | 0 |
Constructor options:
new DataAssetScoreClient(key, {
baseUrl: 'https://www.selldatatoai.com/api/v1', // default
timeout: 60000, // milliseconds per request
});The client sends the key in the X-API-Key header on every request. Keys in query strings end up in logs, so the client never puts them there.
Scoring a list
Batches are the efficient path when you have more than a handful of domains.
- Up to 100 domains per call.
- Domains checked in the last 30 days come back at once.
- The rest are scored in the background, usually within a minute.
- Results keep the order you sent.
- Each item has a
status:done(withresult),pending,invalid_domainorerror. - Up to 3 open batches per key. Batches are kept for 7 days.
scoreMany does the chunking and polling for you:
const domains = require('fs').readFileSync('targets.txt', 'utf8')
.split('\n').map((l) => l.trim()).filter(Boolean);
const items = await client.scoreMany(domains, {
interval: 5000,
onBatch: (b) => console.error(`batch ${b.id} done, ${b.results.length} rows`),
});
const ranked = items
.filter((it) => it.status === 'done')
.map((it) => it.result)
.sort((a, b) => b.data_asset_score - a.data_asset_score);If you prefer to control polling yourself:
const sent = await client.submitBatch(['example-one.com', 'example-two.com']);
console.log('charged', sent.lookups_charged);
const done = sent.status === 'done' ? sent : await client.waitForBatch(sent.id);Reading the status field
The score and the status answer different questions. The score says how much data a company likely holds; the status says whether the company is still there to sign a deal.
active: the site is live and the company operates.winding_down_or_acquired: the company announced a closure or now belongs to another firm. Data may still exist, but the counterparty has changed.parked: the domain shows a parking page. Treat it as no company.unreachableanderror: the site did not answer. Retry after the 30-day window.
Filter on verified_active first when you build a contact list, then sort by score.
Errors
Every non-2xx answer becomes a SellDataToAIError with status (HTTP code), code (the API error string) and body.
| HTTP | code | Meaning | What to do |
|---|---|---|---|
| 400 | invalid_domain | The domain is not valid. | Skip the row, log it. |
| 400 | no_domains, too_many_domains | A batch needs 1 to 100 domains. | Fix the chunk size. |
| 401 | missing_api_key, invalid_api_key | No key, or the subscription is not active. | Check the key and plan. |
| 404 | batch_not_found | Unknown id for this key, or older than 7 days. | Resubmit. |
| 410 | not_available | Company lists are not served by the API. | Buy lists as files. |
| 429 | monthly_limit_reached | This month's lookups are used. | Wait for the 1st (UTC) or upgrade. |
| 429 | batch_busy | Three of your batches are still running. | Poll them, then retry. |
const { SellDataToAIError } = require('selldatatoai');
try {
await client.score('not a domain');
} catch (e) {
if (e instanceof SellDataToAIError && e.code === 'invalid_domain') {
console.warn('skipping bad row');
} else {
throw e;
}
}Timeouts surface as SellDataToAIError with status 0 and code timeout.
Three working examples
1. Express endpoint that enriches inbound leads
A broker running a partner sign-up form can score each company the moment it arrives.
const express = require('express');
const { DataAssetScoreClient, SellDataToAIError } = require('selldatatoai');
const app = express();
app.use(express.json());
const sda = new DataAssetScoreClient(process.env.SDA_API_KEY);
app.post('/partners', async (req, res) => {
const { company_website } = req.body;
try {
const s = await sda.score(company_website);
res.json({
accepted: s.verified_active && s.data_asset_score >= 60,
score: s.data_asset_score,
grade: s.grade,
holds: s.likely_data_assets.map((a) => a.label),
});
} catch (e) {
if (e instanceof SellDataToAIError && e.status === 400) return res.status(422).json({ error: 'bad website' });
res.status(502).json({ error: 'scoring unavailable' });
}
});
app.listen(3000);2. Nightly job that re-ranks a CRM export
Run from cron. It writes a CSV that sales can sort in a spreadsheet.
// node rank.js accounts.txt ranked.csv
const fs = require('fs');
const { DataAssetScoreClient } = require('selldatatoai');
const [, , input, output] = process.argv;
const client = new DataAssetScoreClient(process.env.SDA_API_KEY);
const domains = fs.readFileSync(input, 'utf8').split(/\r?\n/).filter(Boolean);
(async () => {
const before = await client.usage();
if (before.remaining < domains.length) throw new Error(`only ${before.remaining} lookups left`);
const items = await client.scoreMany(domains);
const rows = [['domain', 'score', 'grade', 'status', 'years_online', 'systems']];
for (const it of items) {
const r = it.result || {};
rows.push([it.input, r.data_asset_score ?? '', r.grade ?? '', it.status,
(r.history || {}).years_online ?? '', (r.data_systems || []).map((s) => s.system).join('; ')]);
}
fs.writeFileSync(output, rows.map((r) => r.map((v) => `"${String(v).replace(/"/g, '""')}"`).join(',')).join('\n'));
console.log(`wrote ${items.length} rows`);
})();15 2 * * * cd /opt/rank && SDA_API_KEY=xxxx node rank.js accounts.txt ranked.csv >> rank.log 2>&13. A small command-line checker
Save as sda.js and run node sda.js example.com example.org.
#!/usr/bin/env node
const { DataAssetScoreClient } = require('selldatatoai');
const client = new DataAssetScoreClient(process.env.SDA_API_KEY);
(async () => {
for (const d of process.argv.slice(2)) {
try {
const s = await client.score(d);
console.log(`${s.domain.padEnd(30)} ${String(s.data_asset_score).padStart(3)} ${s.grade} ${s.status}`);
} catch (e) {
console.log(`${d.padEnd(30)} error ${e.code || e.message}`);
}
}
const u = await client.usage();
console.log(`${u.remaining} lookups left this month`);
})();Why score companies before you contact them
AI labs pay for real operational records: support tickets, work tickets and internal wikis, code with history, call and meeting records, contracts. Most companies hold some of that. Few hold enough of it, in systems that can be exported, to make a deal worth the legal work.
A score per domain lets a broker or data company sort a long list by likely value before anyone writes an email. The guide on who buys company data for AI explains the buyer side of that equation.
Typical uses:
- Qualify inbound companies on a partner form, as in example 1.
- Rank a purchased or exported account list, as in example 2.
- Flag companies that are winding down, through the
statusfield. - Combine
data_systemswith your own records when you compare technographic data providers.
If you need data from the index on companies you do not know yet, look at the company data API page and the sector files described below.
Plans and lookups
There is no free plan and no trial. You can try the score by hand in the demo on the website, which allows 5 checks a day.
| Plan | Price | Lookups a month | |---|---|---| | Basic | $99 a month | 5,000 | | Pro | $299 a month | 25,000, plus batch scoring | | Scale | $799 a month | 100,000, plus batch scoring |
Details and the comparison table are on the API plans and pricing page. Limits reset on the first day of each month (UTC). usage() tells you where you stand at any time and does not use a lookup.
Company lists are a separate product. The API scores the domains you send and never returns lists. One-time files hold the top 3,000 companies of a US sector by score, from $199 a list, for example the US software companies list.
Questions developers ask
What is the AI Data Value Score?
The AI Data Value Score is a number from 0 to 100, published by selldatatoai.com, that estimates how much valuable, sellable data a company holds for AI buyers. It comes with a grade from A to E, the systems of record the company runs and the data types it likely holds.
How fresh are the results?
Each domain is scored again after 30 days. Inside that window you get the stored result and cached is true. A cached result still counts as one lookup.
Does a batch cost more than single calls?
No. A batch costs one lookup per valid, unique domain, charged when you submit. Duplicates and invalid rows are not charged. Polling is free.
Which Node versions are supported?
Node 14 and newer. The client uses only the standard https and url modules, so it runs anywhere Node runs, including serverless functions.
Can I call the API from a browser?
The API sends CORS headers, but a browser call exposes your key to every visitor. Call it from your server and pass the result to the page.
How are the weights chosen?
The factor groups are described on the website. The weights and rules behind the score are not published.
Is my list shared with anyone?
The domains you send are scored and returned to you. Batches are deleted after 7 days.
Links
- Website: https://www.selldatatoai.com/
- API reference: https://www.selldatatoai.com/api/
- Source: https://github.com/explainableaixai/selldatatoai
- Node.js documentation for the
httpsmodule: nodejs.org - The JavaScript
asyncandawaitguide on MDN Web Docs
License
MIT. Copyright (c) 2026 Alpha Quantum. Contact: [email protected]
