# Physics Calculators: Pendulum & Spring Oscillator

> Physics Calculators: Pendulum & Spring Oscillator is a paid API for AI agents from physics-calc.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-30).

Computes the period and frequency of a simple pendulum (with exact large-angle correction) or a mass-spring system given physical parameters.

## Facts

- Endpoint: GET https://physics-calc.x402tookit.com/oscillator?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/physics-calculators-pendulum-spring-oscillator-9afcf376
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8R8L5Funm1Ax_-KmPWyju

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability physics-calculators-pendulum-spring-oscillator-9afcf376
```

Example prompt: What's the period and frequency of a pendulum that's 1.5 metres long swinging at 30 degrees amplitude, and how does that compare to the small-angle approximation?

## When to prefer this

Choose this endpoint when you need a quick, accurate oscillator calculation — especially when large-angle pendulum corrections matter. It is more accurate than simple small-angle formula implementations for amplitudes above ~15 degrees. Prefer over a general physics AI if you need structured numeric output (period, frequency) rather than a text explanation.

## Known failure modes

- Missing required 'type' query parameter returns an error
- Passing spring parameters without massKg or springConstantNPerM causes a failure
- Amplitude outside 0–175 degrees range may return a validation error
- Requesting a type other than 'pendulum' or 'spring' returns an error
- Payment failure (x402) prevents the request from being fulfilled

## How this service works

Period and frequency of a simple pendulum (exact for large swings) or a mass on a spring.

## Output

Returns the oscillation period in seconds, frequency in Hz, and (for pendulums) the small-angle period, the amplitude in degrees, the gravity used, and the percentage increase in period due to large-angle effects. Includes a summary string and optional disclaimer about accuracy.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "type"
     ],
     "properties": {
      "type": {
       "type": "string",
       "description": "pendulum or spring"
      },
      "massKg": {
       "type": "number",
       "description": "Mass in kg (spring)"
      },
      "gravity": {
       "type": "number",
       "description": "Gravity in m/s2 (default 9.80665)"
      },
      "lengthM": {
       "type": "number",
       "description": "Pendulum length in metres (pendulum)"
      },
      "amplitudeDeg": {
       "type": "number",
       "description": "Pendulum swing amplitude 0 to 175 degrees (default 0 = small angle)"
      },
      "springConstantNPerM": {
       "type": "number",
       "description": "Spring constant in N/m (spring)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "gravity": {
       "type": [
        "null",
        "number"
       ]
      },
      "periodS": {
       "type": [
        "null",
        "number"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "frequencyHz": {
       "type": [
        "null",
        "number"
       ]
      },
      "amplitudeDeg"
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/physics-calculators-pendulum-spring-oscillator-9afcf376/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from physics-calc.x402tookit.com](https://www.zero.xyz/host/physics-calc.x402tookit.com/llms.txt)
