GoFundMe GraphQL API

Welcome

The GoFundMe API enables charities to retrieve fundraiser and donation data to report and display.

By using GoFundMe's API, you're not just coding; you're contributing to a global movement of mutual support, one line of code at a time.

Getting Started

Welcome to our platform! This guide will walk you through creating an API key and making your first request to the GoFundMe GraphQL API.

Step 1: Log in and find the API Keys section

  1. Go to the Fundraisers page.
  2. Under your charity activity, locate the API Keys section.

Step 2: Create an API key

  1. Take note of your partner code and charity slug — you’ll need it later.
  2. Create a new API key and save it somewhere secure (for example, in a password manager). You can only view it once.

Step 3: Set up your request

  1. Open Postman (or your preferred tool for sending POST requests).
  2. Set the request type to POST.
  3. Use the URL https://graphql.gofundme.com/graphql.
  4. Add headers:
    • x-partner-code: Your partner code
    • x-api-key: Your API key
  5. Add your GraphQL query as the POST body (see example query below)
  6. Send the request

Curl request

curl --location 'https://graphql.gofundme.com/graphql' \
--header 'x-partner-code: YOUR_PARTNER_CODE' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{"query":"query { charity(slug: 'YOUR_CHARITY_SLUG') { id name state zipCode }}"}'

GraphQL query

charity(slug: "YOUR_CHARITY_SLUG") {
    id
    name
    state
    zipCode
}

If you provided your key correctly, you should get back a response containing your charity information.

{
  "data": {
    "charity": {
      "id": "1234",
      "name": "My charity name",
      "state": "XY",
      "zipCode": "12345"
    }
  }
}

Next steps

Congratulations! You have successfully completed the getting started guide. Here are some next steps to explore:

Retrieving donations and fundraisers

This guide will help you get started with querying data to retrieve all the fundraisers and donations associated with your charity.

How it works

The charity.fundraisers query allows you to retrieve all fundraisers associated with your charity. The charity.donations query allows you to retrieve all donations of all fundraisers associated with your charity.

Example use cases

charity.fundraisers

To query all fundraisers associated with your charity, use charity.fundraisers.

Query example:

query {
  charity(slug: "YOUR_CHARITY_SLUG") {
    fundraisers {
      edges {
       node {
         title
         description
       }
      }
    }
  }
}

Response:

{
  "data": {
    "charity": {
      "fundraisers": {
        "edges": [
          {
            "node": {
              "title": "Charity Fundraiser 1",
              "description": "A fundraiser description for a test campaign"
            }
          },
          {
            "node": {
              "title": "Charity Fundraiser 2",
              "description": "Another description for a test campaign"
            }
          }
        ]
      }
    }
  }
} 

charity.donations

To query all donations associated with your charity, use charity.donations. Use pagination and hasNextPage to determine when you’ve reached the end of a connection. You can control the page size with first and last. Lets retrieve the first 5:

Query example:

query {
  charity(slug: "YOUR_CHARITY_SLUG") {
    donations(first: 5) {
      pageInfo {
        hasNextPage
        hasPreviousPage
        startCursor
      }
      edges {
       node {
         name
         amount {
          currencyCode
          amount
        }
        fundraiser {
          title
          fundId
        }
       }
      }
    }
  }
}

Response:

{
  "data": {
    "charity": {
      "donations": {
        "pageInfo": {
          "hasNextPage": true,
          "hasPreviousPage": false,
          "startCursor": "RG9uYXRpb246aWQ6NzYxNTg1NjIz"
        },
        "edges": [
          {
            "node": {
              "name": "Archer Woolery",
              "amount": {
                "currencyCode": "USD",
                "amount": 5
              },
              "fundraiser": {
                "title": "Adyen test campaign",
                "fundId": "33760977"
              }
            }
          },
          {
            "node": {
              "name": "Archer Woolery",
              "amount": {
                "currencyCode": "USD",
                "amount": 5
              },
              "fundraiser": {
                "title": "Adyen test campaign",
                "fundId": "33760977"
              }
            }
          },
          {
            "node": {
              "name": "Archer Woolery",
              "amount": {
                "currencyCode": "USD",
                "amount": 5
              },
              "fundraiser": {
                "title": "Adyen test campaign",
                "fundId": "33760977"
              }
            }
          },
          {
            "node": {
              "name": "Product Testing",
              "amount": {
                "currencyCode": "USD",
                "amount": 7
              },
              "fundraiser": {
                "title": "Adyen test campaign",
                "fundId": "33760977"
              }
            }
          },
          {
            "node": {
              "name": "Ksenia Cat",
              "amount": {
                "currencyCode": "USD",
                "amount": 7
              },
              "fundraiser": {
                "title": "Adyen test campaign",
                "fundId": "33760977"
              }
            }
          }
        ]
      }
    }
  }
}

