Shared Forest Forest API

The Forest API from Shared Forest — 1 operation(s) for forest.

GitHub OpenAPI

Operations 1

GET /api/forest Live forest snapshot #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sharedforest-com:sharedforest-com-forest-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

sharedforest-com-forest-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Shared Forest API
  version: 1.0.0
  summary: Read the live shared forest, plant a tree and sponsor premium painted trees.
  description: 'Shared Forest is a free, shared illustrated forest that grows from its traffic. Every page load adds growth energy, and every visitor, human or AI agent, can plant one tree per day. The REST endpoints need no authentication and no API keys. The account tools of the MCP server use OAuth 2.1 (securitySchemes.oauth2, walkthrough https://sharedforest.com/auth.md). Rate limit: 120 requests per minute per IP address. Errors use application/problem+json (RFC 9457). Versioning: URL path /api/v1/ and the API-Version response header. Deprecation policy: A deprecated version returns a Deprecation header (RFC 9745) on every response and a Sunset header (RFC 8594) with the removal date. The Sunset date is at least 90 days after the first Deprecation header.'
  contact:
    name: Arne Kellmann
    email: contact@sharedforest.com
    url: https://sharedforest.com/contact
  x-api-version: '1'
  x-api-version-policy:
    scheme: url-path
    current: v1
    pathPrefix: /api/v1/
    header: API-Version
    policy: Changes inside a major version are additive only. A breaking change gets a new path version.
    deprecation: A deprecated version returns a Deprecation header (RFC 9745) on every response and a Sunset header (RFC 8594) with the removal date. The Sunset date is at least 90 days after the first Deprecation header.
    headers:
    - Deprecation
    - Sunset
    noticePeriodDays: 90
    docs: https://sharedforest.com/developers
  x-deprecation-policy:
    headers:
    - Deprecation
    - Sunset
    noticePeriodDays: 90
    description: A deprecated version returns a Deprecation header (RFC 9745) on every response and a Sunset header (RFC 8594) with the removal date. The Sunset date is at least 90 days after the first Deprecation header.
servers:
- url: https://sharedforest.com
security: []
tags:
- name: Forest
paths:
  /api/forest:
    get:
      operationId: getForest
      summary: Live forest snapshot
      description: All trees and groves plus traffic stats. Cached for 30 seconds. CORS allows every origin. Without query parameters the response holds the trees of the chunks nearest the centre (at most 750 trees plus groves); truncated is true when more exist. A bbox reads every chunk it covers (up to 64 chunks of 64 units). With limit, cursor or bbox it holds one page of trees plus nextCursor; pass nextCursor as cursor until it is null.
      parameters:
      - name: limit
        in: query
        required: false
        description: Trees per page (1-500). Turns on pagination.
        schema:
          type: integer
          minimum: 1
          maximum: 500
          default: 100
      - name: cursor
        in: query
        required: false
        description: Opaque cursor from nextCursor of the previous page.
        schema:
          type: string
      - name: bbox
        in: query
        required: false
        description: Only trees inside minX,minY,maxX,maxY (world coordinates).
        schema:
          type: string
          pattern: ^-?\d+(\.\d+)?(,-?\d+(\.\d+)?){3}$
        example: 3900,3900,4300,4300
      responses:
        '200':
          description: Forest snapshot
          headers:
            RateLimit:
              $ref: '#/components/headers/RateLimit'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimitPolicy'
            API-Version:
              $ref: '#/components/headers/ApiVersion'
            Deprecation:
              $ref: '#/components/headers/Deprecation'
            Sunset:
              $ref: '#/components/headers/Sunset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForestSnapshot'
        '400':
          description: Invalid request. The detail field says what to change.
          headers:
            RateLimit:
              $ref: '#/components/headers/RateLimit'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimitPolicy'
            API-Version:
              $ref: '#/components/headers/ApiVersion'
            Deprecation:
              $ref: '#/components/headers/Deprecation'
            Sunset:
              $ref: '#/components/headers/Sunset'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '405':
          description: Method not allowed. See the Allow header.
          headers:
            RateLimit:
              $ref: '#/components/headers/RateLimit'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimitPolicy'
            API-Version:
              $ref: '#/components/headers/ApiVersion'
            Deprecation:
              $ref: '#/components/headers/Deprecation'
            Sunset:
              $ref: '#/components/headers/Sunset'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          description: Rate limit reached. Wait for Retry-After seconds.
          headers:
            RateLimit:
              $ref: '#/components/headers/RateLimit'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimitPolicy'
            API-Version:
              $ref: '#/components/headers/ApiVersion'
            Deprecation:
              $ref: '#/components/headers/Deprecation'
            Sunset:
              $ref: '#/components/headers/Sunset'
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        5XX:
          description: Server error. Retry after a few seconds.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      tags:
      - Forest
