Shreeng API Quickstart & MCP Guide
The live interactive reference for all REST endpoints lives on docs.shreeng.com (Scalar). Use this guide for authentication, input rules, MCP client setup, and rate-limit headers.
Four Integration Rules
- 1. Auth Header: Send
x-api-key: sk_shreeng_...(orAuthorization: Bearer ...). Never exposesk_shreeng_inside browser bundles — proxy calls server-side. - 2. Local ISO Datetime: Always send
YYYY-MM-DDTHH:mm:ss(e.g.1993-03-12T05:30:00) withoutZor+05:30. - 3. Location Exclusivity: Pass either
locationId(from/v2/geocode/search) OR all three oflat,lng, and IANAtz. - 4. Deterministic Errors & AI Agents: Inspect
whatIsWrong,howToFix,Retry-After, andX-Shreeng-Upgrade-Hint. Point coding agents to docs.shreeng.com/llms-full.txt.
# 1. Resolve city -> canonical locationId (Bhagalpur = 1276300)
curl -s "https://api.shreeng.com/v2/geocode/search?city=Bhagalpur&country=IN" \
-H "x-api-key: $SHREENG_API_KEY"
# 2. Calculate D1 Kundli (local ISO datetime, NO Z or +05:30)
curl -s "https://api.shreeng.com/v2/chart?locationId=1276300&datetime=1993-03-12T05:30:00" \
-H "x-api-key: $SHREENG_API_KEY"