Queries

charity

Description

Gets a charity by slug / url

Response

Returns a Charity

Arguments

Name Description
slug - ID! Charity slug
status - CharityStatus Charity status with default CharityStatus.ACTIVE . Default = ACTIVE

Query

query charity(
  $slug: ID!,
  $status: CharityStatus
) {
  charity(
    slug: $slug,
    status: $status
  ) {
    categoryCode
    city
    country
    currencyCode
    description
    ein
    id
    name
    npoId
    slug
    state
    status
    donations {
      ...DonationConnectionFragment
    }
    fundraisers {
      ...FundraiserConnectionFragment
    }
    zipCode
  }
}

Variables

{"slug": 4, "status": "ACTIVE"}

Response

{
  "data": {
    "charity": {
      "categoryCode": "abc123",
      "city": "abc123",
      "country": "xyz789",
      "currencyCode": "abc123",
      "description": "xyz789",
      "ein": "abc123",
      "id": "4",
      "name": "abc123",
      "npoId": "abc123",
      "slug": "xyz789",
      "state": "xyz789",
      "status": "ACTIVE",
      "donations": DonationConnection,
      "fundraisers": FundraiserConnection,
      "zipCode": "abc123"
    }
  }
}

Types

Boolean

Description

The Boolean scalar type represents true or false

Example

true

Charity

Description

Describes a registered charity that a fundraiser can raise money for

Fields

Field Name Description
categoryCode - String from charity_community
city - String
country - String
currencyCode - String Currency code for the charity
description - String from charity_community
ein - String
id - ID!
name - String
npoId - String
slug - String
state - String
status - CharityStatus from charity_community
donations - DonationConnection List of donations by charity
Arguments
after - String
before - String
first - Int
last - Int
fundraisers - FundraiserConnection List of fundraisers, optional list based on charityOrganized flag
Arguments
after - String
before - String
charityOrganized - Boolean
first - Int
last - Int
zipCode - String

Example

{
  "categoryCode": "xyz789",
  "city": "xyz789",
  "country": "abc123",
  "currencyCode": "xyz789",
  "description": "abc123",
  "ein": "xyz789",
  "id": "4",
  "name": "abc123",
  "npoId": "abc123",
  "slug": "abc123",
  "state": "abc123",
  "status": "ACTIVE",
  "donations": DonationConnection,
  "fundraisers": FundraiserConnection,
  "zipCode": "xyz789"
}

CharityDonationSource

Description

Details about the origin of a donation in relation to a charity

Fields

Field Name Description
sourceId - ID The unique identifier of the source

Example

{"sourceId": "4"}

CharityStatus

Description

Possible status for the charity

Values

Enum Value Description

ACTIVE

BANNED

HIDDEN

INACTIVE

UNKNOWN

Example

"ACTIVE"

Comment

Fields

Field Name Description
authorFirstName - String
authorLastName - String
createdAt - DateTime
id - ID!
text - String!

Example

{
  "authorFirstName": "abc123",
  "authorLastName": "xyz789",
  "createdAt": "2007-12-03T10:15:30Z",
  "id": 4,
  "text": "xyz789"
}

CountryCode

Description

The CountryCode scalar type as defined by ISO 3166-1 alpha-2

Example

"US"

CurrencyCode

Description

A representation of the currencies in which GoFundMe supports fundraisers raising money

Values

Enum Value Description

AUD

CAD

CHF

DKK

EUR

GBP

MXN

NOK

SEK

USD

Example

"AUD"

DateTime

Description

A slightly refined version of RFC-3339 compliant DateTime Scalar

Example

"2007-12-03T10:15:30Z"

Decimal

Example

Decimal

Donation

Description

A donation to a given fundraiser made by a donor

Fields

Field Name Description
amount - Money! The amount of money donated to a fundraiser
charitySource - CharityDonationSource Provides information about the origin of the donation with respect to the charity
comment - Comment comment associated with a donation
createdAt - DateTime! The timestamp of the donor donating to the fundraiser
donorEmail - String The email address of the donor
giftAidConsent - Boolean Whether the donor has consented to allocate a portion of their donation towards Gift Aid
id - ID!
isOffline - Boolean! An indicator whether the donation was processed offline, i.e. not through GoFundMe's Payments Rails
name - String! The name of the donor donating to the fundraiser. When isAnonymous is true, name must be the string 'Anonymous'
netAmount - Money The net amount of money donated to a fundraiser
npoMarketingConsent - Boolean Indicates whether the donor has consented to sharing their personal data with nonprofits
paymentMethod - PaymentMethod The payment method type used to make the donation
refundedAt - DateTime The datetime the donation was refunded (null if it has not been refunded)
transactionId - ID Transaction id from payment-processor

