scraperapi-ruby-sdk

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

A reference for using ScraperAPI from Ruby through its official software library, called an SDK. It covers setup, page fetching, JavaScript-rendered pages, location settings, and multi-page requests.

In plain words
What is it for?
Writing, debugging, or reviewing Ruby code that fetches website pages with ScraperAPI, including pages that load content with JavaScript or sites that block ordinary data-center requests.
Why use it?
It helps Ruby developers choose the right request pattern and avoid common setup mistakes, such as putting an API key directly in source code. It also explains when a simple request is not enough.

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 Writing, debugging, or reviewing Ruby code that fetches website pages with ScraperAPI, including pages that load content with JavaScript or sites that block ordinary data-center requests.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/scraperapi/scraperapi-skills/scraperapi-ruby-sdk"><img src="https://agentmods.dev/badge/skills/scraperapi/scraperapi-skills/scraperapi-ruby-sdk.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 150 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,209 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.00150 $0.02209
Opus 5.5 $0.00060 $0.00884
Sonnet 5.5 $0.00030 $0.00442
Haiku 4.5 $0.00015 $0.00221

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

Security

Grade A, and why

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

How it starts

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

ScraperAPI — Ruby SDK Best Practices

Requires: Ruby >= 2.0, gem install scraperapi (or gem 'scraperapi' in Gemfile), SCRAPERAPI_API_KEY environment variable.

Setup

require "scraper_api"

client = ScraperAPI::Client.new(ENV["SCRAPERAPI_API_KEY"])

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

Basic Usage

# Simple GET — returns raw HTML string via .raw_body
html = client.get("https://example.com/").raw_body
puts 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 keyword arguments after the URL. .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 Pass render: true
Site blocks datacenter proxies Pass premium: true
Toughest anti-bot protection Pass ultra_premium: true
Multi-step / paginated flow on same domain Use session_number:
20+ URLs or batch jobs Use async endpoint via Net::HTTP or Faraday
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 initial 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

Don't add render: true by default — try without it first. It increases cost and latency.

Proxies and Geotargeting

# Route through a country-specific proxy — no extra credit cost
html = client.get("https://example.com/", country_code: "gb").raw_body

# Premium residential/mobile IPs — for sites that block datacenter proxies
# Cost: 10 credits (25 with render: true)
html = client.get("https://hard-site.com/", premium: true).raw_body

# Ultra-premium — for the toughest anti-bot protections
# Cost: 30 credits (75 with render: true)
# Note: incompatible with keep_headers — custom headers are discarded
html = client.get("https://hardest-site.com/", ultra_premium: true).raw_body

Read the full file on GitHub · 264 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 · 264 lines · 150 tokens per session scan A 0ccaca76bd8e

Subscribe to this mod's changes

scraperapi-ruby-sdk is a skill published in the GitHub repository scraperapi/scraperapi-skills (10 stars, last pushed 2mo ago), licensed MIT. It adds 150 tokens to every session and 2,209 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

rails-llm-integration

Production-grade LLM integration patterns for Ruby on Rails applications. USE THIS SKILL when the user needs to: integrate OpenAI, Claude, or any LLM API into a Rails app; use rubyllm gem or langchain-rb gem in Rails; build AI-powered features in Rails; manage prompts as templates; route between LLM models for cost…

nagstler/rails-llm-integration · 313 tokens

rails-expert

Rails 7+ specialist that optimizes Active Record queries with includes/eagerload, implements Turbo Frames and Turbo Streams for partial page updates, configures Action Cable for WebSocket connections, sets up Sidekiq workers for background job processing, and writes comprehensive RSpec test suites. Use when building…

Jeffallan/claude-skills · 104 tokens

ruby-rails

Conventions and best practices for building web applications with Ruby on Rails. Use when scaffolding Rails apps or generators, designing ActiveRecord models and migrations, wiring up Hotwire/Turbo/Stimulus interactivity, setting up background jobs or caching, or writing RSpec/Minitest coverage for Rails code.

Mindrally/skills · 65 tokens

rails-load-defaults

Incrementally upgrade Rails config.loaddefaults by walking through each newframeworkdefaults config one at a time. Use this skill whenever the user mentions loaddefaults upgrade, newframeworkdefaults, framework defaults, or wants to bring their Rails app's default configuration up to match their Rails version. Also…

ombulabs/claude-code_rails-load-defaults-skill · 120 tokens

pn-ruby-scaffolding

Scaffolds new Ruby API projects (Rails API-only, Sinatra) or routes. Use when adding a new controller/service; covers Rails conventions, Gemfile hygiene, service objects, and idiomatic Ruby patterns.

perniemann/pnCore · 49 tokens

rails-api-controllers

RESTful API controller patterns for Ruby on Rails. Use when: (1) Building JSON APIs, (2) API versioning, (3) Error handling and status codes, (4) Authentication with tokens/JWT, (5) Rate limiting, (6) CORS configuration, (7) Pagination and filtering, (8) API documentation, (9) Testing API endpoints.

Shoebtamboli/rails_claude_skills · 82 tokens