Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to SearchApi

Scalekit connector
Open markdown

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

Tools
60
What they doRead · write · destructive
60 · 0 · 060 read0 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 SearchApi connection

    In AgentKit > Connections, create a SearchApi 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 = 'searchapi'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize SearchApi:', 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: 'searchapi_account_get',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their SearchApi 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
  • searchapi_account_getGet your SearchApi account's usage for the month.Read-only

    Get Account Usage

    Get your SearchApi account's usage for the month. Returns current_month_usage, monthly_allowance, remaining_credits and remaining_searches. Use this to check remaining searches before large jobs.

    Inputs

    This tool takes no inputs.

  • searchapi_amazon_product_getGet one Amazon product's details by ASIN.Read-only

    Get Amazon Product

    Get one Amazon product's details by ASIN. Returns the product's title, brand, price, rating, reviews, features, specifications, variants, images and buybox. Use this after searchapi_amazon_search.

    Inputs

    asinstringrequired
    The asin parameter is used to specify the product you want to retrieve details for. It accepts an Amazon Standard Identification Number (ASIN), a unique identifier for products on Amazon. Example: B0CHX1W1XY.
    amazon_domainstring
    The default parameter amazon.com defines the Amazon domain of the search. Check the full list of supported Amazon domains. Example: amazon.com.
    currencystring
    The currency parameter is used to specify the currency of the prices displayed by Amazon (e.g. EUR). By default, it follows the domain or the delivery location specified. This parameter is not available for all domains, check the full list of domains and currencies. Example: USD.
    delivery_countrystring
    A two-letter ISO 3166-1 alpha-2 country code that defines the country of the delivery address. By default, it is set to the country code of the selected Amazon domain (e.g. de for amazon.de), you can also explicitly set it to a different country. Check the full list of supported Amazon delivery countries. Example: us.
    languagestring
    The language parameter is used to specify the display language of Amazon page. Check the full list of supported Amazon display languages. Example: en_US.
    postal_codestring
    Postal code for the delivery location. Use this for postal-code countries (e.g. 10001 for US, SW1A 0AA for UK, M5V 2T6 for CA). Check the list of supported Amazon postal codes by domain and format. The response reports the outcome in search_metadata.delivery_location: applied, not_applied, or unverified. Example: 10001.
    variant_pricesboolean
    Set this parameter to true to include the price of each product variant. Enabling it may increase the response time. Some products include variant prices by default, even without this parameter. Example: false.