Smart AI Web Scraper
Pricing
Pay per usage
Go to Apify Store
Smart AI Web Scraper
Unlock the power of Smart AI Web Scraper! Efficiently scrape dynamic content, simulate browser behavior, and extract targeted data.
Smart AI Web Scraper
Pricing
Pay per usage
Unlock the power of Smart AI Web Scraper! Efficiently scrape dynamic content, simulate browser behavior, and extract targeted data.
You can access the Smart AI Web Scraper 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 API & Integrations in Apify Console.
1from apify_client import ApifyClient2
3# Initialize the ApifyClient with your Apify API token4# Replace '<YOUR_API_TOKEN>' with your token.5client = ApifyClient("<YOUR_API_TOKEN>")6
7# Prepare the Actor input8run_input = {9 "startUrl": "https://www.scrapethissite.com/pages/",10 "actions": [{11 "action": "Click heading: Hockey Teams: Forms, Searching and Pagination",12 "waitAfterAction": 0.5,13 "waitBeforeAction": 0.5,14 }],15 "fields": [16 {17 "dataType": "text",18 "fieldName": "Team Name",19 },20 {21 "dataType": "number",22 "fieldName": "Year",23 },24 {25 "dataType": "number",26 "fieldName": "Wins",27 },28 {29 "dataType": "number",30 "fieldName": "Losses",31 },32 {33 "dataType": "number",34 "fieldName": "Win %",35 },36 {37 "dataType": "number",38 "fieldName": "Goals Against",39 },40 {41 "dataType": "number",42 "fieldName": "Goals For",43 },44 ],45 "proxyConfiguration": { "useApifyProxy": False },46}47
48# Run the Actor and wait for it to finish49run = client.actor("cockroachapi/smart-ai-web-scraper").call(run_input=run_input)50
51# Fetch and print Actor results from the run's dataset (if there are any)52print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")53for item in client.dataset(run.default_dataset_id).iterate_items():54 print(item)55
56# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-startThe Apify API client for Python is the official library that allows you to use Smart AI Web Scraper API in Python, providing convenience functions and automatic retries on errors.
Install the apify-client
$pip install apify-clientOther API clients include: