builtwith-api 1.0.8 → 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 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,49 +1,68 @@
1
- # Builtwith API
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
4
 
5
- Install using
6
- ```
7
- yarn install builtwith-api
5
+ Available as a **library**, **CLI**, and **MCP server**.
8
6
 
9
- or
7
+ ## Installation
10
8
 
9
+ ```
11
10
  npm install builtwith-api
12
11
  ```
13
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)
21
+
14
22
  ## Features
15
23
 
16
- Response Formats
24
+ ### Response Formats
17
25
  - JSON support
18
26
  - XML support
19
- - TXT support (only for lists API)
20
-
21
- APIS
22
- - free
23
- - domain
24
- - lists
25
- - relationships
26
- - keywords
27
- - trends
28
- - companyToUrl
29
- - domainLive
30
- - trust
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 |
31
47
 
32
48
  ________________
33
49
 
34
- ## How To Use
50
+ ## Library Usage
35
51
 
36
52
  ```js
37
- const BuiltWith = require('builtwith-api')
53
+ import { createClient } from 'builtwith-api'
38
54
 
39
- const builtwith = BuiltWith(process.env.YOUR_BUILTWITH_API_KEY, {
40
- responseFormat: 'json' // 'json' 'xml' 'txt' (only for lists API)
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)
41
58
  })
42
59
 
43
60
  const url = 'facebook.com'
44
61
 
62
+ // Free lookup - quick summary
45
63
  await builtwith.free(url)
46
64
 
65
+ // Full domain analysis
47
66
  await builtwith.domain(url, {
48
67
  // This will hide technology description, link, tag and category fields
49
68
  hideAll: false,
@@ -54,10 +73,17 @@ await builtwith.domain(url, {
54
73
  // No meta data (like address, names etc..) will be returned. Improves performance.
55
74
  noMetaData: true,
56
75
  // No attributes data will be returned
57
- 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
58
83
  })
59
84
 
60
- const technologies = 'Shopify'
85
+ // List sites using a technology
86
+ const technology = 'Shopify'
61
87
  // The name of a technology. Spaces automatically replaced with dashes (-).
62
88
  await builtwith.lists(technology, {
63
89
  // Brings back meta data with the results, which includes names, titles, social links, addresses, emails, telephone numbers, traffic ranks etc.
@@ -68,17 +94,20 @@ await builtwith.lists(technology, {
68
94
  since: '2016-01-20'
69
95
  })
70
96
 
97
+ // Find related domains
71
98
  await builtwith.relationships(url)
72
99
 
100
+ // Multi-domain keyword lookup (up to 16 domains)
73
101
  const urls = ['hotelscombined.com', 'builtwith.com']
74
- // Multi-domain lookup. Will automatically be converted into URI encoded array (hotelscombined.com,builtwith.com).
75
102
  await builtwith.keywords(urls)
76
103
 
104
+ // Technology trends over time
77
105
  await builtwith.trends(technology, {
78
106
  // Totals will be the closest to this date - providing the ability to get historical totals
79
107
  date: '2016-01-20'
80
108
  })
81
109
 
110
+ // Find a company's website
82
111
  const companyName = 'Shell'
83
112
  await builtwith.companyToUrl(companyName, {
84
113
  // Bring back domains in order of priority - the first result is generally the one we think the website is
@@ -87,14 +116,134 @@ await builtwith.companyToUrl(companyName, {
87
116
  tld: 'com'
88
117
  })
89
118
 
119
+ // Live domain detection
90
120
  await builtwith.domainLive(url)
91
121
 
122
+ // Trust & fraud detection
92
123
  await builtwith.trust(url, {
93
124
  // If the words specified here are in the HTML of the website the result will have Stopwords set to true for LIVE lookups.
94
125
  words: 'medicine,masks',
95
- // 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. Live lookups slow down the response of the API, you should consider calling this if the non-LIVE lookup response status is 'needLive'.
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.
96
127
  live: false
97
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 ...]
149
+ ```
150
+
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
98
162
  ```
99
163
 
100
- Made live on Facebook by Zach Caceres during Covid-19 Quarantine
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,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}