minifetch-api 1.2.1 → 1.2.3

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.
Files changed (2) hide show
  1. package/README.md +18 -20
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -5,9 +5,9 @@
5
5
  </a>
6
6
  </div>
7
7
 
8
- **Fetch & extract data from web pages.** [Minifetch.com](https://minifetch.com) provides composable extraction APIs for humans and AI Agents-- making web pages simple to access.
8
+ **Fetch & extract metadata and data from web pages.** [Minifetch.com](https://minifetch.com) provides composable extraction APIs for humans and AI Agents-- making web pages simple to access.
9
9
 
10
- - ✅ **[Sign up](https://minifetch.com/dashboard) for an account and get your first 125-250 fetches for free. 🎉🎉**
10
+ - ✅ **[Sign up](https://minifetch.com/dashboard) for an account and get your first fetches free. 🎉🎉**
11
11
  - ✅ Always pay-as-you-go at competitive prices.
12
12
  - ⛔ No charge for blocked pages (403 errors).
13
13
 
@@ -56,7 +56,7 @@ try {
56
56
  const url = "example.com";
57
57
  const response = await client.checkAndExtractUrlPreview(url);
58
58
  // 200 "ok" responses
59
- console.log("data: ", response.data);
59
+ console.log(response);
60
60
  } catch (err) {
61
61
  // No charge for errors or 403 blocked urls!
62
62
  console.log(err);
@@ -67,41 +67,39 @@ try {
67
67
 
68
68
  After the Quick Start, you have the following methods to use. The "checkAndExtract" methods help to avoid paying for blocked URLs. **Price list** & example data [is here.](https://minifetch.com/docs/api#example-data)
69
69
 
70
- **Wrap** these in a **try/catch** just like in the Quickstart example above. **Code examples** can be also found in the [Github repository](https://github.com/Niche-Networks/minifetch-api/) in the /example- directories.
70
+ **Wrap** these in a **try/catch** just like in the Quickstart example above. **Code examples** can be also found in the [Github repository](https://github.com/Niche-Networks/minifetch-api/) /example- directories.
71
71
 
72
72
  ```js
73
73
  // Extracts a light, token-efficient preview of a URL:
74
74
  // title, description, and image (only).
75
- client.checkAndExtractUrlPreview(url);
75
+ await client.checkAndExtractUrlPreview(url);
76
76
 
77
77
  // Extracts a clean, token-efficient content summary as markdown from a URL.
78
78
  // Removes ads, nav, scripts. More efficient than raw HTML fetches for LLMs.
79
- // Options:
80
- // { includeMediaUrls: true }, defaults to false.
81
- client.checkAndExtractUrlContent(url, options);
79
+ // Options: { includeMediaUrls: true } - defaults to false.
80
+ await client.checkAndExtractUrlContent(url, options);
82
81
 
83
82
  // Extracts all links from a URL categorized by type (internal/external/anchor).
84
83
  // Detects image links, nofollow attributes, analyzes external domain distribution.
85
- client.checkAndExtractUrlLinks(url);
84
+ await client.checkAndExtractUrlLinks(url);
86
85
 
87
86
  // Extracts rich structured metadata from a URL:
88
87
  // meta tags, json-ld, images, headings, response headers, + more.
89
- // Perfect for SEO research or metadata indexing & analysis. Largest
90
- // response size of client methods. Setting verbosity to "full" is the drop-in
91
- // replacement for the [`url-metadata`](https://www.npmjs.com/package/url-metadata) package.
88
+ // Setting verbosity to "full" is the drop-in replacement for the
89
+ // `url-metadata` package.
92
90
  // Options:
93
- // { verbosity: "full" }, defaults to "standard"
94
- // { includeResponseBody: true }, defaults to false
95
- client.checkAndExtractUrlMetadata(url, options);
91
+ // { verbosity: "full" } - defaults to "standard"
92
+ // { includeResponseBody: true } - defaults to false
93
+ await client.checkAndExtractUrlMetadata(url, options);
96
94
 
97
95
  // For max control, you can also use the following methods directly.
98
96
  // Free - check robots.txt:
99
- client.preflightCheck(url);
97
+ await client.preflightCheck(url);
100
98
  // Extract data:
101
- client.extractUrlPreview(url);
102
- client.extractUrlContent(url, options); // same options as above
103
- client.extractUrlLinks(url);
104
- client.extractUrlMetadata(url, options) // same options as above
99
+ await client.extractUrlPreview(url);
100
+ await client.extractUrlContent(url, options); // same options as above
101
+ await client.extractUrlLinks(url);
102
+ await client.extractUrlMetadata(url, options) // same options as above
105
103
 
106
104
  ```
107
105
  ---
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "minifetch-api",
3
- "version": "1.2.1",
4
- "description": "Minifetch.com API Client. Fetch & extract data from web pages. For AI Agents & SEO research.",
3
+ "version": "1.2.3",
4
+ "description": "Minifetch.com API Client. Fetch & extract metadata and data from web pages. For SEO research & AI Agents.",
5
5
  "type": "module",
6
6
  "main": "./dist/esm/index.js",
7
7
  "types": "./dist/types/index.d.ts",
@@ -37,7 +37,7 @@
37
37
  "homepage": "https://minifetch.com",
38
38
  "repository": {
39
39
  "type": "git",
40
- "url": "git@github.com:Niche-Networks/minifetch-api.git"
40
+ "url": "git+ssh://git@github.com/Niche-Networks/minifetch-api.git"
41
41
  },
42
42
  "scripts": {
43
43
  "dist:clean": "rm -rf dist",