Shared Forest Visit API
The Visit API from Shared Forest — 1 operation(s) for visit.
The Visit API from Shared Forest — 1 operation(s) for visit.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/sharedforest-com:sharedforest-com-visit-api"
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.
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: 3.2.0
info:
title: Shared Forest Visit 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: Visit
paths:
/api/visit:
post:
operationId: recordVisit
summary: Record a visit or plant a tree
description: '`plant: false` adds anonymous growth energy. `plant: true` plants one tree per visitor per day; the tree appears within seconds. Send an Idempotency-Key to retry safely: the same key returns the same visitId for 24 hours and queues nothing new.'
parameters:
- name: Idempotency-Key
in: header
required: false
description: 'Client-chosen unique key (1-255 visible ASCII characters, a UUID is best). A repeat with the same key within 24 hours replays the first response with the header Idempotency-Replayed: true.'
schema:
type: string
minLength: 1
maxLength: 255
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/VisitRequest'
responses:
'200':
description: Visit queued
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/VisitResponse'
'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:
- Visit
components:
schemas:
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.
VisitRequest:
type: object
required:
- plant
properties:
plant:
type: boolean
description: true plants a tree (one per visitor per day), false adds growth energy only.
VisitResponse:
type: object
required:
- queued
- visitId
- plant
properties:
queued:
type: boolean
visitId:
type: string
format: uuid
plant:
type: boolean
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