Skip to main content
The Gravity Index is a discovery API that AI agents call when a user needs something the agent can’t produce itself: a database, an email API, a pair of running shoes. One publisher key, two verticals: For developer services it’s not a search engine; it’s a reasoning agent that understands what you’re building and recommends the best tool, with the reasoning behind the pick. For products it’s structured retrieval: filters for brand, merchant, price and sale status, ranked by relevance.

Who can integrate

Any approved Gravity publisher. Your existing publisher API key works on every Index endpoint the moment your account is approved for production traffic; there is no separate Index sign-up or entitlement. Blocked accounts get 403 on every Index call, the same gate that applies to production ads.

How it works

1

Agent searches

Your AI coding agent calls POST /search with a natural language query like “I need a serverless database with a free tier.”
2

Index reasons

The Gravity Index analyzes the catalog, considers your constraints, and picks the best match — explaining why it’s the right choice.
3

Agent presents the recommendation

The response includes the recommended service, the reasoning, and a tracked link. The agent surfaces it to the user in its own words.
4

User follows the link

The user clicks the tracked link to sign up with the service. Attribution is recorded on that click; billing only happens after a confirmed conversion.

Set up in 30 seconds

Set up

Pick your surface (MCP server, bash CLI, or direct API) and get running in under a minute.

Interfaces

MCP Server

npx -y @gravity-ai/index-mcp — native tool for Cursor, Claude Code, Claude Desktop, Windsurf

Bash CLI

gravity-index search "database" — terminal + scripts

REST API

POST index.trygravity.ai/search — custom integrations

Base URL

Key concepts

  • search_id — every search gets a unique ID. Pass it back for follow-up questions. The Index remembers context.
  • Click link: a tracked short URL the user clicks to sign up with the recommended service. It mints a grclid for attribution; billing only happens after a confirmed conversion.
  • Conversation context: pass your stable external_session_id and the Index uses that session’s cached summary as private supporting context. See Conversation context.
  • No auction — pure relevance matching with reasoning. Not bidding.