MacroEstimator

API Reference

Complete reference documentation for the MacroEstimator API.

Base URL

All API requests should be made to:

https://api.macroestimator.com

Endpoints

POST/v1/estimate

Get nutrition estimates via Server-Sent Events (streaming)

View documentation →
POST/v1/estimate/sync

Get nutrition estimates as a complete JSON response (non-streaming)

View documentation →
GET/v1/foods

Search the food database for nutrition information

View documentation →
GETPOSTPUTDELETE/v1/recipes

Manage your custom recipes for consistent tracking

View documentation →
POST/v1/upload/base64

Upload images for use in nutrition estimates

View documentation →

Response Format

All API responses are returned as JSON. Successful responses include the requested data, while error responses follow this format:

{
  "error": "Error message describing what went wrong"
}

Rate Limits

API requests are rate limited based on your subscription plan. Rate limit information is returned in response headers:

  • X-RateLimit-Limit - Maximum requests per window
  • X-RateLimit-Remaining - Remaining requests in current window
  • X-RateLimit-Reset - Unix timestamp when the window resets
  • Retry-After - Seconds to wait before retrying (when rate limited)