Skip to content

Commit d22ca14

Browse files
committed
Update javascript.mdx
1 parent 400c3ea commit d22ca14

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sdks/javascript.mdx

+3-1
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,13 @@ const ArticleSchema = z.object({
9090
category: z.string().describe('Article category')
9191
});
9292

93+
const ArticlesArraySchema = z.array(ArticleSchema).describe('Array of articles');
94+
9395
const response = await smartScraper(
9496
apiKey,
9597
'https://example.com/blog/article',
9698
'Extract the article information',
97-
ArticleSchema
99+
ArticlesArraySchema
98100
);
99101

100102
console.log(`Title: ${response.result.title}`);

0 commit comments

Comments
 (0)