Skip to content

Commit 5b7297e

Browse files
VinciGit00claude
andcommitted
feat: update v2 nav and integrations
- Reorder services: Scrape, Extract, Search, Crawl, Monitor - Remove Community anchor, Playground, x402, Langflow from v2 nav - Update Vercel AI integration for v2 SDK Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d480ac8 commit 5b7297e

2 files changed

Lines changed: 16 additions & 26 deletions

File tree

docs.json

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
"group": "Dashboard",
3939
"pages": [
4040
"dashboard/overview",
41-
"dashboard/playground",
4241
"dashboard/settings"
4342
]
4443
}
@@ -47,9 +46,9 @@
4746
{
4847
"group": "Services",
4948
"pages": [
49+
"services/scrape",
5050
"services/extract",
5151
"services/search",
52-
"services/scrape",
5352
"services/crawl",
5453
"services/monitor",
5554
{
@@ -101,8 +100,7 @@
101100
"integrations/crewai",
102101
"integrations/agno",
103102
"integrations/vercel_ai",
104-
"integrations/google-adk",
105-
"integrations/x402"
103+
"integrations/google-adk"
106104
]
107105
},
108106
{
@@ -333,12 +331,7 @@
333331
"href": "https://scrapegraphai.com/",
334332
"icon": "globe"
335333
},
336-
{
337-
"anchor": "Community",
338-
"href": "https://discord.gg/uJN7TYcpNa",
339-
"icon": "discord"
340-
},
341-
{
334+
{
342335
"anchor": "Blog",
343336
"href": "https://scrapegraphai.com/blog",
344337
"icon": "newspaper"

integrations/vercel_ai.mdx

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ description: "Integrate ScrapeGraphAI into Vercel AI"
55

66
## Overview
77

8-
[Vercel AI sdk](https://ai-sdk.dev/) is a very populate javascript/typescript framework to interact with various LLMs providers. This page shows how to integrate it with ScrapeGraph
8+
[Vercel AI SDK](https://ai-sdk.dev/) is a popular JavaScript/TypeScript framework to interact with various LLM providers. This page shows how to integrate it with ScrapeGraph.
99

1010
<Card
1111
title="Official Vercel AI documentation"
1212
icon="book"
1313
href="https://ai-sdk.dev/"
1414
>
15-
View the integration on LlamaHub
15+
View the Vercel AI SDK documentation
1616
</Card>
1717

1818
## Installation
1919

20-
Follow out [javascript sdk installation steps](/sdks/javascript) using your favourite package manager:
20+
Follow our [JavaScript SDK installation steps](/sdks/javascript) using your favourite package manager:
2121

2222
```bash
2323
# Using npm
@@ -33,7 +33,7 @@ yarn add scrapegraph-js
3333
bun add scrapegraph-js
3434
```
3535

36-
Then, install [vercel ai](https://ai-sdk.dev/docs/getting-started) with their [openai provider](https://ai-sdk.dev/providers/ai-sdk-providers/openai)
36+
Then, install [Vercel AI](https://ai-sdk.dev/docs/getting-started) with their [OpenAI provider](https://ai-sdk.dev/providers/ai-sdk-providers/openai):
3737

3838
```bash
3939
# Using npm
@@ -51,15 +51,15 @@ bun add ai @ai-sdk/openai
5151

5252
## Usage
5353

54-
ScrapeGraph sdk can be used like any other tools, see [vercel ai tool calling doc](https://ai-sdk.dev/docs/ai-sdk-core/tools-and-tool-calling)
54+
The ScrapeGraph SDK can be used like any other tool. See [Vercel AI tool calling docs](https://ai-sdk.dev/docs/ai-sdk-core/tools-and-tool-calling).
5555

5656
```ts
5757
import { z } from "zod";
5858
import { generateText, tool } from "ai";
5959
import { openai } from "@ai-sdk/openai";
60-
import { smartScraper } from "scrapegraph-js";
60+
import { scrapegraphai } from "scrapegraph-js";
6161

62-
const apiKey = process.env.SGAI_APIKEY;
62+
const sgai = scrapegraphai({ apiKey: process.env.SGAI_API_KEY });
6363

6464
const ArticleSchema = z.object({
6565
title: z.string().describe("The article title"),
@@ -77,15 +77,14 @@ const result = await generateText({
7777
model: openai("gpt-4.1-mini"),
7878
tools: {
7979
scrape: tool({
80-
description: "Get articles information for a given url.",
80+
description: "Extract articles information from a given URL.",
8181
parameters: z.object({
82-
url: z.string().describe("The exact url."),
82+
url: z.string().describe("The exact URL."),
8383
}),
8484
execute: async ({ url }) => {
85-
const response = await smartScraper(apiKey, {
86-
website_url: url,
87-
user_prompt: "Extract the article information",
88-
output_schema: ArticlesArraySchema,
85+
const response = await sgai.extract(url, {
86+
prompt: "Extract the article information",
87+
schema: ArticlesArraySchema,
8988
});
9089
return response.data;
9190
},
@@ -97,8 +96,6 @@ const result = await generateText({
9796
console.log(result);
9897
```
9998

100-
**TODO ADD THE LOGS**
101-
10299
## Support
103100

104101
Need help with the integration?
@@ -107,7 +104,7 @@ Need help with the integration?
107104
<Card
108105
title="GitHub Issues"
109106
icon="github"
110-
href="https://github.com/ScrapeGraphAI/llama-index-tools-scrapegraph/issues"
107+
href="https://github.com/ScrapeGraphAI/scrapegraph-js/issues"
111108
>
112109
Report bugs and request features
113110
</Card>

0 commit comments

Comments
 (0)