VOOZH about

URL: https://apify.com/hgservices/claude-api-actor

โ‡ฑ Claude API Actor โ€“ BYOK Anthropic Claude AI Proxy for Apify ยท Apify


๐Ÿ‘ Claude API Actor โ€“ BYOK Anthropic Claude AI Proxy for Apify avatar

Claude API Actor โ€“ BYOK Anthropic Claude AI Proxy for Apify

Pricing

from $1.00 / 1,000 results

Go to Apify Store

Claude API Actor โ€“ BYOK Anthropic Claude AI Proxy for Apify

Call Anthropic's Claude API directly from any Apify Actor or automation workflow. This Actor is a lightweight, BYOK (Bring Your Own Key) proxy that lets you integrate Claude AI, including Opus, Sonnet, and Haiku, into your Apify scraping pipelines, data extraction workflows, and AI automation tasks

Pricing

from $1.00 / 1,000 results

Rating

5.0

(1)

Developer

๐Ÿ‘ Harish Garg

Harish Garg

Maintained by Community

Actor stats

0

Bookmarked

31

Total users

7

Monthly active users

0.029 hours

Issues response

a month ago

Last modified

Share

Run Anthropic's Claude API directly from any Apify Actor or automation workflow. This Actor is a lightweight, BYOK (Bring Your Own Key) proxy that lets you integrate Claude AI โ€” including Claude Opus, Claude Sonnet, and Claude Haiku โ€” into your Apify scraping pipelines, data extraction workflows, and AI automation tasks without installing extra libraries or managing HTTP clients.

Perfect for: web scraping + AI analysis, content classification, data extraction, LLM-powered automation, and multi-Actor AI pipelines on Apify.


Why Use This Claude API Apify Integration?

Most Apify scraping workflows need an AI step โ€” classifying scraped content, extracting structured data, summarizing text, or generating output. Setting up the Anthropic SDK in every Actor is repetitive and slow. This Actor solves that:

  • Call Claude from any Apify Actor โ€” no Anthropic SDK needed in your own code
  • BYOK โ€” use your own Anthropic API key; you're billed directly by Anthropic
  • All Claude models supported โ€” Opus 4.x, Sonnet 4.x, Haiku (latest versions)
  • Flexible API key storage โ€” pass per-run or store persistently in Apify Key-Value Store
  • Drop-in AI step for multi-Actor Apify workflows

How to Call Claude API from Apify โ€“ Setup

Step 1: Get an Anthropic API Key

Sign up at console.anthropic.com and generate an API key. You will be billed by Anthropic based on your usage โ€” this Actor does not add any markup.

Step 2: Store or Provide Your Anthropic API Key

You have two options:

Option A: Pass it directly in the input (per-run, simplest)

Include anthropicApiKey in your JSON input. No configuration needed โ€” works immediately.

Option B: Store it in Apify Key-Value Store (recommended for recurring use)

  1. Go to Apify Console โ†’ Storage โ†’ Key-Value Stores
  2. Open the Actor's default Key-Value Store (auto-created on first run)
  3. Add a record with key: ANTHROPIC_API_KEY and your Anthropic API key as the value

Key resolution order:

  1. anthropicApiKey in input (if provided)
  2. ANTHROPIC_API_KEY in default Key-Value Store
  3. Error with clear message if neither is found

Input Schema

FieldTypeRequiredDefaultDescription
messagesarrayโœ… Yesโ€”Messages array in standard Anthropic API format
anthropicApiKeystringโŒ Noโ€”Your Anthropic API key (or use KVS)
modelstringโŒ Noclaude-sonnet-4-6Claude model to use
systemstringโŒ Noโ€”System prompt
max_tokensintegerโŒ No1024Max tokens to generate
temperaturenumberโŒ No1.0Response randomness (0.0โ€“1.0)

Example Input

{
"messages":[
{
"role":"user",
"content":"Summarize the following product reviews and identify the top 3 complaints."
}
],
"model":"claude-sonnet-4-6",
"max_tokens":1024,
"system":"You are a helpful product analyst."
}

Which Claude Model Should I Use?

ModelSpeedCostBest For
claude-opus-476SlowestHighestComplex reasoning, long-form analysis, highest quality output
claude-sonnet-4-6BalancedMediumDefault choice โ€” best balance of speed and intelligence
claude-haiku-4-5FastestLowestHigh-volume tasks: classification, extraction, summarization

Recommendation: Start with claude-sonnet-4-6. Switch to Haiku for scale, Opus for quality-critical tasks.


Output

The Actor returns the full Anthropic API JSON response, saved to:

  • The default Dataset (one record per run)
  • The OUTPUT key in the default Key-Value Store (for direct actor-to-actor access)

Example Output

{
"id":"msg_01XyZ...",
"type":"message",
"role":"assistant",
"content":[
{
"type":"text",
"text":"The top 3 complaints are: 1) slow delivery..."
}
],
"model":"claude-sonnet-4-6",
"usage":{
"input_tokens":34,
"output_tokens":218
}
}

Integrate Claude into Apify Workflows โ€“ Actor-to-Actor Usage

The most powerful use case: calling this Claude API Actor from inside another Apify Actor to add AI processing to your scraping or automation pipeline.

JavaScript / Node.js Example

