01-05-2021



The console allows you to run a code in the context of the website you are in. Don't worry, you cannot mess the site up (well, unless you start doing really nasty tricks) as the page content is downloaded on your computer and any change is only local to your PC. Scraping with Web Scraper Learn how to scrape a website using Apify's Web Scraper. Build an actor's page function, extract information from a web page and download your data. This scraping tutorial will go into the nitty gritty details of extracting data from using Web Scraper.

Apify is a platform built to serve large scale and high performance web scrapingand automation needs. It provides easy access to compute instances (Actors),convenient request and result storages, proxies,scheduling, webhooksand more, accessible through a web interfaceor an API.

Web scraping techniques. An introduction to the methods you can use to extract data from websites. Analyze web pages for hidden elements to find the most effective approach. This article provides a quick summary of ways websites structure and send their information. Knowing these techniques will help you extract data quicker and more efficiently. Read writing about Web Scraping in Apify Blog. Follow the Apify blog for the latest product updates and tips on web scraping, crawling, proxies, data extraction and web automation. Crawls arbitrary websites using the Chrome browser and extracts data from pages using a provided JavaScript code. The actor supports both recursive crawling and lists of URLs and automatically manages concurrency for maximum performance. This is Apify's basic tool for web crawling and scraping.

While we think that the Apify platform is super cool, and you should definitely try thefree account, Apify SDK is and will always be open source,runnable locally or on any cloud infrastructure.

Note that we do not test Apify SDK in other cloud environments such as Lambda or on specificarchitectures such as Raspberry PI. We strive to make it work, but there's no guarantee.

Logging into Apify platform from Apify SDK

To access your Apify account from the SDK, you must providecredentials - your API token. You can do thateither by utilizing Apify CLI or by environmentvariables.

Once you provide credentials to your scraper, you will be able to use all the Apify platformfeatures of the SDK, such as calling Actors, saving to cloud storages, using Apify proxies,setting up webhooks and so on.

Log in with CLI

Apify CLI allows you to log in to your Apify account on your computer. If you then run yourscraper using the CLI, your credentials will automatically be added.

In your project folder:

Log in with environment variables

If you prefer not to use Apify CLI, you can always provide credentials to your scraperby setting the APIFY_TOKEN environmentvariable to your API token.

There's also the APIFY_PROXY_PASSWORDenvironment variable. It is automatically inferred from your token by the SDK, but it can be usefulwhen you need to access proxies from a different account than your token represents.

What is an Actor

When you deploy your script to the Apify platform, it becomes an actor.Actor is a serverless microservice that accepts an input and produces an output. It can run fora few seconds, hours or even infinitely. An actor can perform anything from a simple action suchas filling out a web form or sending an email, to complex operations such as crawling an entire websiteand removing duplicates from a large dataset.

Actors can be shared in the Apify Store so that other people can use them.But don't worry, if you share your actor in the store and somebody uses it, it runs under their account,not yours.

Apify Web Scraper

Apify Web Scraper

Related links