Skip to main content

Overview

This example demonstrates how to extract structured data from a web page and get it as PHP object.

Example

In this example we will be extracting list of Laravel companies from The Manifest website. The result will be a list of Company objects. We use Webpage extractor to get the content of the page and specify ‘none’ scraper, which means that we will be using built-in file_get_contents function to get the content of the page. In production environment you might want to use one of the supported scrapers:
  • browsershot
  • scrapingbee
  • scrapfly
  • jinareader
Commercial scrapers require API key, which can be set in the auxiliary web configuration files (/packages/auxiliary/config/web/default.yaml and /packages/auxiliary/config/web/scrapers/*.yaml).