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
- Go to the Fundraisers page.
- Under your charity activity, locate the API Keys section.
Step 2: Create an API key
- Take note of your partner code and charity slug — you’ll need it later.
- 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
- Open Postman (or your preferred tool for sending POST requests).
- Set the request type to POST.
- Use the URL
https://graphql.gofundme.com/graphql. - Add headers:
x-partner-code: Your partner codex-api-key: Your API key
- Add your GraphQL query as the POST body (see example query below)
- 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:
- Explore additional GraphQL queries such as https://charitydocs.gofundme.com/#query-charity
- Integrate the API into your application.
Query Requirements
All GraphQL queries and mutations sent to the GoFundMe API MUST follow these requirements:
1. Use Named Operations
Every query or mutation must have a name. Anonymous operations are not supported.
Do this (named query):
query GetPartnerInfo {
partner {
code
name
}
}
Don't do this (anonymous query):
query {
partner {
code
name
}
}
2. Use Variables Instead of Inline Values
Pass dynamic values as variables rather than embedding them directly in the query string.
Do this (parameterized with variables):
query GetFundraiser($slug: ID!) {
fundraiser(slug: $slug) {
title
}
}
With variables passed separately in the request:
{
"query": "query GetFundraiser($slug: ID!) { fundraiser(slug: $slug) { title } }",
"variables": { "slug": "my-fundraiser-slug" }
}
Don't do this (inline values):
query GetFundraiser {
fundraiser(slug: "my-fundraiser-slug") {
title
}
}
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 fundraisers associated with your charity. The charity.donations query allows you to retrieve donations across all fundraisers associated with your charity.
A filter with a date range is required on both queries. Queries without a filter are not supported.
Example use cases
charity.fundraisers
Use the filter argument to specify the published date range. You can also control sort order with order (CREATED_AT, AMOUNT, or LAST_DONATION_AT).
Query example — fundraisers published in 2024, most recently donated to first:
query {
charity(slug: "YOUR_CHARITY_SLUG") {
fundraisers(
first: 10
filter: { dateFrom: "2024-01-01T00:00:00Z", dateTo: "2025-01-01T00:00:00Z" }
order: LAST_DONATION_AT
) {
pageInfo {
hasNextPage
endCursor
}
edges {
node {
title
slug
currentAmount {
currencyCode
amount
}
donationCount
}
}
}
}
}
Response:
{
"data": {
"charity": {
"fundraisers": {
"pageInfo": {
"hasNextPage": true,
"endCursor": "RnVuZHJhaXNlcjppZDozNTk4MjM0NQ=="
},
"edges": [
{
"node": {
"title": "Help rebuild the community centre",
"slug": "help-rebuild-the-community-centre",
"currentAmount": {
"currencyCode": "USD",
"amount": 3200
},
"donationCount": 47
}
}
]
}
}
}
}
charity.donations
Use the filter argument to specify the published date range. You can also control sort order with order (CREATED_AT or AMOUNT). Use hasNextPage and endCursor to paginate through results.
Query example — donations from Q1 2024, largest first:
query {
charity(slug: "YOUR_CHARITY_SLUG") {
donations(
first: 10
filter: { dateFrom: "2024-01-01T00:00:00Z", dateTo: "2024-04-01T00:00:00Z" }
order: AMOUNT
) {
pageInfo {
hasNextPage
endCursor
}
edges {
node {
name
amount {
currencyCode
amount
}
createdAt
charitySource {
sourceType
sourcePage
}
}
}
}
}
}
Response:
{
"data": {
"charity": {
"donations": {
"pageInfo": {
"hasNextPage": false,
"endCursor": "RG9uYXRpb246aWQ6NzYxNTg1NjI5"
},
"edges": [
{
"node": {
"name": "Jane Smith",
"amount": {
"currencyCode": "USD",
"amount": 500
},
"createdAt": "2024-03-15T10:22:00Z",
"charitySource": {
"sourceType": "FUNDRAISER",
"sourcePage": "https://www.gofundme.com/f/help-rebuild-the-community-centre"
}
}
},
{
"node": {
"name": "Anonymous",
"amount": {
"currencyCode": "USD",
"amount": 250
},
"createdAt": "2024-02-03T08:45:00Z",
"charitySource": {
"sourceType": "DIRECT",
"sourcePage": "https://www.gofundme.com/charity/example-charity"
}
}
}
]
}
}
}
}
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": "xyz789",
"country": "abc123",
"currencyCode": "abc123",
"description": "xyz789",
"ein": "abc123",
"id": "4",
"name": "xyz789",
"npoId": "xyz789",
"slug": "abc123",
"state": "abc123",
"status": "ACTIVE",
"donations": DonationConnection,
"fundraisers": FundraiserConnection,
"zipCode": "xyz789"
}
}
}
Types
Boolean
Description
The Boolean scalar type represents true or false
Charity
Description
Describes a registered charity that a fundraiser can raise money for
Fields
| Field Name | Description |
|---|---|
categoryCode - String
|
The charity's NTEE category code |
city - String
|
|
country - String
|
|
currencyCode - String
|
Currency code for the charity |
description - String
|
Charity-supplied description text |
ein - String
|
|
id - ID!
|
|
name - String
|
|
npoId - String
|
|
slug - String
|
|
state - String
|
|
status - CharityStatus
|
from charity_community |
donations - DonationConnection
|
List of donations by charity |
Argumentsafter - String
before - String
filter - CharityDonationsFilter
first - Int
last - Int
order - DonationOrder
|
|
fundraisers - FundraiserConnection
|
List of fundraisers, optional list based on charityOrganized flag |
Argumentsafter - String
before - String
charityOrganized - Boolean
filter - CharityFundraiserFilter
first - Int
last - Int
order - FundraiserOrder
|
|
zipCode - String
|
|
Example
{
"categoryCode": "abc123",
"city": "abc123",
"country": "abc123",
"currencyCode": "abc123",
"description": "abc123",
"ein": "abc123",
"id": 4,
"name": "abc123",
"npoId": "xyz789",
"slug": "xyz789",
"state": "abc123",
"status": "ACTIVE",
"donations": DonationConnection,
"fundraisers": FundraiserConnection,
"zipCode": "abc123"
}
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 |
sourcePage - Url
|
A fully qualified URL to the page where the donation originated |
sourceType - CharityDonationSourceType
|
Whether the donation came directly through the charity’s community page (DIRECT) or via a supporting fundraiser (FUNDRAISER) |
Example
{
"sourceId": "4",
"sourcePage": Url,
"sourceType": "DIRECT"
}
CharityDonationSourceType
Description
Indicates how the donation is attributed to a charity
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
Example
"DIRECT"
CharityDonationsFilter
CharityFundraiserFilter
CharityStatus
Description
Visibility status of a charity's community page
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
Use HIDDEN instead. |
|
|
|
|
|
|
|
|
Use null instead. |
Example
"ACTIVE"
Comment
Consent
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 |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": false,
"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
DonationOrder
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
Example
"AMOUNT"
EmailInfo
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 |
currentAmount - Money
|
The current amount of money raised for the fundraiser |
donationCount - Int!
|
|
goalAmount - Money
|
Displayed goal amount for the fundraiser |
id - ID!
|
A unique identifier for the fundraiser |
location - Location
|
The fundraiser organizer specified location of 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 |
currentNetAmount - Money
|
The current net amount of money raised for a fundraiser |
Example
{
"createdAt": "2007-12-03T10:15:30Z",
"currentAmount": Money,
"donationCount": 987,
"goalAmount": Money,
"id": 4,
"location": Location,
"organizer": User,
"slug": "abc123",
"title": "xyz789",
"currentNetAmount": Money
}
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
}
FundraiserOrder
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
Example
"AMOUNT"
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
123
Location
Fields
| Field Name | Description |
|---|---|
city - String
|
|
countryCode - CountryCode
|
|
postalCode - String
|
|
statePrefix - String
|
Example
{
"city": "abc123",
"countryCode": "US",
"postalCode": "abc123",
"statePrefix": "xyz789"
}
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 |
|---|
Example
{"id": 4}
PageInfo
PaymentMethod
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"ACH"
PhoneInfo
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
"xyz789"
Url
Description
A Url scalar
Example
Url
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 |
phone - PhoneInfo
|
Information about the viewer's phone number and consent to be contatcted |
Example
{
"firstName": "xyz789",
"lastName": "abc123",
"country": "US",
"email": EmailInfo,
"phone": PhoneInfo
}