VOOZH about

URL: https://apify.com/scrapier/smart-article-extractor/api/javascript

โ‡ฑ ๐Ÿง  Smart Article Extractor API in JavaScript ยท Apify


๐Ÿ‘ ๐Ÿง  Smart Article Extractor avatar

๐Ÿง  Smart Article Extractor

Pricing

from $4.99 / 1,000 results

Go to Apify Store

Pricing

from $4.99 / 1,000 results

Rating

0.0

(0)

Developer

๐Ÿ‘ Scrapier

Scrapier

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

24 days ago

Last modified

Share

You might also like

๐Ÿง  Smart Article Extractor

scrapio/smart-article-extractor

Email โœ‰๏ธ & Phone ๐Ÿ“ž Extractor

scrapier/email-and-phone-extractor

You can access the ๐Ÿง  Smart Article Extractor programmatically from your own applications by using the Apify API. You can also choose the language preference from below. To use the Apify API, youโ€™ll need an Apify account and your API token, found in Integrations settings in Apify Console.

๐Ÿ‘ Python

Python

๐Ÿ‘ JavaScript

JavaScript

CLI

๐Ÿ‘ OpenAPI

OpenAPI

HTTP

MCP

1import{ ApifyClient }from'apify-client';
2
3// Initialize the ApifyClient with your Apify API token
4// Replace the '<YOUR_API_TOKEN>' with your token
5const client =newApifyClient({
6token:'<YOUR_API_TOKEN>',
7});
8
9// Prepare Actor input
10const input ={
11"startUrls":[
12"https://www.theguardian.com"
13],
14"articleUrls":[],
15"proxyConfiguration":{
16"useApifyProxy":false
17},
18"extendOutputFunction":`# def extend(soup, article, html):
19# return {"pageTitle": soup.title.string.strip() if soup.title else None}`
20};
21
22// Run the Actor and wait for it to finish
23const run =await client.actor("scrapier/smart-article-extractor").call(input);
24
25// Fetch and print Actor results from the run's dataset (if any)
26console.log('Results from dataset');
27console.log(`๐Ÿ’พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
28const{ items }=await client.dataset(run.defaultDatasetId).listItems();
29items.forEach((item)=>{
30 console.dir(item);
31});
32
33// ๐Ÿ“š Want to learn more ๐Ÿ“–? Go to โ†’ https://docs.apify.com/api/client/js/docs

๐Ÿง  Smart Article Extractor API in JavaScript

The Apify API client for JavaScript is the official library that allows you to use ๐Ÿง  Smart Article Extractor API in JavaScript or TypeScript, providing convenience functions and automatic retries on errors.

Install the apify-client

$npminstall apify-client

Other API clients include:

๐Ÿง  Smart Article Extractor API in Python

๐Ÿง  Smart Article Extractor API through CLI

๐Ÿง  Smart Article Extractor OpenAPI definition

๐Ÿง  Smart Article Extractor API