Groundlink API reference

One endpoint does the work: give it a query, get back verified, citable results. The API is plain HTTPS + JSON, CORS-enabled, and authenticated with a Bearer API key. This page is the complete reference — no SDK is required (and none is claimed).

Base URL

https://9ea69cec60fa01f65bbb647a092bcbb4.ctonew.app

Auth

Authorization: Bearer glk_…

Pricing

Pay-per-query micro-fees (indicative: from under one cent per query) · free tier for testing · prepaid credits

Endpoint

POST /api/v1/ground

Grounds a query. Returns top verified results with real URLs, snippets, and source labels — ready to be cited by a model. Sources for v1: Wikipedia and DuckDuckGo Instant Answer.

Request

FieldTypeRequiredDescription
querystringYesThe natural-language query to ground (trimmed; must be non-empty).
max_resultsintegerNoResults to return. Default 5, clamped to 1–10.

Example request

curl -X POST https://9ea69cec60fa01f65bbb647a092bcbb4.ctonew.app/api/v1/ground \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer glk_YOUR_API_KEY" \
  -d '{"query": "James Webb Space Telescope", "max_results": 3}'

Example response — HTTP 200

{
  "query": "James Webb Space Telescope",
  "results": [
    {
      "title": "James Webb Space Telescope",
      "url": "https://en.wikipedia.org/wiki/James_Webb_Space_Telescope",
      "snippet": "The James Webb Space Telescope (JWST) is a space
telescope designed to conduct infrared astronomy. It is the
largest telescope in space…",
      "source": "wikipedia"
    },
    {
      "title": "James Webb Space Telescope Category",
      "url": "https://duckduckgo.com/c/James_Webb_Space_Telescope",
      "snippet": "James Webb Space Telescope Category",
      "source": "duckduckgo"
    },
    {
      "title": "Timeline of the James Webb Space Telescope",
      "url": "https://en.wikipedia.org/wiki/Timeline_of_the_James_Webb_Space_Telescope",
      "snippet": "The James Webb Space Telescope (JWST) is an international
21st-century space observatory that was launched on 25 December 2021…",
      "source": "wikipedia"
    }
  ],
  "meta": {
    "request_id": "7b36dfd4-3ca3-408c-9791-96c1bf2e4603",
    "result_count": 3,
    "processing_ms": 500
  }
}

Every result carries title, url, snippet, and source. meta includes a request_id, the result count, and processing time. Each successful call increments the calling key's usage meter.

Endpoint

GET /api/v1/usage

Returns the calling key's meter: total successful /ground calls and the last call time. Same Bearer auth as /ground. This endpoint only reads the meter — it never increments it.

Example request

curl https://9ea69cec60fa01f65bbb647a092bcbb4.ctonew.app/api/v1/usage \
  -H "Authorization: Bearer glk_YOUR_API_KEY"

Example response — HTTP 200

{
  "key": "glk_1b1a4fda0eee05d8796eb8ed0fde9859",
  "calls": 42,
  "last_call_at": "2026-08-18T22:12:17.520Z"
}

Reference

Errors

Errors use a consistent shape, and the status code always carries the error type:

{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." } }
StatusCodeWhen
400invalid_requestMalformed JSON body, missing or empty `query`, or a non-numeric `max_results`.
401unauthorizedMissing or invalid API key in the Authorization header.
500internalUnexpected server error. Retry, then contact us if it persists.
502search_unavailableSearch sources are temporarily unavailable. Retry shortly.

Guides

Integration examples

Groundlink is a plain HTTP API, so it plugs into any tool-calling loop. These examples follow each platform's public tool-calling formats. There is no official Groundlink SDK yet — these are illustrative snippets, not a shipped client library.

OpenAI function calling

// 1. Advertise the tool to the model (standard OpenAI function calling)
const tools = [{
  type: "function",
  function: {
    name: "ground_search",
    description: "Search Groundlink for verified, citable web results.",
    parameters: {
      type: "object",
      properties: {
        query: {
          type: "string",
          description: "The natural-language query to ground."
        },
        max_results: {
          type: "integer", minimum: 1, maximum: 10,
          description: "Number of results to return (default 5)."
        }
      },
      required: ["query"]
    }
  }
}];

// 2. When the model emits a tool_call for ground_search, call the API
async function groundSearch(query, maxResults = 5) {
  const res = await fetch("https://9ea69cec60fa01f65bbb647a092bcbb4.ctonew.app/api/v1/ground", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "Authorization": "Bearer glk_YOUR_API_KEY"
    },
    body: JSON.stringify({ query, max_results: maxResults })
  });
  return res.json(); // { query, results: [{title,url,snippet,source}], meta }
}

// 3. Return the result to the model in a "tool" role message.
//    The model then answers using results[].url as citations.
const toolResult = await groundSearch("James Webb Space Telescope");
messages.push({
  role: "tool",
  tool_call_id: toolCall.id,
  content: JSON.stringify(toolResult)
});

Anthropic tool use

// Anthropic tool use (Claude) — same idea, tool-use shape
const tools = [{
  name: "ground_search",
  description: "Search Groundlink for verified, citable web results.",
  input_schema: {
    type: "object",
    properties: {
      query: {
        type: "string",
        description: "The natural-language query to ground."
      },
      max_results: { type: "integer", minimum: 1, maximum: 10 }
    },
    required: ["query"]
  }
}];

// When the response has stop_reason === "tool_use", find the block:
const toolUse = message.content.find((b) => b.type === "tool_use");

const res = await fetch("https://9ea69cec60fa01f65bbb647a092bcbb4.ctonew.app/api/v1/ground", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer glk_YOUR_API_KEY"
  },
  body: JSON.stringify({
    query: toolUse.input.query,
    max_results: toolUse.input.max_results ?? 5
  })
});
const json = await res.json();

// Reply with the tool_result so Claude can cite the URLs:
messages.push({
  role: "user",
  content: [{
    type: "tool_result",
    tool_use_id: toolUse.id,
    content: JSON.stringify(json)
  }]
});

MCP (illustrative)

// Illustrative MCP server — Groundlink has no official SDK or MCP package
// yet. The API is plain HTTPS + JSON, so any MCP transport can wrap it:
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { z } from "zod";

const server = new McpServer({ name: "groundlink", version: "0.1.0" });

server.tool(
  "ground_search",
  {
    query: z.string().describe("The natural-language query to ground."),
    max_results: z.number().int().min(1).max(10).optional()
  },
  async ({ query, max_results }) => {
    const res = await fetch("https://9ea69cec60fa01f65bbb647a092bcbb4.ctonew.app/api/v1/ground", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "Authorization": "Bearer glk_YOUR_API_KEY"
      },
      body: JSON.stringify({ query, max_results })
    });
    const data = await res.json();
    return { content: [{ type: "text", text: JSON.stringify(data) }] };
  }
);

Questions? Groundlink is early — docs and API will evolve.