builtwith-api 1.0.6 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +184 -24
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +742 -0
- package/dist/cli.js.map +17 -0
- package/dist/commands.d.ts +16 -0
- package/dist/commands.d.ts.map +1 -0
- package/dist/config.d.ts +8 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +11 -0
- package/dist/config.js.map +1 -0
- package/dist/errors.d.ts +2 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +22 -0
- package/dist/errors.js.map +10 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +474 -0
- package/dist/index.js.map +14 -0
- package/dist/mcp.d.ts +3 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +689 -0
- package/dist/mcp.js.map +17 -0
- package/dist/params.d.ts +9 -0
- package/dist/params.d.ts.map +1 -0
- package/dist/params.js +37 -0
- package/dist/params.js.map +1 -0
- package/dist/request.d.ts +5 -0
- package/dist/request.d.ts.map +1 -0
- package/dist/request.js +39 -0
- package/dist/request.js.map +1 -0
- package/dist/schemas.d.ts +327 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/types.d.ts +48 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +54 -10
- package/src/config.js +0 -7
- package/src/index.js +0 -227
- package/src/utils.js +0 -56
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020-present Zach Caceres
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,40 +1,68 @@
|
|
|
1
|
-
#
|
|
1
|
+
# BuiltWith API
|
|
2
2
|
|
|
3
|
-
`builtwith-api` is a utility wrapper for the BuiltWith API suite.
|
|
3
|
+
`builtwith-api` is a utility wrapper for the BuiltWith API suite. Find out what any website is built with!
|
|
4
|
+
|
|
5
|
+
Available as a **library**, **CLI**, and **MCP server**.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
npm install builtwith-api
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Requires Node.js >= 18 (uses native `fetch`).
|
|
14
|
+
|
|
15
|
+
## Breaking Changes in v3
|
|
16
|
+
|
|
17
|
+
- **ESM-only** - no more CommonJS/`require()` support
|
|
18
|
+
- **Named export** - `import { createClient } from 'builtwith-api'` (not default/`require`)
|
|
19
|
+
- **Zod validation** - invalid inputs throw `ZodError` instead of manual error messages
|
|
20
|
+
- **Typed responses** - methods return typed response objects (when using JSON format)
|
|
4
21
|
|
|
5
22
|
## Features
|
|
6
23
|
|
|
7
|
-
Response Formats
|
|
24
|
+
### Response Formats
|
|
8
25
|
- JSON support
|
|
9
26
|
- XML support
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
27
|
+
- CSV support
|
|
28
|
+
- TSV support (lists, relationships)
|
|
29
|
+
- TXT support (lists only)
|
|
30
|
+
|
|
31
|
+
### APIs
|
|
32
|
+
| Method | Description |
|
|
33
|
+
|--------|-------------|
|
|
34
|
+
| `free` | Free technology summary |
|
|
35
|
+
| `domain` | Full domain technology lookup |
|
|
36
|
+
| `lists` | Sites using a technology |
|
|
37
|
+
| `relationships` | Related domains |
|
|
38
|
+
| `keywords` | Domain keyword extraction |
|
|
39
|
+
| `trends` | Technology adoption trends |
|
|
40
|
+
| `companyToUrl` | Company name to domains |
|
|
41
|
+
| `domainLive` | Live domain detection |
|
|
42
|
+
| `trust` | Trust & fraud signals |
|
|
43
|
+
| `tags` | IP & attribute lookups |
|
|
44
|
+
| `recommendations` | Technology suggestions |
|
|
45
|
+
| `redirects` | Redirect chain history |
|
|
46
|
+
| `product` | E-commerce product search |
|
|
22
47
|
|
|
23
48
|
________________
|
|
24
49
|
|
|
25
|
-
##
|
|
50
|
+
## Library Usage
|
|
26
51
|
|
|
27
52
|
```js
|
|
28
|
-
|
|
53
|
+
import { createClient } from 'builtwith-api'
|
|
29
54
|
|
|
30
|
-
|
|
31
|
-
|
|
55
|
+
// Initialize with your API key
|
|
56
|
+
const builtwith = createClient(process.env.YOUR_BUILTWITH_API_KEY, {
|
|
57
|
+
responseFormat: 'json' // 'json' 'xml' 'csv' 'tsv' 'txt' (txt only for lists API)
|
|
32
58
|
})
|
|
33
59
|
|
|
34
60
|
const url = 'facebook.com'
|
|
35
61
|
|
|
62
|
+
// Free lookup - quick summary
|
|
36
63
|
await builtwith.free(url)
|
|
37
64
|
|
|
65
|
+
// Full domain analysis
|
|
38
66
|
await builtwith.domain(url, {
|
|
39
67
|
// This will hide technology description, link, tag and category fields
|
|
40
68
|
hideAll: false,
|
|
@@ -45,10 +73,17 @@ await builtwith.domain(url, {
|
|
|
45
73
|
// No meta data (like address, names etc..) will be returned. Improves performance.
|
|
46
74
|
noMetaData: true,
|
|
47
75
|
// No attributes data will be returned
|
|
48
|
-
noAttributeData: true
|
|
76
|
+
noAttributeData: true,
|
|
77
|
+
// No personally identifiable information will be returned
|
|
78
|
+
noPII: true,
|
|
79
|
+
// Filter by first detected date range (e.g. '2020-01-01-2024-12-31')
|
|
80
|
+
firstDetectedRange: undefined,
|
|
81
|
+
// Filter by last detected date range
|
|
82
|
+
lastDetectedRange: undefined
|
|
49
83
|
})
|
|
50
84
|
|
|
51
|
-
|
|
85
|
+
// List sites using a technology
|
|
86
|
+
const technology = 'Shopify'
|
|
52
87
|
// The name of a technology. Spaces automatically replaced with dashes (-).
|
|
53
88
|
await builtwith.lists(technology, {
|
|
54
89
|
// Brings back meta data with the results, which includes names, titles, social links, addresses, emails, telephone numbers, traffic ranks etc.
|
|
@@ -59,15 +94,20 @@ await builtwith.lists(technology, {
|
|
|
59
94
|
since: '2016-01-20'
|
|
60
95
|
})
|
|
61
96
|
|
|
97
|
+
// Find related domains
|
|
62
98
|
await builtwith.relationships(url)
|
|
63
99
|
|
|
64
|
-
|
|
100
|
+
// Multi-domain keyword lookup (up to 16 domains)
|
|
101
|
+
const urls = ['hotelscombined.com', 'builtwith.com']
|
|
102
|
+
await builtwith.keywords(urls)
|
|
65
103
|
|
|
104
|
+
// Technology trends over time
|
|
66
105
|
await builtwith.trends(technology, {
|
|
67
106
|
// Totals will be the closest to this date - providing the ability to get historical totals
|
|
68
107
|
date: '2016-01-20'
|
|
69
108
|
})
|
|
70
109
|
|
|
110
|
+
// Find a company's website
|
|
71
111
|
const companyName = 'Shell'
|
|
72
112
|
await builtwith.companyToUrl(companyName, {
|
|
73
113
|
// Bring back domains in order of priority - the first result is generally the one we think the website is
|
|
@@ -76,14 +116,134 @@ await builtwith.companyToUrl(companyName, {
|
|
|
76
116
|
tld: 'com'
|
|
77
117
|
})
|
|
78
118
|
|
|
119
|
+
// Live domain detection
|
|
79
120
|
await builtwith.domainLive(url)
|
|
80
121
|
|
|
122
|
+
// Trust & fraud detection
|
|
81
123
|
await builtwith.trust(url, {
|
|
82
124
|
// If the words specified here are in the HTML of the website the result will have Stopwords set to true for LIVE lookups.
|
|
83
125
|
words: 'medicine,masks',
|
|
84
|
-
// Performs a live lookup of the website in question. This slows down the response. A result with a status of 'needLive' requires the LIVE option to determine if the website is suspect or not.
|
|
126
|
+
// Performs a live lookup of the website in question. This slows down the response. A result with a status of 'needLive' requires the LIVE option to determine if the website is suspect or not.
|
|
85
127
|
live: false
|
|
86
128
|
})
|
|
129
|
+
|
|
130
|
+
// Get domains related to IPs and site attributes. Use 'IP-1.2.3.4' format for IP lookups.
|
|
131
|
+
await builtwith.tags(url)
|
|
132
|
+
|
|
133
|
+
// Get technology recommendations for a domain
|
|
134
|
+
await builtwith.recommendations(url)
|
|
135
|
+
|
|
136
|
+
// Get live and historical redirect data for a domain
|
|
137
|
+
await builtwith.redirects(url)
|
|
138
|
+
|
|
139
|
+
// Search for e-commerce sites selling specific products
|
|
140
|
+
await builtwith.product('shoes')
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## CLI
|
|
144
|
+
|
|
145
|
+
The CLI wraps all 13 API methods. No extra dependencies beyond the package itself.
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
builtwith <command> <primary-arg> [--flag value ...]
|
|
87
149
|
```
|
|
88
150
|
|
|
89
|
-
|
|
151
|
+
### Authentication
|
|
152
|
+
|
|
153
|
+
Pass your API key via `--api-key` or the `BUILTWITH_API_KEY` environment variable:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
# Flag
|
|
157
|
+
builtwith free example.com --api-key YOUR_KEY
|
|
158
|
+
|
|
159
|
+
# Environment variable
|
|
160
|
+
export BUILTWITH_API_KEY=YOUR_KEY
|
|
161
|
+
builtwith free example.com
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Examples
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
builtwith free example.com
|
|
168
|
+
builtwith domain example.com --hideAll --onlyLiveTechnologies
|
|
169
|
+
builtwith domain "example.com,other.com"
|
|
170
|
+
builtwith lists Shopify --since 2024-01-01
|
|
171
|
+
builtwith companyToUrl "Acme Corp" --amount 5 --tld com
|
|
172
|
+
builtwith trust example.com --words "shop,buy" --live
|
|
173
|
+
builtwith trends React --date 2024-06-01
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Use `--help` for full usage or `builtwith <command> --help` for command-specific options:
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
builtwith --help
|
|
180
|
+
builtwith domain --help
|
|
181
|
+
builtwith --version
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## MCP Server
|
|
185
|
+
|
|
186
|
+
The package includes an [MCP](https://modelcontextprotocol.io) server that exposes all 13 API methods as tools for LLM clients (Claude Desktop, etc.).
|
|
187
|
+
|
|
188
|
+
### Claude Desktop Configuration
|
|
189
|
+
|
|
190
|
+
Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):
|
|
191
|
+
|
|
192
|
+
```json
|
|
193
|
+
{
|
|
194
|
+
"mcpServers": {
|
|
195
|
+
"builtwith": {
|
|
196
|
+
"command": "npx",
|
|
197
|
+
"args": ["-y", "-p", "builtwith-api", "builtwith-mcp"],
|
|
198
|
+
"env": {
|
|
199
|
+
"BUILTWITH_API_KEY": "YOUR_KEY"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Or passing the key directly:
|
|
207
|
+
|
|
208
|
+
```json
|
|
209
|
+
{
|
|
210
|
+
"mcpServers": {
|
|
211
|
+
"builtwith": {
|
|
212
|
+
"command": "npx",
|
|
213
|
+
"args": ["-y", "-p", "builtwith-api", "builtwith-mcp", "--api-key", "YOUR_KEY"]
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Tools
|
|
220
|
+
|
|
221
|
+
All tools are prefixed with `builtwith_`:
|
|
222
|
+
|
|
223
|
+
| Tool | Description |
|
|
224
|
+
|------|-------------|
|
|
225
|
+
| `builtwith_free` | Free technology profile for a domain |
|
|
226
|
+
| `builtwith_domain` | Detailed technology profile (supports comma-separated multi-domain) |
|
|
227
|
+
| `builtwith_lists` | List domains using a specific technology |
|
|
228
|
+
| `builtwith_relationships` | Find related domains via shared identifiers |
|
|
229
|
+
| `builtwith_keywords` | Get keywords for domains |
|
|
230
|
+
| `builtwith_trends` | Technology adoption trends |
|
|
231
|
+
| `builtwith_companyToUrl` | Find domains for a company name |
|
|
232
|
+
| `builtwith_domainLive` | Live technology lookup |
|
|
233
|
+
| `builtwith_trust` | Trust/verification score |
|
|
234
|
+
| `builtwith_tags` | Tracking/analytics tags |
|
|
235
|
+
| `builtwith_recommendations` | Technology recommendations |
|
|
236
|
+
| `builtwith_redirects` | Redirect chain history |
|
|
237
|
+
| `builtwith_product` | E-commerce product search |
|
|
238
|
+
|
|
239
|
+
### Testing with MCP Inspector
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
npx @modelcontextprotocol/inspector node dist/mcp.js
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
## Learn More
|
|
246
|
+
|
|
247
|
+
Check out the full API docs at [api.builtwith.com](https://api.builtwith.com)
|
|
248
|
+
|
|
249
|
+
For LLM-friendly API documentation, see [api.builtwith.com/llms.txt](https://api.builtwith.com/llms.txt)
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
|