This API is currently in closed beta and not publicly available

List Projects

GET /v1/projects/offset

Description

Retrieves a paginated, filterable, sortable list of carbon offset projects offered by One Tribe.

Query Parameters

ParameterTypeDescriptionDefault
pageintegerThe page number for pagination1
limitintegerThe number of items per page10
sortstringField name to sort by. May include a - prefix for descending order (e.g. -createdAt)-
filter[field]stringFilter results by a specific field value. Replace field with any valid field name from the response object (e.g. filter[country], filter[category], filter[project_status]). Multiple filters can be combined.-

Filter Examples

  • filter[country]=Brazil - Returns projects in Brazil
  • filter[project_status]=active - Returns only active projects
  • filter[category]=Reforestation - Returns reforestation projects
  • Multiple filters: filter[country]=Brazil&filter[project_status]=active - Returns active projects in Brazil

Example Request

Using curl

curl "https://api.onetribe.com/v1/projects/offset?page=1&limit=10&filter[country]=Brazil" \
  -H "Authorisation: API-Key YOUR_API_KEY_HERE"

Using TypeScript

interface ProjectListResponse {
  data: Array<{
    project_id: string
    title: string
    description: string
    primary_image: string
    location_name: string
    country: string
    category: string
    registry_type: string
    min_volume: number
    pricing: {
      base_price_per_ton: number
      partner_margin_percentage: number
      partner_profit_per_ton: number
      end_customer_price_per_ton: number
      vat_rate: number
      total_price: number
    }
    project_status: string
  }>
  meta: {
    page: number
    limit: number
    total: number
  }
}

async function listProjects(params: {
  page?: number
  limit?: number
  sort?: string
  filter?: Record<string, string>
}) {
  const searchParams = new URLSearchParams()

  if (params.page) searchParams.append('page', params.page.toString())
  if (params.limit) searchParams.append('limit', params.limit.toString())
  if (params.sort) searchParams.append('sort', params.sort)

  // Add any filters
  if (params.filter) {
    Object.entries(params.filter).forEach(([key, value]) => {
      searchParams.append(`filter[${key}]`, value)
    })
  }

  const response = await fetch(
    `https://api.onetribe.com/v1/projects/offset?${searchParams.toString()}`,
    {
      headers: {
        Authorisation: 'API-Key YOUR_API_KEY_HERE',
      },
    },
  )

  if (!response.ok) {
    throw new Error(`HTTP error! status: ${response.status}`)
  }

  return response.json() as Promise<ProjectListResponse>
}

// Example usage
const projects = await listProjects({
  page: 1,
  limit: 10,
  filter: { country: 'Brazil' },
})

Example Response

{
  "data": [
    {
      "project_id": "abc123",
      "title": "Rainforest Preservation",
      "description": "A text description of the project...",
      "primary_image": "https://example.com/images/rainforest.jpg",
      "location_name": "Amazon Rainforest, Brazil",
      "country": "Brazil",
      "category": "Reforestation",
      "registry_type": "Gold Standard",
      "min_volume": 1000,
      "pricing": {
        "base_price_per_ton": 8.5,
        "partner_margin_percentage": 15,
        "partner_profit_per_ton": 1.275,
        "end_customer_price_per_ton": 9.775,
        "vat_rate": 0.2,
        "total_price": 1000000.0
      },
      "project_status": "active"
    }
  ],
  "meta": {
    "page": 1,
    "limit": 10,
    "total": 1
  }
}