Example

{
  "amount": Money,
  "charitySource": CharityDonationSource,
  "comment": Comment,
  "createdAt": "2007-12-03T10:15:30Z",
  "donorEmail": "abc123",
  "giftAidConsent": false,
  "id": "4",
  "isOffline": false,
  "name": "abc123",
  "netAmount": Money,
  "npoMarketingConsent": true,
  "paymentMethod": "ACH",
  "refundedAt": "2007-12-03T10:15:30Z",
  "transactionId": "4"
}

DonationConnection

Fields

Field Name Description
edges - [DonationEdge]
pageInfo - PageInfo!

Example

{
  "edges": [DonationEdge],
  "pageInfo": PageInfo
}

DonationEdge

Fields

Field Name Description
cursor - String
node - Donation

Example

{
  "cursor": "abc123",
  "node": Donation
}

EmailInfo

Fields

Field Name Description
consent - Consent! Information about the user's consent to be contacted via email please use PersonConsent
email - String! Email address
verified - Boolean! Is the email verified

Example

{
  "consent": Consent,
  "email": "xyz789",
  "verified": true
}

Fundraiser

Description

A Fundraiser is an Entity that allows Fundraiser Organizers to raise money for themselves or others from Donors

Fields

Field Name Description
createdAt - DateTime The timestamp of the creation of the fundraiser
donationCount - Int!
id - ID! A unique identifier for the fundraiser
organizer - User User information for the Fundraiser Organizer who created the fundraiser
slug - String The unique slug of the fundraiser
title - String! Fundraiser organizer supplied title for the fundraiser
currentAmount - Money The current amount of money raised for a fundraiser
currentNetAmount - Money The current net amount of money raised for a fundraiser
goalAmount - Money Displayed goal amount for the fundraiser
location - Location The fundraiser organizer specified location of the fundraiser

Example

{
  "createdAt": "2007-12-03T10:15:30Z",
  "donationCount": 987,
  "id": "4",
  "organizer": User,
  "slug": "xyz789",
  "title": "abc123",
  "currentAmount": Money,
  "currentNetAmount": Money,
  "goalAmount": Money,
  "location": Location
}

FundraiserConnection

Fields

Field Name Description
edges - [FundraiserEdge]
pageInfo - PageInfo!

Example

{
  "edges": [FundraiserEdge],
  "pageInfo": PageInfo
}

FundraiserEdge

Fields

Field Name Description
cursor - String
node - Fundraiser

Example

{
  "cursor": "xyz789",
  "node": Fundraiser
}

ID

Description

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID

Example

"4"

Int

Description

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1

Example

987

Location

Fields

Field Name Description
city - String
countryCode - CountryCode
postalCode - String
statePrefix - String

Example

{
  "city": "xyz789",
  "countryCode": "US",
  "postalCode": "xyz789",
  "statePrefix": "abc123"
}

Money

Description

A representation of a monetary amount. Amount is a decimal represented as a string with 0, 1, or 2 decimal places

Fields

Field Name Description
amount - Decimal!
currencyCode - CurrencyCode!

Example

{"amount": Decimal, "currencyCode": "AUD"}

Node

Description

----- Shared utility classes -----

Fields

Field Name Description
id - ID!

Possible Types

Node Types

Fundraiser

User

Comment

Donation

Example

{"id": "4"}

PageInfo

Fields

Field Name Description
endCursor - String
hasNextPage - Boolean!
hasPreviousPage - Boolean!
startCursor - String

Example

{
  "endCursor": "abc123",
  "hasNextPage": false,
  "hasPreviousPage": false,
  "startCursor": "xyz789"
}

PaymentMethod

Values

Enum Value Description

ACH

APPLE_PAY

CREDIT_CARD

DIF_GRANT

DONOR_ADVISED_FUND

GIROPAY

GIVING_FUND

GOOGLE_PAY

IDEAL

KLARNA

PAYPAL

PAYPAL_PAYFAST

SOFORT

VENMO_PAYFAST

Example

"ACH"

String

Description

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text

Example

"abc123"

User

Fields

Field Name Description
firstName - String The users first name
lastName - String The users last name
country - CountryCode Country of the user
email - EmailInfo Information about the viewer's email and consent to be contacted

Example

{
  "firstName": "xyz789",
  "lastName": "abc123",
  "country": "US",
  "email": EmailInfo
}