Skip to Content
Developers @ LaunchGood
Campaigns

Search campaigns

GET
/campaigns

Public campaigns, filtered and sorted. Filters combine with AND; within a list filter at least one value must match. Only campaigns the LaunchGood site lists publicly are served: active, completed, failed or completed-unpaid, not hidden and not archived. slug finds the campaigns with that exact slug: a page of zero, one or more, because a slug is not promised to be unique. A slug is looked up in the campaign records, which cannot also search, rank or filter, so slug cannot be combined with q, sort, categories, countries, zakatVerified, organizationType or nearMe: such a request is a 400 that names them, and limit and offset are the only parameters that go with it. offset and limit count positions in the order of the search, before a campaign is left out, and hasMore is whether the search has a row after the page. A page can hold fewer items than limit, even none: follow meta.hasMore, not the page length. offset plus limit cannot pass 9,999 (a 400 says so). Needs a valid token. Which scope public reads require is still open.

Authorization

oauth2
headerAuthorizationBearer <token>

OAuth 2.0 client-credentials grant. Scopes follow the ReBAC grammar {type}:{id}:...:{role}; a {placeholder} stands for an id.

Query Parameters

q?string

Text to search for in campaign names and descriptions.

Lengthlength <= 120
slug?string

Only campaigns with this slug. Exact match, and not combinable with any filter other than limit and offset.

Length1 <= length <= 100
sort?string

Sort order. Without it, results are ranked by relevance.

Value in"almost_funded""newest""needs_love""ending_soon"
categories?array<>

Category slugs.

Items1 <= items
countries?array<>

ISO 3166-1 alpha-2 country codes of the countries the campaign helps.

Items1 <= items
zakatVerified?true

Only true is supported: it keeps the campaigns verified by a zakat reviewer. false is a 400, because campaigns that are not verified cannot be selected.

Value intrue
organizationType?array<>

Only campaigns of organizations registered this way.

Items1 <= items
nearMe?string

Only campaigns within a distance of a point: latitude,longitude,distanceKm. Latitude -90 to 90, longitude -180 to 180, distance above 0 and at most 500 km.

Match^(-?\d{1,2}(?:\.\d+)?),(-?\d{1,3}(?:\.\d+)?),(\d+(?:\.\d+)?)$
limit?integer

Page size. A value above 100 is clamped to 100, not refused: meta.limit says the size that was applied. A value below 1 is a 400.

Range1 <= value
Default25
offset?integer

Rows to skip. Offsets above 10,000 are rejected: narrow the search instead.

Range0 <= value <= 10000
Default0

Response Body

A page of campaigns.

application/json
  1. response
data*array<>

One page of results.

meta*
Example Request
curl -X GET 'https://api2.launchgood.com/campaigns?slug=clean-water-for-sana-a&categories=food-water%2Ceducation&countries=US%2CCA&organizationType=501c3%2Cgift_aid&nearMe=43.65%2C-79.38%2C50' \  -H 'Authorization: Bearer '
Example Response
{  "data": [    {      "id": "48213",      "slug": "clean-water-for-sana-a",      "url": "http://example.com",      "name": "Clean water for Sana'a",      "status": "not_submitted",      "categories": [        "food-water"      ],      "goal": {        "amountMinor": 2500,        "currency": "USD"      },      "raised": {        "amountMinor": 2500,        "currency": "USD"      },      "donationCount": 312,      "fundedPercentage": 64,      "daysLeft": 0,      "zakatEligible": true,      "zakatVerified": true,      "country": "YE",      "location": "Sana'a, Yemen",      "latitude": -90,      "longitude": -180,      "imageUrl": "http://example.com",      "creatorName": "string",      "organization": {        "id": "clx9k2m4p0000abcd1234efgh",        "name": "Hope Relief Foundation"      },      "startDate": "2019-08-24T14:15:22Z",      "endDate": "2019-08-24T14:15:22Z",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "meta": {    "limit": 25,    "offset": 0,    "hasMore": true,    "total": 120,    "totalIsEstimate": false  }}