Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to OpenGraph.io

Scalekit connector
Open markdown

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

Tools
8
What they doRead · write · destructive
5 · 3 · 05 read3 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 OpenGraph.io connection

    In AgentKit > Connections, create an OpenGraph.io 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 = 'opengraphio'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize OpenGraph.io:', 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: 'opengraphio_markdown_get',
    toolInput: { encoded_url: 'https%3A%2F%2Fgithub.com' },
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their OpenGraph.io 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
  • opengraphio_markdown_getConvert a web page into clean Markdown, optionally chunked for embeddings or filtered to passages matching a question.Read-only

    Get Page as Markdown

    Convert a web page into clean Markdown, optionally chunked for embeddings or filtered to passages matching a question. Returns the Markdown as text, or with format json an envelope with markdown, metadata, chunks, headings, links and images. Use this to read a page's content. Use opengraphio_scrape_html for raw HTML or opengraphio_query for an AI answer.

    Inputs

    encoded_urlstringrequired
    Target page URL, URL-encoded as one path segment (encode : as %3A and / as %2F, as JavaScript encodeURIComponent does). Send the encoded form, not the raw URL. Example: https%3A%2F%2Fgithub.com.
    accept_langstring
    Accept-Language header sent to the page. Defaults to en-US. Example: en-US.
    ai_sanitizeboolean
    Scan the page for prompt-injection text (1 extra credit). Defaults to false. Example: false.
    ai_sanitize_modestring
    What to do when ai_sanitize finds something: sanitize (strip it, the default), warn or block. Example: sanitize.one of sanitizewarnblock
    auto_proxyboolean
    Let OpenGraph.io pick the best proxy for the target domain. Defaults to true. Example: true.
    auto_renderboolean
    Let OpenGraph.io turn on JavaScript rendering when the page needs it. Defaults to true. Example: true.
    cache_okboolean
    Allow a cached result. Defaults to true; set false to force a fresh fetch. Example: true.
    chunk_overlapinteger
    Characters repeated from the end of the previous chunk, at most half of chunk_size. Defaults to 0. Example: 200.
    chunk_sizeinteger
    Target chunk size in characters, 200 to 20000. Defaults to 2000. Example: 2000.
    chunkingboolean
    Split the document into chunks for a vector database. Needs format json. Defaults to false. Example: false.
    exclude_tagsstring
    Comma-separated CSS selectors to drop. Example: nav,.sidebar,footer.
    formatstring
    markdown (default, plain Markdown text) or json (an envelope with metadata and optional chunks). Use json for chunking, headings, links or images. Example: json.one of markdownjson
    full_renderboolean
    Always render the page in a headless browser before reading it, for single-page apps. Defaults to false; adds time and credits. Example: false.
    include_headingsboolean
    Return the heading outline and counts of tables and code blocks (format json). Defaults to false. Example: false.
    include_imagesboolean
    Return every image with its source and alt text (format json). Defaults to false. Example: false.
    include_linksboolean
    Return every link in the main content as an absolute URL (format json). Defaults to false. Example: false.
    include_tagsstring
    Comma-separated CSS selectors to keep. Example: article,main.
    max_charsinteger
    Maximum Markdown length in characters. Example: 20000.
    only_main_contentboolean
    Drop navigation, sidebars and footers. Defaults to true. Example: true.
    proxy_countrystring
    Two-letter country code to fetch from when a proxy is used. Example: US.
    querystring
    Keywords or a question to keep only the matching passages (keyword matching, no AI cost), up to 512 characters. Example: pricing plans.
    query_top_kinteger
    Number of matching passages to return with query. Defaults to 5. Example: 5.
    retryboolean
    Retry a failed fetch, escalating to stronger proxy tiers. Defaults to true; you are billed only for the tier that succeeds. Example: true.
    use_premiumboolean
    Fetch through a residential proxy (needs a plan that includes it). Defaults to false. Example: false.
    use_proxyboolean
    Fetch through a standard datacenter proxy. Defaults to false. Example: false.
    use_superiorboolean
    Fetch through a mobile proxy, the highest success rate (needs a plan that includes it). Defaults to false. Example: false.
  • opengraphio_oembed_getGet an oEmbed embed for any URL: the provider's native embed (YouTube, Vimeo and others) or a hosted OpenGraph.io preview card.Read-only

    Get oEmbed

    Get an oEmbed embed for any URL: the provider's native embed (YouTube, Vimeo and others) or a hosted OpenGraph.io preview card. Returns oEmbed fields (type, html, width, height, title, provider_name, thumbnail_url) and source (native, discovery or og_frame). Use this to embed a link in a page. Use opengraphio_site_get for the raw metadata.

    Inputs

    urlstringrequired
    Full URL to embed (not encoded). Example: https://www.youtube.com/watch?v=dQw4w9WgXcQ.
    always_og_frameboolean
    Always return a hosted OpenGraph.io card, even when a native embed exists. Defaults to false. Example: false.
    auto_proxyboolean
    Let OpenGraph.io pick the best proxy for the target domain. Defaults to true. Example: true.
    auto_renderboolean
    Let OpenGraph.io turn on JavaScript rendering when the page needs it. Defaults to true. Example: true.
    cache_okboolean
    Allow a cached result. Defaults to true; set false to force a fresh fetch. Example: true.
    full_renderboolean
    Always render the page in a headless browser before reading it, for single-page apps. Defaults to false; adds time and credits. Example: false.
    max_cache_ageinteger
    Maximum age of cached page metadata in milliseconds. Defaults to 432000000. Example: 432000.
    maxheightinteger
    Maximum embed height in pixels. Example: 480.
    maxwidthinteger
    Maximum embed width in pixels. Example: 640.
    orientationstring
    Fallback card orientation: vertical (800x600, the default) or horizontal (400x150). Example: vertical.one of verticalhorizontal
    proxy_countrystring
    Two-letter country code to fetch from when a proxy is used. Example: US.
    retryboolean
    Retry a failed fetch, escalating to stronger proxy tiers. Defaults to true; you are billed only for the tier that succeeds. Example: true.
    templatestring
    Fallback card layout: default, compact or horizontal. Overrides orientation. Example: compact.one of defaultcompacthorizontal
    themestring
    Fallback card colour scheme: light, dark or auto (the default). Example: auto.one of lightdarkauto
    use_premiumboolean
    Fetch through a residential proxy (needs a plan that includes it). Defaults to false. Example: false.
    use_proxyboolean
    Fetch through a standard datacenter proxy. Defaults to false. Example: false.
    use_superiorboolean
    Fetch through a mobile proxy, the highest success rate (needs a plan that includes it). Defaults to false. Example: false.
  • opengraphio_scrape_htmlFetch the raw HTML of a web page, with optional JavaScript rendering and proxies.Read-only

    Scrape Page HTML

    Fetch the raw HTML of a web page, with optional JavaScript rendering and proxies. Returns the page HTML as text. Use this when you need the markup. Use opengraphio_markdown_get for clean text or opengraphio_extract for chosen elements.

    Inputs

    encoded_urlstringrequired
    Target page URL, URL-encoded as one path segment (encode : as %3A and / as %2F, as JavaScript encodeURIComponent does). Send the encoded form, not the raw URL. Example: https%3A%2F%2Fgithub.com.
    accept_langstring
    Accept-Language header sent to the page. Defaults to en-US. Example: en-US.
    auto_proxyboolean
    Let OpenGraph.io pick the best proxy for the target domain. Defaults to true. Example: true.
    auto_renderboolean
    Let OpenGraph.io turn on JavaScript rendering when the page needs it. Defaults to true. Example: true.
    cache_okboolean
    Allow a cached result. Defaults to true; set false to force a fresh fetch. Example: true.
    full_renderboolean
    Always render the page in a headless browser before reading it, for single-page apps. Defaults to false; adds time and credits. Example: false.
    retryboolean
    Retry a failed fetch, escalating to stronger proxy tiers. Defaults to true; you are billed only for the tier that succeeds. Example: true.
    use_premiumboolean
    Fetch through a residential proxy (needs a plan that includes it). Defaults to false. Example: false.
    use_proxyboolean
    Fetch through a standard datacenter proxy. Defaults to false. Example: false.
    use_superiorboolean
    Fetch through a mobile proxy, the highest success rate (needs a plan that includes it). Defaults to false. Example: false.
  • opengraphio_screenshot_captureCapture a screenshot of a web page or one element on it.Read-only

    Capture Screenshot

    Capture a screenshot of a web page or one element on it. Returns screenshotUrl (a temporary image URL that expires after 24 hours), dimensions and requestInfo. Use this for a visual snapshot. Use opengraphio_site_get for the page's own preview image.

    Inputs

    encoded_urlstringrequired
    Target page URL, URL-encoded as one path segment (encode : as %3A and / as %2F, as JavaScript encodeURIComponent does). Send the encoded form, not the raw URL. Example: https%3A%2F%2Fgithub.com.
    block_cookie_bannerboolean
    Hide known cookie consent banners. Defaults to true. Example: true.
    cache_okboolean
    Allow a cached screenshot. Defaults to true. Example: true.
    capture_delayinteger
    Milliseconds to wait before capturing, 0 to 10000. Example: 1000.
    dark_modeboolean
    Set the browser to prefer dark mode. Defaults to false. Example: false.
    dimensionsstring
    Viewport size: xs (375x812 phone), sm (1024x768 tablet), md (1366x768 laptop, the default) or lg (1920x1080 desktop). Example: lg.one of xssmmdlg
    exclude_selectorsstring
    Comma-separated CSS selectors to hide before capturing. Example: .header,.footer.
    formatstring
    Image format. Defaults to jpeg. Example: png.one of jpegpngwebp
    full_pageboolean
    Capture the whole scrollable page instead of only the viewport. Defaults to false. Example: false.
    navigation_timeoutinteger
    Page navigation timeout in milliseconds, 1000 to 60000. Defaults to 30000. Example: 30000.
    qualityinteger
    Image quality from 10 to 80, rounded to the nearest 10. Defaults to 80. Example: 80.
    selectorstring
    CSS selector of a single element to capture. Example: .main-content.
    use_proxyboolean
    Fetch through a proxy for protected sites. Defaults to false. Example: false.
  • opengraphio_site_getUnfurl a URL: read its Open Graph tags, Twitter Card and HTML meta tags to build a link preview.Read-only

    Get Site Metadata (Unfurl)

    Unfurl a URL: read its Open Graph tags, Twitter Card and HTML meta tags to build a link preview. Returns hybridGraph (best merged title, description, image, url, site_name, type and favicon), openGraph, twitterCard, htmlInferred and requestInfo. Use this for link-preview metadata. Use opengraphio_markdown_get for the page text or opengraphio_scrape_html for raw HTML.

    Inputs

    encoded_urlstringrequired
    Target page URL, URL-encoded as one path segment (encode : as %3A and / as %2F, as JavaScript encodeURIComponent does). Send the encoded form, not the raw URL. Example: https%3A%2F%2Fgithub.com.
    accept_langstring
    Accept-Language header sent to the page. Defaults to en-US. Example: en-US.
    auto_proxyboolean
    Let OpenGraph.io pick the best proxy for the target domain. Defaults to true. Example: true.
    auto_renderboolean
    Let OpenGraph.io turn on JavaScript rendering when the page needs it. Defaults to true. Example: true.
    cache_okboolean
    Allow a cached result. Defaults to true; set false to force a fresh fetch. Example: true.
    full_renderboolean
    Always render the page in a headless browser before reading it, for single-page apps. Defaults to false; adds time and credits. Example: false.
    max_cache_ageinteger
    Maximum cache age in seconds. Defaults to 432000 (5 days). Example: 432000.
    proxy_countrystring
    Two-letter country code to fetch from when a proxy is used. Example: US.
    retryboolean
    Retry a failed fetch, escalating to stronger proxy tiers. Defaults to true; you are billed only for the tier that succeeds. Example: true.
    use_aiboolean
    Use AI to improve metadata extraction. Defaults to false. Example: false.
    use_premiumboolean
    Fetch through a residential proxy (needs a plan that includes it). Defaults to false. Example: false.
    use_proxyboolean
    Fetch through a standard datacenter proxy. Defaults to false. Example: false.
    use_superiorboolean
    Fetch through a mobile proxy, the highest success rate (needs a plan that includes it). Defaults to false. Example: false.
  • opengraphio_brand_analyzeAnalyze a company website and return its brand profile, reading several pages of the site.Write

    Analyze Brand

    Analyze a company website and return its brand profile, reading several pages of the site. Returns brand sections (such as identity, offering, audience, visual and links) and the answers to any custom questions, as JSON or Markdown. Use this to profile a company from its site. A fresh analysis can take tens of seconds.

    Inputs

    encoded_urlstringrequired
    Target page URL, URL-encoded as one path segment (encode : as %3A and / as %2F, as JavaScript encodeURIComponent does). Send the encoded form, not the raw URL. Example: https%3A%2F%2Fgithub.com.
    cache_okboolean
    Allow a cached analysis. Defaults to true; set false for a fresh run. Example: true.
    formatstring
    json (default) or markdown. Example: json.one of jsonmarkdown
    include_metaboolean
    Add a _meta object with the source of each field. Defaults to false. Example: false.
    questionsarray
    Up to 3 custom questions, each an object with a key, the question and a type such as string or string[]. Example: [{"key": "buying_triggers", "question": "What situations would make someone buy from this company?", "type": "string[]"}]
    sectionsobject
    Boolean flags keyed by section name; set a section to false to skip it. All sections are on by default. Example: {"visual": false, "links": false}
  • opengraphio_extractScrape a page and extract the elements you choose with CSS selectors, plus the concatenated text of common tags.Write

    Extract Page Elements

    Scrape a page and extract the elements you choose with CSS selectors, plus the concatenated text of common tags. Returns the extracted values keyed by your selector names, the tag items and concatenatedText. Use this for structured fields from a page. Use opengraphio_query to ask a question in plain language instead.

    Inputs

    sitestringrequired
    Full URL of the page to scrape (not encoded). Example: https://example.com/blog.
    auto_proxyboolean
    Let OpenGraph.io pick the best proxy for the target domain. Defaults to true. Example: true.
    auto_renderboolean
    Let OpenGraph.io turn on JavaScript rendering when the page needs it. Defaults to true. Example: true.
    cache_okboolean
    Allow a cached result. Defaults to true; set false to force a fresh fetch. Example: true.
    full_renderboolean
    Always render the page in a headless browser before reading it, for single-page apps. Defaults to false; adds time and credits. Example: false.
    html_elementsstring
    Comma-separated HTML tags used to build concatenatedText. Defaults to title,h1,h2,h3,h4,h5,p. Example: title,h1,p.
    load_more_clicksinteger
    How many times to click the load-more button, 1 to 10. Defaults to 3. Example: 3.
    load_more_selectorstring
    CSS selector of a Load more button to click before capturing; turns on JavaScript rendering. Example: button.load-more.
    max_cache_ageinteger
    Maximum cache age in seconds. Example: 432000.
    retryboolean
    Retry a failed fetch, escalating to stronger proxy tiers. Defaults to true; you are billed only for the tier that succeeds. Example: true.
    scroll_to_bottomboolean
    Scroll the whole page first to load lazy content; turns on JavaScript rendering. Defaults to false. Example: false.
    selectorsobject
    Map of your own keys to CSS selector settings. Each setting has a selector, multiple (true returns every match as a list), type (text, or attr for an attribute) and attr (the attribute name when type is attr). Example: {"title": {"selector": "h1", "type": "text"}, "links": {"selector": "a", "multiple": true, "type": "attr", "attr": "href"}}.
    use_premiumboolean
    Fetch through a residential proxy (needs a plan that includes it). Defaults to false. Example: false.
    use_proxyboolean
    Fetch through a standard datacenter proxy. Defaults to false. Example: false.
    use_superiorboolean
    Fetch through a mobile proxy, the highest success rate (needs a plan that includes it). Defaults to false. Example: false.
    wait_for_selectorstring
    CSS selector to wait for before capturing; turns on JavaScript rendering. Example: #content-loaded.
  • opengraphio_queryAsk an AI question about a web page and get the answer, optionally in a JSON shape you define.Write

    Ask a Question About a Page

    Ask an AI question about a web page and get the answer, optionally in a JSON shape you define. Returns answer (text, or an object matching your response structure) and requestInfo. Use this to pull an answer or summary from a page in plain language. Use opengraphio_extract for exact CSS-selected values. Each fresh answer costs 100 credits (nano) or 200 (mini).

    Inputs

    encoded_urlstringrequired
    Target page URL, URL-encoded as one path segment (encode : as %3A and / as %2F, as JavaScript encodeURIComponent does). Send the encoded form, not the raw URL. Example: https%3A%2F%2Fgithub.com.
    querystringrequired
    Question to ask about the page. Example: What products does this company sell?.
    auto_proxyboolean
    Let OpenGraph.io pick the best proxy for the target domain. Defaults to true. Example: true.
    auto_renderboolean
    Let OpenGraph.io turn on JavaScript rendering when the page needs it. Defaults to true. Example: true.
    cache_okboolean
    Allow a cached result. Defaults to true; set false to force a fresh fetch. Example: true.
    full_renderboolean
    Always render the page in a headless browser before reading it, for single-page apps. Defaults to false; adds time and credits. Example: false.
    model_sizestring
    AI model size: nano (default, 100 credits) or mini (larger, 200 credits). Example: nano.one of nanomini
    response_structureobject
    Optional JSON schema for a structured answer. Example: {"headline": "string", "products": ["string"]}
    retryboolean
    Retry a failed fetch, escalating to stronger proxy tiers. Defaults to true; you are billed only for the tier that succeeds. Example: true.
    use_premiumboolean
    Fetch through a residential proxy (needs a plan that includes it). Defaults to false. Example: false.
    use_proxyboolean
    Fetch through a standard datacenter proxy. Defaults to false. Example: false.
    use_superiorboolean
    Fetch through a mobile proxy, the highest success rate (needs a plan that includes it). Defaults to false. Example: false.