← Blog

Claude AI + Apify: How to Combine Them

2026-09-03 · 5 min read · SubToAPI Team

What people actually mean by "Claude AI Apify"

If you searched this, you're probably trying to do one of three things: find an Apify Store actor that already uses Claude to process scraped data, build your own Apify actor that calls the Claude API, or figure out whether Apify has some native Claude integration. The short answer is: Apify is a web scraping and automation platform, Claude is Anthropic's AI model, and there's no built-in bridge between them — but combining them is common and straightforward once you understand where the pieces connect.

Apify runs "actors" — serverless scraping/automation jobs written in JavaScript or Python, deployed on Apify's cloud, often scheduled or triggered via API. A growing number of actors in the Apify Store use an LLM to clean, summarize, classify, or extract structured data from whatever the actor just scraped. Some of those actors use OpenAI models, some let you plug in any provider, and a smaller number are built specifically around Claude because of its long context window and strong instruction-following on messy HTML/text.

The two real paths

Path 1: Use an existing actor. Search the Apify Store for actors tagged "Claude" or "Anthropic" — these typically scrape a page or dataset, then pass the content to Claude with a prompt template, and return structured JSON. You configure it with your own Anthropic API key in the actor's input schema, run it, and get results back through Apify's dataset API. This is the fastest route if your use case is generic (summarizing articles, extracting product data, sentiment tagging).

Path 2: Build your own actor. If you need custom logic — a specific prompt chain, tool use, multi-step reasoning over scraped data — you write the actor yourself. Apify actors are just Node.js or Python programs with access to Actor.getInput(), Actor.pushData(), and a proxy/crawler layer for the scraping part. You add a Claude API call wherever you need the AI step.

A minimal Claude call inside an Apify actor

Here's the shape of it in Node.js, stripped down to the relevant part:

import { Actor } from 'apify';
import { CheerioCrawler } from 'crawlee';

await Actor.init();

const { startUrls } = await Actor.getInput();

const crawler = new CheerioCrawler({
  async requestHandler({ request, $, }) {
    const pageText = $('body').text().slice(0, 8000);

    const response = await fetch('https://api.anthropic.com/v1/messages', {
      method: 'POST',
      headers: {
        'x-api-key': process.env.ANTHROPIC_API_KEY,
        'anthropic-version': '2023-06-01',
        'content-type': 'application/json',
      },
      body: JSON.stringify({
        model: 'claude-sonnet-4-5',
        max_tokens: 1024,
        messages: [
          { role: 'user', content: `Extract product name, price, and availability as JSON:\n\n${pageText}` }
        ],
      }),
    });

    const data = await response.json();
    await Actor.pushData({ url: request.url, extraction: data.content[0].text });
  },
});

await crawler.run(startUrls);
await Actor.exit();

That's the whole pattern: scrape with Apify's crawler, hand the text to Claude, push the structured result to the dataset. The actor just needs ANTHROPIC_API_KEY (or equivalent) set as an environment variable in the Apify console.

Where this gets messy at scale

The pattern above works fine for a handful of runs. It gets harder once you're running actors on a schedule, across a team, against hundreds of pages per run:

This is the kind of problem SubToAPI is built for. Instead of hardcoding a single shared Anthropic key everywhere, you generate per-project or per-actor keys (sub_live_...) from one dashboard, point your actors at https://api.subtoapi.app/v1/messages with the same request/response shape Anthropic uses, and get per-key usage metadata so you can see exactly what each actor or team member is consuming. Streaming and tool use work the same way as the direct API, so switching an existing actor over is usually a one-line change to the base URL and auth header — see /docs/quickstart and /docs/streaming for the exact request format.

curl https://api.subtoapi.app/v1/messages \
  -H "Authorization: Bearer $SUBTOAPI_KEY" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-sonnet-4-5",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Summarize this scraped page..."}]
  }'

If you're running scraping pipelines for a client or an internal team, giving each actor or engineer its own scoped key with visible usage is a much cleaner setup than one shared secret in an env variable nobody remembers to rotate. Plans start at Solo €9/month, with Team and Scale tiers for shared seats — see /pricing.

If your goal is tool use, not just extraction

Some Apify + Claude setups go further than summarization — the actor scrapes a set of pages, then Claude decides which pages to re-scrape or what follow-up queries to run, using Claude's tool-use feature to call back into the actor's own functions (a "fetch_page" tool, a "search" tool, etc.). If you're building that kind of agentic scraping loop, read /docs/tools for the request/response schema before wiring it into your actor's control flow — tool calls need to round-trip correctly with the actor's async job model.

questions

Does Apify have a native Claude integration? No. Apify doesn't ship a first-party Claude connector. You either use a community actor from the Apify Store that calls Claude internally, or you add the API call yourself inside a custom actor.

Can I use Claude to process data after Apify scrapes it, without writing an actor? Yes — export the Apify dataset via its API or webhook, then run a separate script or service that reads the dataset and sends it to Claude. This decouples scraping from AI processing, which is often easier to debug than doing both in one actor.

Is Claude better than other models for scraped-data extraction? It depends on the task, but Claude's long context window is useful for large pages you don't want to truncate, and its instruction-following tends to hold up well on messy, inconsistent HTML-derived text where strict JSON output matters.

Turn your Claude access into an HTTPS API

SubToAPI gives you application API keys, streaming, tool use and usage insights on top of your existing Claude access — set up in minutes.

Start free  Read the quickstart →