Skip to main content
The Gravity Index is a recommendation API for AI agents. Your agent calls it when a user needs something the agent cannot make itself, for example a database, an email API, or a pair of running shoes. The Index has two verticals (catalogs). One publisher API key works for both. For developer services, an LLM reads the request and the catalog. It selects one service and tells you why it fits. For consumer products, the Index does a structured search. You can filter by brand, merchant, price, and sale status, and the results come back in order of relevance.

Who can use the Index

Any Gravity publisher can use the Index. A publisher is a platform that shows Gravity content to its users. Your publisher API key works on all Index endpoints. You do not need a separate sign-up.
  • Approved accounts get full access. Searches, clicks, and conversions count toward your earnings.
  • Pending accounts can call the API and build an integration. Gravity does not attribute or pay anything until Gravity approves the account.
  • Blocked accounts get 403 on every Index call. This is the same rule that applies to production ads.

How it works

1

The agent sends a search

Your agent calls POST /search with a request in natural language, for example “I need a serverless database with a free tier.”
2

The Index selects a service

The Index compares the request with the catalog. It selects the best match and writes the reasons for the choice.
3

The agent shows the recommendation

The response has the recommended service, the reasons, and a tracked link. The agent tells the user about it in its own words.
4

The user opens the link

The user opens the tracked link and signs up with the service. Gravity records the click for attribution. Gravity charges the service only after a confirmed conversion.

Set up

Install

Select an interface (MCP server, CLI, or REST API) and connect it to the Index.

Interfaces

MCP server

npx -y @gravity-ai/index-mcp: a tool server for Cursor, Claude Code, Claude Desktop, and Windsurf.

CLI

gravity-index search "database": for the terminal and for scripts.

REST API

POST https://index.trygravity.com/search: for your own integration.
The Gravity Index MCP server is a different product from the Gravity dashboard MCP server for advertisers and publishers. On the Index pages, “MCP server” always means the Gravity Index MCP server.

Base URL

Key concepts

  • Publisher API key: the key that identifies your platform. Send it as the X-API-Key header or as the platform_api_key body field.
  • search_id: a unique ID for each search. Send it back with a follow-up question, and the Index uses the earlier search as context.
  • Click link (click_url): a tracked short URL. The user opens it to go to the recommended service or product. Each link has a grclid (Gravity click ID) for attribution. A click alone does not cause a charge. Gravity charges only after a confirmed conversion.
  • Conversation context: send your stable session_id, and the Index uses a summary of that conversation as private context. See Conversation context.
  • No auction: services do not bid on each search. Relevance decides the recommendation. An optional publisher setting can give a small boost to services with an active CPA (cost per acquisition) campaign. The response never shows prices or payouts.