scraperapi-java-sdk

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

A best-practices reference for using ScraperAPI from Java. ScraperAPI is a service that fetches web pages for your program, and this guide covers its Java library, Maven or Gradle setup, and API-key handling.

In plain words
What is it for?
Use it when adding the ScraperAPI Java library, creating a client, fetching HTML, or configuring options such as JavaScript rendering and country selection.
Why use it?
It provides tested usage patterns for Java code that requests web pages through ScraperAPI. It also helps avoid exposing the API key directly in source code.

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 adding the ScraperAPI Java library, creating a client, fetching HTML, or configuring options such as JavaScript rendering and country selection.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/scraperapi/scraperapi-skills/scraperapi-java-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-java-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-java-sdk

README.md
[![agentmods](https://agentmods.dev/badge/skills/scraperapi/scraperapi-skills/scraperapi-java-sdk/github.svg)](https://agentmods.dev/skills/scraperapi/scraperapi-skills/scraperapi-java-sdk)
Your own site
<a href="https://agentmods.dev/skills/scraperapi/scraperapi-skills/scraperapi-java-sdk"><img src="https://agentmods.dev/badge/skills/scraperapi/scraperapi-skills/scraperapi-java-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-java-sdk

Your own site · 80×15
<a href="https://agentmods.dev/skills/scraperapi/scraperapi-skills/scraperapi-java-sdk"><img src="https://agentmods.dev/badge/skills/scraperapi/scraperapi-skills/scraperapi-java-sdk.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 175 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,722 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.00175 $0.02722
Opus 5.5 $0.00070 $0.01089
Sonnet 5.5 $0.00035 $0.00544
Haiku 4.5 $0.00017 $0.00272

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

Security

Grade A, and why

scraperapi-java-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-java-sdk/SKILL.md · 302 lines

How it starts

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

ScraperAPI — Java SDK Best Practices

Requires: Java 8+, Maven or Gradle, SCRAPERAPI_API_KEY environment variable.

Setup

Maven

<dependency>
  <groupId>com.scraperapi</groupId>
  <artifactId>sdk</artifactId>
  <version>1.2</version>
</dependency>

Gradle

implementation 'com.scraperapi:sdk:1.2'

Client instantiation

import com.scraperapi.ScraperApiClient;

ScraperApiClient client = new ScraperApiClient(System.getenv("SCRAPERAPI_API_KEY"));

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

Basic Usage

The Java SDK uses a fluent builder pattern. Chain parameter methods onto the result of .get(), then call .result() to block and retrieve the HTML.

// Simple GET — returns HTML as a String
String html = client.get("https://example.com/").result();

// With parameters — chain before .result()
String html = client.get("https://example.com/")
    .render(true)
    .result();

// Multiple parameters
String html = client.get("https://example.com/")
    .render(true)
    .countryCode("us")
    .result();

Decision Guide

Situation Approach
Single URL, synchronous .get(url).<params>.result()
Page loads content via JavaScript Chain .render(true)
Site blocks datacenter proxies Chain .premium(true)
Toughest anti-bot protection Chain .ultraPremium(true)
Multi-step / paginated flow on same domain Chain .sessionNumber(n)
Transient failures expected Chain .retry(n)
20+ URLs or batch jobs Async endpoint via HttpClient
Supported platform (Amazon, Google, etc.) Structured data endpoint

Parameter Reference

Rendering

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

// Wait for a DOM element before capturing (requires render)
String html = client.get("https://spa-site.com/")
    .render(true)
    .waitForSelector(".product-list")
    .result();

Read the full file on GitHub · 302 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 · 302 lines · 175 tokens per session scan A fd9ba8220664

Subscribe to this mod's changes

scraperapi-java-sdk is a skill published in the GitHub repository scraperapi/scraperapi-skills (10 stars, last pushed 2mo ago), licensed MIT. It adds 175 tokens to every session and 2,722 once invoked, about $0.0007 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

spring-boot-engineer

Generates Spring Boot 3.x configurations, creates REST controllers, implements Spring Security 6 authentication flows, sets up Spring Data JPA repositories, and configures reactive WebFlux endpoints. Use when building Spring Boot 3.x applications, microservices, or reactive Java applications; invoke for Spring Data…

Jeffallan/claude-skills · 91 tokens

java-architect

Use when building, configuring, or debugging enterprise Java applications with Spring Boot 3.x, microservices, or reactive programming. Invoke to implement WebFlux endpoints, optimize JPA queries and database performance, configure Spring Security with OAuth2/JWT, or resolve authentication issues and async processing…

Jeffallan/claude-skills · 67 tokens

java-spring-development

Java Spring Boot development guidelines with best practices for building robust, secure, and maintainable enterprise applications.

Mindrally/skills · 24 tokens

123-java-design-patterns

Use when you need to select, review, or implement Java design and integration patterns — including classic Java design patterns, REST API patterns, Kafka and event-driven patterns, database and persistence patterns, and cross-cutting integration patterns. This should trigger for requests such as Apply Java design…

jabrena/plinth · 89 tokens

125-java-concurrency

Use when you need to apply Java concurrency best practices — including thread safety fundamentals, ExecutorService thread pool management, concurrent design patterns like Producer-Consumer, asynchronous programming with CompletableFuture, immutability and safe publication, deadlock avoidance, virtual threads…

jabrena/plinth · 133 tokens

302-frameworks-spring-boot-rest

Use when you need to design, review, or improve REST APIs with Spring Boot — including HTTP methods, resource URIs, status codes, DTOs, versioning, deprecation and sunset headers, content negotiation (JSON and vendor media types), ISO-8601 instants in DTOs, pagination/sorting/filtering, Bean Validation at the…

jabrena/plinth · 177 tokens