scraperapi-php-sdk

scraperapi-php-sdk is a skill for Claude Code from scraperapi/scraperapi-skills. It costs 154 tokens per session (2,664 once invoked), scanned A, original, MIT.

A reference guide for calling ScraperAPI from PHP through its Composer package. ScraperAPI is a service that fetches website pages for your code.

In plain words
What is it for?
Use it when writing, debugging, or reviewing PHP code that sends ScraperAPI requests and reads returned HTML.
Why use it?
It helps avoid common setup and request mistakes, including exposing the API key or using the wrong options for JavaScript-heavy and protected sites.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: built for openclaw.

Part of the scraperapi plugin — 20 skills, 1 MCP server shipped together

Good fit Use it when writing, debugging, or reviewing PHP code that sends ScraperAPI requests and reads returned HTML.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/scraperapi/scraperapi-skills/scraperapi-php-sdk
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add scraperapi/scraperapi-skills --skill scraperapi-php-sdk
Clone the repo
git clone --depth 1 https://github.com/scraperapi/scraperapi-skills

Made for: Claude Code.

Or install scraperapi, the plugin that ships this one along with the rest of its 20 skills, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for scraperapi-php-sdk

README.md
[![agentmods](https://agentmods.dev/badge/skills/scraperapi/scraperapi-skills/scraperapi-php-sdk/github.svg)](https://agentmods.dev/skills/scraperapi/scraperapi-skills/scraperapi-php-sdk)
Your own site
<a href="https://agentmods.dev/skills/scraperapi/scraperapi-skills/scraperapi-php-sdk"><img src="https://agentmods.dev/badge/skills/scraperapi/scraperapi-skills/scraperapi-php-sdk/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for scraperapi-php-sdk

Your own site · 80×15
<a href="https://agentmods.dev/skills/scraperapi/scraperapi-skills/scraperapi-php-sdk"><img src="https://agentmods.dev/badge/skills/scraperapi/scraperapi-skills/scraperapi-php-sdk.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 154 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,664 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00154 $0.02664
Opus 5.5 $0.00062 $0.01066
Sonnet 5.5 $0.00031 $0.00533
Haiku 4.5 $0.00015 $0.00266

Measured 1mo ago against content hash a9e392427758, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

scraperapi-php-sdk scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/scraperapi-php-sdk/SKILL.md · 296 lines

How it starts

The opening of the file, as written. The whole thing — 296 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ScraperAPI — PHP SDK Best Practices

Requires: PHP 7.0+, Composer, composer require scraperapi/sdk, SCRAPERAPI_API_KEY environment variable.

Setup

<?php
require __DIR__ . '/vendor/autoload.php';
use ScraperAPI\Client;

$client = new Client(getenv('SCRAPERAPI_API_KEY'));

Never hardcode the API key. Read it from the environment every time.

Basic Usage

// Simple GET — returns HTML string via ->raw_body
$html = $client->get("https://example.com/")->raw_body;
echo $html;

// With a single parameter
$html = $client->get("https://example.com/", ["render" => true])->raw_body;

// With multiple parameters
$html = $client->get(
    "https://example.com/",
    [
        "render"       => true,
        "country_code" => "us",
    ]
)->raw_body;

Parameters are passed as an associative array. ->raw_body extracts the HTML string from the response object.

Decision Guide

Situation Approach
Single URL, synchronous $client->get($url, $params)->raw_body
Page loads content via JavaScript Add "render" => true
Site blocks datacenter proxies Add "premium" => true
Toughest anti-bot protection Add "ultra_premium" => true
Multi-step / paginated flow on same domain Use "session_number"
POST a form or JSON body to target $client->post($url, $options)->raw_body
20+ URLs or batch jobs Use async endpoint via cURL or Guzzle
Supported platform (Amazon, Google, etc.) Use structured data endpoint directly

Parameter Reference

Rendering

// Render JavaScript before returning HTML
// Use when: page is a React/Vue/Angular SPA, or scrape returns empty/partial content
// Cost: +10 credits
$html = $client->get("https://spa-site.com/", ["render" => true])->raw_body;

// Wait for a specific DOM element (requires render: true)
$html = $client->get("https://spa-site.com/", [
    "render"            => true,
    "wait_for_selector" => ".product-list",
])->raw_body;

// Screenshot (auto-enables rendering)
$html = $client->get("https://example.com/", ["screenshot" => true])->raw_body;

Read the full file on GitHub · 296 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 296 lines · 154 tokens per session scan A a9e392427758

Subscribe to this mod's changes

scraperapi-php-sdk is a skill published in the GitHub repository scraperapi/scraperapi-skills (10 stars, last pushed 2mo ago), licensed MIT. It adds 154 tokens to every session and 2,664 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

laravel-specialist

Build and configure Laravel 10+ applications, including creating Eloquent models and relationships, implementing Sanctum authentication, configuring Horizon queues, designing RESTful APIs with API resources, and building reactive interfaces with Livewire. Use when creating Laravel models, setting up queue workers…

Jeffallan/claude-skills · 86 tokens

php-pro

Use when building PHP applications with modern PHP 8.3+ features, Laravel, or Symfony frameworks. Invokes strict typing, PHPStan level 9, async patterns with Swoole, and PSR standards. Creates controllers, configures middleware, generates migrations, writes PHPUnit/Pest tests, defines typed DTOs and value objects…

Jeffallan/claude-skills · 107 tokens

neuron-symfony-integration

Integrate Neuron AI agents into a Symfony 8 app, from packages, env keys, a Doctrine migration for the Neuron tables and services.yaml wiring to a shared agent bound per request with for(), a thread voter, JSON and AG-UI (CopilotKit) or useChat streaming with StreamedResponse, reload with pending approvals, Messenger…

neuron-core/neuron-ai · 221 tokens

llamaindex-development

Expert guidance for LlamaIndex development including RAG applications, vector stores, document processing, query engines, and building production AI applications.

Mindrally/skills · 32 tokens

craftcms

Craft CMS 5 plugin and module development — extending Craft with PHP. Covers elements, element queries, services, models, records, controllers, migrations, queue jobs, console commands, field types, native fields, events, behaviors, Twig extensions, widgets, filesystems, permissions, project config, GraphQL, testing…

michtio/craftcms-claude-skills · 70 tokens

drupal-development

Expert guidance for Drupal 10 module development with PHP 8+, SOLID principles, and Drupal coding standards.

Mindrally/skills · 25 tokens