Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Serper

Scalekit connector
Open markdown

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

Tools
13
What they doRead · write · destructive
13 · 0 · 013 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 Serper connection

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

    Each user opens the link once and enters their Serper 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
  • serper_autocompleteGet Google's autocomplete suggestions for a partial query through Serper.Read-only

    Google Autocomplete

    Get Google's autocomplete suggestions for a partial query through Serper. Returns suggestions, each with the suggested query as value. Use this to expand or refine a search query, or for keyword research. Use serper_search to run the search itself.

    Inputs

    qstringrequired
    The partial query to complete, as you would type it into Google. Google search operators such as site:, filetype: and quotes work. Example: how to build your own
    glstring
    Two-letter country code (Google's gl parameter, lowercase) that sets which country's Google results to return. Serper uses us when omitted. Example: gb
    hlstring
    Google interface language code (Google's hl parameter) for the results, usually a two-letter language code, or language-region for a few languages such as zh-cn. Serper uses en when omitted. Example: fr
    locationstring
    Place to run the search from, as a Google location name (city, region or country, comma-separated, most specific first). Results are localized as if searched from there. Example: Austin, Texas, United States
  • serper_list_place_reviewsList the Google reviews of one place through Serper, identified by its cid, fid or Place ID.Read-only

    List Place Reviews

    List the Google reviews of one place through Serper, identified by its cid, fid or Place ID. Returns a page of reviews (rating, date, review text and reviewer) and a nextPageToken when more reviews exist. Use this after serper_search_places or serper_search_maps, which return each place's cid and placeId. Pass next_page_token to get the next page.

    Inputs

    cidstring
    Google CID of the place, from the cid field of serper_search_places or serper_search_maps. Provide cid, fid or place_id. Example: 10179360708466590899
    fidstring
    Google FID (feature identification number) of the place, written as two hex numbers separated by a colon. Provide cid, fid or place_id. Example: 0x89c259a61c75684f:0x79d31adb123348d2
    glstring
    Two-letter country code (Google's gl parameter, lowercase) that sets which country's Google results to return. Serper uses us when omitted. Example: gb
    hlstring
    Google interface language code (Google's hl parameter) for the results, usually a two-letter language code, or language-region for a few languages such as zh-cn. Serper uses en when omitted. Example: fr
    next_page_tokenstring
    The nextPageToken from the previous call for the same place, to get the next page of reviews. Omit for the first page.
    place_idstring
    Google Place ID of the place, from the placeId field of serper_search_maps. Provide cid, fid or place_id. Example: ChIJOwg_06VPwokRYv534QaPC8g
    sort_bystring
    Review order: mostRelevant (Google's default), newest, highestRating or lowestRating.one of mostRelevantnewesthighestRatinglowestRating
    topic_idstring
    ID of a review topic to show only reviews that mention it (for example "service" or "price"), as returned with an earlier page of reviews for the same place.
  • serper_scrape_webpageFetch a public webpage through Serper's scraper and get its readable content.Read-only

    Scrape Webpage

    Fetch a public webpage through Serper's scraper and get its readable content. Returns the page text, page metadata and the credits the scrape used, plus the content as markdown when include_markdown is true. Use this to read a page found with serper_search or another search tool. Most pages cost 2 credits; hard-to-scrape pages cost 6 or 10.

    Inputs

    urlstringrequired
    Full URL of the public webpage to scrape, including https://. Example: https://en.wikipedia.org/wiki/Web_scraping
    include_markdownboolean
    Set true to also get the page content as markdown (keeps headings, lists and links), in addition to plain text.
  • serper_search_by_imageRun a Google Lens reverse image search through Serper on a public image URL.Read-only

    Google Lens Image Search

    Run a Google Lens reverse image search through Serper on a public image URL. Returns Google Lens visual matches as JSON: pages that show the same or similar images, each with title, source, link and image URLs. Use this to identify an image or find where it appears online. Use serper_search_images to find images from a text query. Costs 3 credits per call.

    Inputs

    urlstringrequired
    Public URL of the image to analyse, ending in a supported format such as .jpg or .png. The image must be reachable without login. Example: https://upload.wikimedia.org/wikipedia/commons/3/3a/Cat03.jpg
    glstring
    Two-letter country code (Google's gl parameter, lowercase) that sets which country's Google results to return. Serper uses us when omitted. Example: gb
    hlstring
    Google interface language code (Google's hl parameter) for the results, usually a two-letter language code, or language-region for a few languages such as zh-cn. Serper uses en when omitted. Example: fr
  • serper_search_imagesSearch Google Images through Serper.Read-only

    Google Images Search

    Search Google Images through Serper. Returns images with title, full-size imageUrl and its width and height, thumbnailUrl, source site, domain, link to the hosting page and position. Use this to find images by text. Use serper_search_by_image to find matches for an image you already have.

    Inputs

    qstringrequired
    The search query, as you would type it into Google. Google search operators such as site:, filetype: and quotes work. Example: golden gate bridge at sunset
    glstring
    Two-letter country code (Google's gl parameter, lowercase) that sets which country's Google results to return. Serper uses us when omitted. Example: gb
    hlstring
    Google interface language code (Google's hl parameter) for the results, usually a two-letter language code, or language-region for a few languages such as zh-cn. Serper uses en when omitted. Example: fr
    locationstring
    Place to run the search from, as a Google location name (city, region or country, comma-separated, most specific first). Results are localized as if searched from there. Example: Austin, Texas, United States
    numinteger
    How many images to return: 10 or 100. Serper returns 10 when omitted; 100 costs 2 credits instead of 1.one of 10100
    pageinteger
    Results page to return, starting at 1. Each page is a separate call and costs credits again. Example: 2
    tbsstring
    Limit results to a recent time range (Google's tbs parameter): qdr:h past hour, qdr:d past 24 hours, qdr:w past week, qdr:m past month, qdr:y past year. Omit for any time.one of qdr:hqdr:dqdr:wqdr:mqdr:y
  • serper_search_mapsSearch Google Maps through Serper, around a map position or for one place by its Place ID or CID.Read-only

    Google Maps Search

    Search Google Maps through Serper, around a map position or for one place by its Place ID or CID. Returns the map position used (ll) and places with title, address, latitude, longitude, rating, ratingCount, type, types, website, phoneNumber, description, cid and placeId. Use this for Maps listings in a specific area or to look up a known place. Use serper_search_places for a simpler local search, and serper_list_place_reviews for a place's reviews. Costs 3 credits per call.

    Inputs

    cidstring
    Google CID (customer identification number) of one business listing to look up, as returned in the cid field of serper_search_places or serper_search_maps results. Example: 10179360708466590899
    hlstring
    Google interface language code (Google's hl parameter) for the results, usually a two-letter language code, or language-region for a few languages such as zh-cn. Serper uses en when omitted. Example: fr
    llstring
    Map position to search around, as @latitude,longitude,zoom with a zoom level from 3z to 21z, in Google Maps URL format. Example: @40.6973709,-74.1444871,11z
    pageinteger
    Results page to return, starting at 1. Each page is a separate call and costs credits again. Example: 2
    place_idstring
    Google Place ID of one place to look up instead of searching. Example: ChIJOwg_06VPwokRYv534QaPC8g
    qstring
    What to search for on Google Maps. Required unless place_id or cid identifies the place. Example: shops near 5th avenue
  • serper_search_newsSearch Google News through Serper for articles matching a query.Read-only

    Google News Search

    Search Google News through Serper for articles matching a query. Returns news results with title, link, snippet, source, relative date, thumbnail imageUrl and position. Use this for recent coverage of a topic, optionally limited with tbs (for example the past 24 hours). Use serper_search for general web pages.

    Inputs

    qstringrequired
    The search query, as you would type it into Google. Google search operators such as site:, filetype: and quotes work. Example: OpenAI funding round
    glstring
    Two-letter country code (Google's gl parameter, lowercase) that sets which country's Google results to return. Serper uses us when omitted. Example: gb
    hlstring
    Google interface language code (Google's hl parameter) for the results, usually a two-letter language code, or language-region for a few languages such as zh-cn. Serper uses en when omitted. Example: fr
    locationstring
    Place to run the search from, as a Google location name (city, region or country, comma-separated, most specific first). Results are localized as if searched from there. Example: Austin, Texas, United States
    pageinteger
    Results page to return, starting at 1. Each page is a separate call and costs credits again. Example: 2
    tbsstring
    Limit results to a recent time range (Google's tbs parameter): qdr:h past hour, qdr:d past 24 hours, qdr:w past week, qdr:m past month, qdr:y past year. Omit for any time.one of qdr:hqdr:dqdr:wqdr:mqdr:y