components:
  schemas:
    ForestSnapshot:
      type: object
      required:
      - trees
      - groves
      - stats
      - visitors
      - uniqueVisitors
      - generatedAt
      properties:
        trees:
          type: array
          items:
            $ref: '#/components/schemas/Tree'
        groves:
          type: array
          items:
            $ref: '#/components/schemas/Grove'
        stats:
          $ref: '#/components/schemas/Stats'
        visitors:
          type: integer
        uniqueVisitors:
          type: integer
        generatedAt:
          type: string
          format: date-time
        truncated:
          type: boolean
          description: true when trees and groves hold only the chunks nearest the centre. GET /api/v1/chunks has the rest.
        nextCursor:
          type:
          - string
          - 'null'
          description: Paginated responses only. Cursor for the next page, null on the last page.
        limit:
          type: integer
          description: Paginated responses only. Page size used.
        totalTrees:
          type: integer
          description: Paginated responses only. Trees that match bbox across all pages.
    Problem:
      type: object
      required:
      - type
      - title
      - status
      - detail
      properties:
        type:
          type: string
          description: Error type URI, about:blank for plain HTTP errors.
        title:
          type: string
          description: Short HTTP status text.
        status:
          type: integer
          description: HTTP status code.
        detail:
          type: string
          description: What went wrong and how to fix the request.
    Tree:
      type: object
      required:
      - id
      - type
      - x
      - y
      - plantedAt
      - growthStage
      properties:
        id:
          type: string
        type:
          type: string
          description: sapling, pine, oak or blossom
        x:
          type: number
        y:
          type: number
        plantedAt:
          type: integer
          description: ms since epoch
        growthStage:
          type: integer
          minimum: 0
          maximum: 5
        origin:
          type: string
          enum:
          - human
          - agent
    Grove:
      type: object
      required:
      - id
      - x
      - y
      - level
      - treesAbsorbed
      properties:
        id:
          type: string
        x:
          type: number
        y:
          type: number
        level:
          type: integer
          minimum: 0
          maximum: 3
        treesAbsorbed:
          type: integer
    Stats:
      type: object
      required:
      - humans
      - agents
      - bots
      - plantedToday
      properties:
        humans:
          type: integer
        agents:
          type: integer
        bots:
          type: integer
        plantedToday:
          type: integer
  headers:
    Sunset:
      description: 'RFC 8594. Present only on responses of a deprecated API version: the HTTP date after which the version is removed, at least 90 days after deprecation.'
      schema:
        type: string
    Deprecation:
      description: 'RFC 9745. Present only on responses of a deprecated API version: the Unix time of deprecation, for example @1767225600. Version 1 is not deprecated.'
      schema:
        type: string
    RateLimit:
      description: Remaining quota and seconds to reset, for example "default";r=119;t=60.
      schema:
        type: string
    RetryAfter:
      description: Seconds to wait before the next request.
      schema:
        type: integer
    ApiVersion:
      description: Major version of the REST API.
      schema:
        type: string
        example: '1'
    RateLimitPolicy:
      description: Quota policy, for example "default";q=120;w=60.
      schema:
        type: string
  securitySchemes:
    oauth2:
      type: oauth2
      description: 'OAuth 2.1 with PKCE (S256) for the account tools of the MCP server https://sharedforest.com/mcp. Dynamic Client Registration at https://sharedforest.com/oauth/register. Walkthrough: https://sharedforest.com/auth.md.'
      flows:
        authorizationCode:
          authorizationUrl: https://sharedforest.com/oauth/authorize
          tokenUrl: https://sharedforest.com/oauth/token
          refreshUrl: https://sharedforest.com/oauth/token
          scopes:
            forest:read: Read the forest, prices and designs. Always granted; the same data is public.
            sponsor:write: Start tree sponsorships in your name, within the spending limit. You still confirm and pay each order yourself.
            account:read: Read your orders and your sponsored trees.
externalDocs:
  description: Developer portal
  url: https://sharedforest.com/developers
x-versioning-policy:
  scheme: url-path
  current: v1
  pathPrefix: /api/v1/
  header: API-Version
  policy: Changes inside a major version are additive only. A breaking change gets a new path version.
  deprecation: A deprecated version returns a Deprecation header (RFC 9745) on every response and a Sunset header (RFC 8594) with the removal date. The Sunset date is at least 90 days after the first Deprecation header.
  headers:
  - Deprecation
  - Sunset
  noticePeriodDays: 90
  docs: https://sharedforest.com/developers