Skip to content

Commit 88a2f50

Browse files
committed
fix: removed wrong information
1 parent 9e9e138 commit 88a2f50

File tree

1 file changed

+9
-24
lines changed

1 file changed

+9
-24
lines changed

scrapegraph-js/readme.md

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# 🌐 ScrapeGraph JavaScript SDK
22

33
[![npm version](https://badge.fury.io/js/scrapegraph-js.svg)](https://badge.fury.io/js/scrapegraph-js)
4-
[![TypeScript Support](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)
54
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
65
[![Build Status](https://github.com/ScrapeGraphAI/scrapegraph-sdk/actions/workflows/ci.yml/badge.svg)](https://github.com/ScrapeGraphAI/scrapegraph-sdk/actions)
76
[![Documentation Status](https://img.shields.io/badge/docs-latest-brightgreen.svg)](https://docs.scrapegraphai.com)
@@ -11,8 +10,7 @@ Official JavaScript/TypeScript SDK for the ScrapeGraph AI API - Smart web scrapi
1110
## 🚀 Features
1211

1312
- ✨ Smart web scraping with AI
14-
- 🔄 Fully asynchronous design
15-
- 📊 TypeScript-ready with strongly typed responses
13+
- 🔄 Fully asynchronous design
1614
- 🔍 Detailed error handling
1715
- ⚡ Automatic retries and logging
1816
- 🔐 Secure API authentication
@@ -23,7 +21,11 @@ Install the package using npm or yarn:
2321

2422
```bash
2523
# Using npm
26-
npm install scrapegraph-js
24+
npm i scrapegraph-js
25+
26+
# Using yarn
27+
yarn add scrapegraph-js
28+
```
2729

2830

2931
## 🔧 Quick Start
@@ -34,6 +36,7 @@ npm install scrapegraph-js
3436

3537
```javascript
3638
import { smartScraper } from 'scrapegraph-js';
39+
import 'dotenv/config';
3740

3841
// Initialize variables
3942
const apiKey = process.env.SGAI_APIKEY; // Set your API key as an environment variable
@@ -75,26 +78,8 @@ const prompt = 'Extract the main heading and description.';
7578

7679
#### Scraping with Custom Output Schema
7780

78-
```typescript
79-
import { smartScraper } from 'scrapegraph-js';
80-
81-
interface WebsiteData {
82-
title: string;
83-
description: string;
84-
}
85-
86-
const apiKey = 'your-api-key';
87-
const url = 'https://example.com';
88-
const prompt = 'Extract the title and description.';
89-
90-
(async () => {
91-
try {
92-
const response = await smartScraper<WebsiteData>(apiKey, url, prompt);
93-
console.log(response.result.title, response.result.description);
94-
} catch (error) {
95-
console.error('Error:', error);
96-
}
97-
})();
81+
```javascript
82+
//TODO
9883
```
9984

10085
### Checking API Credits

0 commit comments

Comments
 (0)