Skip to main content
All integrations

Official SDKs

AdsCrawl for PHP

Call AdsCrawl from PHP for rendered content, extraction and browser control. Composer installation, JSON and cURL transport, and explicit HTTP deadlines.

What you can do

01

Rendered web content

Read JavaScript-rendered pages as Markdown, HTML or structured article JSON.

02

Page screenshots

Capture a viewport or full page through the screenshot API.

03

Browser workflows

Use Remote CDP for navigation, clicks and form input across multiple steps.

Before you start

  • PHP 8.1+, JSON + cURL
  • An AdsCrawl account and API key.
  • Set ADSCRAWL_API_KEY in the environment of the process running your client. Keep it out of browser code and source control.

SETUP METHOD 01

Official SDK

Call AdsCrawl directly from your PHP application.

  1. Install the package

    Run this command in your project. For Go, initialize a module first if the project does not have a go.mod file.

    Shell
    composer require adscrawl/adscrawl
  2. Configure authentication

    Set ADSCRAWL_API_KEY in the environment of the process running your client. Keep it out of browser code and source control.

  3. Make your first request

    Run this example on the server. It reads Example Domain as Markdown using your account key from the environment.

    PHP
    <?php
    
    require __DIR__ . '/vendor/autoload.php';
    
    use AdsCrawl\Client;
    
    $client = new Client();
    $markdown = $client->markdown([
        'url' => 'https://example.com',
        'waitUntil' => 'domcontentloaded',
    ]);
    echo $markdown;

Usage & limits

  • API requests and browser sessions use your AdsCrawl account credits. Installing a client does not include a separate usage allowance.
  • For interactive CDP sessions, install your browser automation library separately and close each remote session in a finally block. Avoid automatic retries of metered requests.
See pricing and credit conversion

Further reading

PHP SDK referenceCredits and limits