Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to ScrapingBee

Scalekit connector
Open markdown

The ScrapingBee connector lets your AI agent act in each user's ScrapingBee account. Each user connects their own ScrapingBee API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 19 tools.

Tools
19
What they doRead · write · destructive
1 · 18 · 01 read18 write0 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the ScrapingBee connection

    In AgentKit > Connections, create a ScrapingBee connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'scrapingbee'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize ScrapingBee:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'scrapingbee_usage_get',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their ScrapingBee credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • scrapingbee_usage_getGet the ScrapingBee account's API credit and concurrency usage for the current billing period, in real time.Read-only

    Get Account Usage

    Get the ScrapingBee account's API credit and concurrency usage for the current billing period, in real time. Returns max_api_credit, used_api_credit, max_concurrency, current_concurrency and renewal_subscription_date. Use scrapingbee_usage_get before a large job to check remaining credits. It spends no credits but is limited to 6 calls per minute.

    Inputs

    This tool takes no inputs.

  • scrapingbee_amazon_pricing_getGet the seller offers and prices for one Amazon product by ASIN as structured JSON.Write

    Get Amazon Product Offers

    Get the seller offers and prices for one Amazon product by ASIN as structured JSON. Returns each offer's price, currency, condition, seller, shipping and delivery details. Use scrapingbee_amazon_pricing_get to compare sellers. Use scrapingbee_amazon_product_get for the product's description, images and reviews. Costs 5 credits for a light request, 15 otherwise.

    • Idempotent

    Inputs

    asinstringrequired
    The product's 10-character ASIN, from an Amazon product URL or scrapingbee_amazon_search. Example: B0DPDRNSXV.
    countrystring
    Two-letter country code for the location of the request. Example: us.
    currencystring
    ISO 4217 currency code to show prices in. Example: USD.
    devicestring
    Device to emulate: desktop (default), mobile or tablet. Example: mobile.one of desktopmobiletablet
    domainstring
    Amazon top-level domain to use, such as com, co.uk, de or fr (default com). Example: co.uk.
    languagestring
    Language code for the page, in ISO format. Example: en_US.
    light_requestboolean
    Leave empty or true for a fast light request (5 credits); set false to force a JavaScript-rendered request (15 credits), for example to get reviews or other dynamic content. Example: false.
    zip_codestring
    ZIP or postal code to localize prices and delivery. Example: 10001.
  • scrapingbee_amazon_product_getGet one Amazon product's details by ASIN as structured JSON.Write

    Get Amazon Product

    Get one Amazon product's details by ASIN as structured JSON. Returns title, brand, price, currency, rating, review count, availability, description, bullet points, images, variants, categories and top reviews. Use scrapingbee_amazon_product_get after scrapingbee_amazon_search. Use scrapingbee_amazon_pricing_get to compare the product's offers from different sellers. Costs 5 credits for a light request, 15 otherwise.

    • Idempotent

    Inputs

    querystringrequired
    The product's 10-character ASIN, from an Amazon product URL or scrapingbee_amazon_search. Example: B0DPDRNSXV.
    autoselect_variantboolean
    Set true to auto-select the product's default variant. Example: true.
    countrystring
    Two-letter country code for the location of the request. Example: us.
    currencystring
    ISO 4217 currency code to show prices in. Example: USD.
    devicestring
    Device to emulate: desktop (default), mobile or tablet. Example: mobile.one of desktopmobiletablet
    domainstring
    Amazon top-level domain to use, such as com, co.uk, de or fr (default com). Example: co.uk.
    languagestring
    Language code for the page, in ISO format. Example: en_US.
    light_requestboolean
    Leave empty or true for a fast light request (5 credits); set false to force a JavaScript-rendered request (15 credits), for example to get reviews or other dynamic content. Example: false.
    zip_codestring
    ZIP or postal code to localize prices and delivery. Example: 10001.
  • scrapingbee_chatgpt_promptSend a prompt to ChatGPT through ScrapingBee, optionally with web search, and return its answer.Write

    Ask ChatGPT

    Send a prompt to ChatGPT through ScrapingBee, optionally with web search, and return its answer. Returns results_markdown, results_text and results_json (the answer as Markdown, plain text and parsed blocks), llm_model and the prompt. Use scrapingbee_chatgpt_prompt to see how ChatGPT answers a question. Use scrapingbee_google_search or scrapingbee_page_ai_query to get facts from search results or a specific page. Costs 15 credits per call.

    • Idempotent

    Inputs

    promptstringrequired
    The prompt to send to ChatGPT. Example: Explain the benefits of renewable energy in 100 words.
    country_codestring
    Two-letter country code to send the request from. Example: us.
    searchboolean
    Set true to let ChatGPT search the web while answering. Example: true.
  • scrapingbee_page_ai_extractFetch a web page and have AI extract fields you describe in plain language.Write

    Extract Page Data with AI

    Fetch a web page and have AI extract fields you describe in plain language. Returns a JSON object with one key per rule, typed as the rule asks (string, number, boolean, list or nested item). Use scrapingbee_page_ai_extract when selectors are unknown or change between pages. Use scrapingbee_page_data_extract when you have stable selectors, and scrapingbee_page_ai_query for a single free-form question. Adds 5 credits to the normal page cost (10 credits by default).

    • Idempotent

    Inputs

    ai_extract_rulesstringrequired
    AI extraction rules as a JSON string. Each key is an output field name and each value describes in plain words what to extract, or is an object with description, type (string, number, boolean, list or item), optional enum and, for item, an output object of sub-fields. Example: {"name": "the product name", "price": {"description": "the product price in dollars", "type": "number"}}.
    urlstringrequired
    Full URL of the page to fetch, including http:// or https://. Example: https://www.scrapingbee.com/blog/.
    ai_selectorstring
    CSS selector of the part of the page the AI should read, to improve accuracy and speed. Example: #product-details.
    block_adsboolean
    Set true to block ads while the page loads. Example: true.
    country_codestring
    Two-letter ISO 3166-1 country code of the proxy to send the request from, such as us, de or gb. Works with classic, premium and stealth proxies; each has its own supported list (https://www.scrapingbee.com/documentation/country_codes/). Example: de.
    devicestring
    Device type to emulate: desktop (default) or mobile. Example: mobile.one of desktopmobile
    premium_proxyboolean
    Set true to route the request through residential premium proxies for sites that block the classic pool. Costs 25 credits with JavaScript rendering, 10 without. Example: true.
    render_jsboolean
    Set false to fetch the page without a headless browser (1 credit instead of 5, faster, but no JavaScript runs). Leave empty for the default, true. Example: false.
    session_idinteger
    Any integer from 0 to 10000000. Requests that share a session_id go out through the same IP address for 5 minutes. Example: 4521.
    stealth_proxyboolean
    Set true to use the stealth proxy pool for the hardest sites, when premium_proxy is not enough. Needs JavaScript rendering, costs 75 credits, and ignores the timeout input. Example: true.
    timeoutinteger
    Maximum time in milliseconds, 1000 to 140000 (default 140000), that ScrapingBee may spend on the request. Keep it under 110000 so the result arrives before the tool call times out. Example: 60000.
    waitinteger
    Extra time in milliseconds, 0 to 35000, to let the page's JavaScript finish before the result is returned. Example: 3000.
    wait_browserstring
    Browser event to wait for: domcontentloaded (default), load, networkidle0 (no open connections for 500 ms) or networkidle2 (at most 2 for 500 ms). Example: load.one of domcontentloadedloadnetworkidle0networkidle2
    wait_forstring
    CSS selector, or XPath starting with /, of an element to wait for before the result is returned. Example: .product-list.