import{ ApifyClient }from'apify-client';
const client =newApifyClient({token: process.env.APIFY_TOKEN});
// Call Claude API Actor from your own Apify Actor
const run =await client.actor('YOUR_USERNAME/claude-api-actor').call({
messages:[
{
role:'user',
content:`Classify this product review as positive, negative, or neutral: "${reviewText}"`
}
],
model:'claude-haiku-4-5-20251001',
max_tokens:128
});
// Read Claude's response
const{ items }=await client.dataset(run.defaultDatasetId).listItems();
const text = items[0].content[0].text;

Python Example

from apify_client import ApifyClient
client = ApifyClient(token=os.environ["APIFY_TOKEN"])
# Call Claude API Actor from your Apify scraping pipeline
run = client.actor("YOUR_USERNAME/claude-api-actor").call(run_input={
"messages":[
{
"role":"user",
"content":f"Extract the price and product name from this text: {scraped_text}"
}
],
"model":"claude-sonnet-4-6",
"max_tokens":256
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
text = items[0]["content"][0]["text"]

Common Use Cases

  • Web scraping + AI analysis โ€” scrape product pages, pass content to Claude for structured extraction
  • Content classification โ€” classify scraped articles, reviews, or listings at scale
  • Data extraction from unstructured text โ€” pull prices, names, dates from raw HTML or text
  • LLM-powered automation pipelines โ€” chain multiple Apify Actors with Claude as the AI reasoning step
  • Summarization โ€” summarize large scraped datasets before storing or exporting
  • Sentiment analysis โ€” analyze customer reviews, social media posts, or feedback at Apify scale

Error Reference

ErrorCauseFix
No API key foundKey missing from both input and KVSAdd anthropicApiKey to input or set up KVS
401 UnauthorizedInvalid or expired Anthropic API keyRegenerate key at console.anthropic.com
400 Bad RequestInvalid model name or malformed messagesCheck model name against the table above
429 Too Many RequestsAnthropic rate limit hitReduce request frequency or upgrade Anthropic plan

Frequently Asked Questions

Is my Anthropic API key secure? Yes. Store your key in the Apify Key-Value Store rather than passing it in every input. It is encrypted at rest by Apify and never logged by this Actor.

Which Claude model should I use for web scraping workflows? Use claude-haiku-4-5-20251001 for high-volume, simple extraction tasks. Use claude-sonnet-4-6 for more complex analysis. Reserve claude-opus-4-6 for tasks that require maximum reasoning quality.

Can I use this Actor without knowing the Anthropic API? Yes. The input format mirrors the official Anthropic API, but you don't need to understand HTTP clients or authentication โ€” just provide your key and messages.

Does this Actor cost anything beyond Anthropic's API fees? You pay Apify's standard Actor compute costs and Anthropic's API usage fees directly. This Actor does not add any markup.

What's the difference between passing the API key in input vs Key-Value Store? Input is simpler for one-off runs. Key-Value Store is better for recurring workflows โ€” store once, never repeat it in your input JSON again.

You might also like

BOOKING PRICE SCRAPER - by room

noraview/Booking-price-scraper

Track Booking.com prices by room type, per night, up to 365 days. Get rooms_left, rate options, meal plans, discounts, and sold-out detection. Clean output for revenue management and competitive analysis. CSV, JSON, HTML, Excel. Built by NoraView Intelligence.

๐Ÿ‘ User avatar

NoraView Intelligence

132

5.0

Booking.com Full-Year Price Scraper

moving_beacon-owner1/my-actor-2

The Yearly Data Scraper is a powerful, easy-to-use tool designed to automatically gather comprehensive data from Booking.com.

135

5.0

Booking.com Scraper

automation-lab/booking-scraper

Extract hotel and accommodation data from Booking.com search results. Get prices, ratings, reviews, room types, photos, and availability for any location worldwide. Handles anti-bot protection automatically. Export to JSON, CSV, Excel, or connect via API.

๐Ÿ‘ User avatar

Stas Persiianenko

251

3.0

Booking.com Hotel Scraper

santamaria-automations/booking-com-scraper

Scrape hotel listings from Booking.com including prices, ratings, availability, and cancellation policies. Uses the unprotected GraphQL API โ€” HTTP-only, low memory, fast.

Booking.com Hotel Price Tracker

scrapyspider/booking-com-hotel-price-tracker

Tracks and extracts hotel prices from Booking.com for any location across a configurable date range. Filter by hotel name, set stay duration, guests, and proxy options.

17

Google Hotels Scraper

scrapapi/google-hotels-scraper

Google Hotels Scraper extracts hotel listings from Google Hotels search results. It collects hotel names, prices, ratings, reviews, locations, amenities, and booking links. Ideal for travel research, price monitoring, market analysis, and building hotel datasets.

Fast Booking Scraper

voyager/fast-booking-scraper

Scrape Booking with this hotel scraper and get data about accommodation on Booking.com. Extract data by keywords or URLs for hotel prices, ratings, location, number of reviews, stars. Scrape and download data from Booking.com in JSON, Excel, HTML ,and CSV.

1.5K

2.3

Booking Scraper

voyager/booking-scraper

Scrape Booking with this hotels scraper and get data about accommodation on Booking.com. You can crawl by keywords or URLs for hotel prices, ratings, addresses, number of reviews, stars. You can also download all that room and hotel data from Booking.com with a few clicks: CSV, JSON, HTML, and Excel

7.4K

4.7

Booking Airport Taxis Scraper

voyager/booking-airport-taxis-scraper

Simplify your search for airport taxi services with our Booking Airport Taxis Scraper. Easily compare prices, services, and car types to find the best option for your needs.

Booking Explorer ๐Ÿพ

jupri/booking-hotels

๐Ÿ’ซ Scrape Booking.com Hotels