Build and Use Richer Development Tools with the Apex Symbol API (Beta)

Access comprehensive Apex type information with the Apex Symbol API (beta). This Tooling API REST resource returns detailed metadata for built-in, custom, and dynamic Apex types, such as classes, interfaces, methods, and triggers. Use this API to power code completion in IDEs, provide context for AI agents generating Apex code, or ground setup agents answering admin questions about code.

Where: This feature is available in API version 68.0 and later. This feature is available in Lightning Experience and Salesforce Classic in Enterprise, Performance, Unlimited, and Developer editions.

Important
Important This feature is a pilot or beta service that is subject to the Beta Services Terms at Agreements - Salesforce.com or a written Unified Pilot Agreement if executed by Customer, and applicable terms in the Product Terms Directory. Use of this pilot or beta service is at the Customer’s sole discretion..

Why: The Apex Symbol API provides comprehensive Apex type metadata that enables richer experiences across development tools and AI-powered workflows. By exposing the same type information that the Apex compiler uses, the Apex Symbol API bridges the gaps in the existing /completions Tooling API endpoint and SymbolTable Tooling API object.

How: To retrieve Apex type information directly from the Tooling API REST resource, send a GET request to the /services/data/vXX.0/tooling/symbols endpoint. The endpoint requires the category query parameter, which takes one of these values.

  • builtin: standard Apex types
  • database: custom and packaged Apex types
  • dynamic: dynamic Apex types

For more targeted queries, use the optional namespace or name query parameters. Filtering improves performance for large orgs and provides a better experience for consumers that only need information about specific namespaces, classes, or other Apex types.

For example, this request queries for the ApexPages class, which contains built-in Apex types in the System namespace:

/services/data/v68.0/tooling/symbols?category=builtin&namespace=System&name=ApexPages

Here’s an excerpt of the JSON response for this request.

{
  "typeStubs": [
    {
      "name": "ApexPages",
      "namespacePrefix": "System",
      "kind": "CLASS",
      "modifiers": [
        "global"
      ],
      "annotations": [],
      "superClass": null,
      "interfaces": [],
      "fields": [],
      "properties": [],
      "methods": [
        {
          "name": "addMessage",
          "isConstructor": null,
          "returnType": {
            "namespacePrefix": null,
            "name": "void",
            "typeParameters": null
          },
          "modifiers": [
            "global",
            "static"
          ],
          "annotations": [],
          "parameters": [
            {
              "name": "message",
              "type": {
                "namespacePrefix": "ApexPages",
                "name": "Message",
                "typeParameters": null
              },
              "annotations": [],
              "documentation": ""
            }
          ],
          "documentation": "Add a message to the current page context."
        }
      ],
      "innerTypes": [],
      "triggerOperations": null,
      "documentation": "Use ApexPages to add and check for messages associated...",
      "triggerObjectType": null,
      "compileError": null
    }
  ]
}
Note
Note The Apex Symbol API enforces a concurrency limit of 1 concurrent caller per org. If you make a second request while another request is in progress, the second request fails. Avoid parallel calls to this API from the same org.