Muhurta API - Go

Muhurta API with Go 🔵

Integrate Muhurta API into your Go application.

Installation

No package to install. This example uses Go's standard net/http package.

Example Code

package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	body := `{
  "datetime": "2026-11-01T09:00:00",
  "latitude": 18.5204,
  "longitude": 73.8567,
  "timezone": "Asia/Kolkata"
}`
	req, err := http.NewRequest("POST", "https://api.vedika.io/v2/astrology/muhurta", strings.NewReader(body))
	if err != nil {
		panic(err)
	}
	req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
	req.Header.Set("Content-Type", "application/json")

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	out, err := io.ReadAll(resp.Body)
	if err != nil {
		panic(err)
	}
	fmt.Println(resp.StatusCode)
	fmt.Println(string(out))
}

Get Started Free

Try our sandbox API with no authentication required

Try Sandbox Read Docs