Back to top icon

New Relic Developers

NerdGraph — GraphQL API

Ask for what you want. Get what you want.

NerdGraph gives you the power to request the exact data you need without over-fetching or under-fetching. You can query data from any of the New Relic cloud integrations, including AWS, Azure, and Google Cloud Platform.

To get started, head over to our GraphiQL interface, an interactive tool that allows you to dynamically execute queries using this new API.

From there, you can execute single actions that apply to many integrations. For example, list all enabled cloud integrations for all your linked accounts, enable multiple integrations across multiple cloud accounts, or modify multiple integration configuration parameters at once (including regions and polling intervals).

The following GraphQL query will link an AWS account to a New Relic account:

mutation($accountId: Int!, $linkAccounts: CloudLinkAccountsInput!) {
      nrAccountId: <NR_ACCOUNT_ID>,
      accounts: {
        aws: [{
          name: <PROVIDER_ACCOUNT_NAME>,
          arn: <AWS_ROLE_ARN>
    ) {
      linkedAccounts {

The following GraphQL query will return the response of a NRQL query:

   actor {
      account(id: YOUR_ACCOUNT_ID) {
         nrql(query: "SELECT count(*) FROM Transaction SINCE 1 HOUR AGO") {


Intro to NerdGraph

Learn how to use our GraphQL API with software engineer Emery Gerndt Otopalik.

GraphiQL uses an efficient and flexible query language that gives you the power to request exactly the data you need. While typical REST APIs require loading from multiple URLs, GraphQL APIs get all the data your app needs in a single request.


Get all the data you need in a single request.

Explore NerdGraph using GraphiQL

Learn more and start building

Group 7 Created with Sketch.


For a list of copyable example queries that you can use with the New Relic GraphiQL, see Cloud integration and New Relic GraphQL API examples.

Group 9 Created with Sketch.

NRU Tutorials

To learn how to make the most of our developer resources, check out New Relic University.

Group 8 Created with Sketch.

Community Forum

Connect with other developers in the New Relic Explorers Hub


For examples of integrations and other technologies, see our GitHub repo.