Skip to content
POST/api/astro/pdf/horoscope/25 credits

Horoscope PDF report

A complete Vedic horoscope as a finished PDF, in one call. The response body IS the PDF (`application/pdf`) — there is no second request and no hosted file. Forty-plus pages: birth details and panchang, planetary positions with nakshatra lords, the lagna chart in both North and South Indian styles, the Moon chart, twelve divisional charts, house cusps, planetary friendships, KP placements, Sarvashtakavarga plus a page of Bhinnashtakavarga for every graha, three dasha systems with the running period expanded into sub-periods, Kala Sarpa and Manglik findings, the full Sade Sati timeline with its Ardha Kantaka and Ashtama Shani passages, numerology, gemstone, rudraksha and mantra recommendations, and a reading for each of the nine grahas. WE STORE NOTHING. Report APIs usually write the file to a bucket and hand back a link, which means a birth chart — a name, a birth time, a set of predictions — sits at a public URL for as long as the object lives. The bytes come back to you instead. Nothing is written on our side and there is no link for anyone else to find. If you want a hosted copy, save these bytes yourself, with your own expiry and your own access rules. WHITE LABEL. Everything in `branding` is optional and appears on the cover, the running header and the footer, so your customer sees your name. Nothing in the document carries ours. THE BIRTH MOMENT. Send either `date_time` as ISO 8601, or the separate `day`/`month`/`year`/`hour`/`minute` fields with `timezone_as_float`. Sending both is rejected rather than resolved in your favour: when the two disagree there is no safe way to pick one, and the result would be a confidently wrong chart. Every figure is computed by the same endpoints this API serves — the positions on page 3 are exactly what /api/astro/planet-positions/ returns. Sections fail independently: if one calculation is undefined for a chart, that page says so and the rest of the report is still produced. The `X-Report-Sections-Failed` response header counts how many, so you can tell a full report from a thin one without opening it. Typical end-to-end time is under two seconds.

https://api.occultapi.com/api/astro/pdf/horoscope/
Test Request

Authentication

Send your key in the X-API-Key header. Keys are server-side credentials — never put one in browser JavaScript or a mobile app.

X-API-Key: yt_live_a1b2c3d4_…
Content-Type: application/json

Request fields

FieldTypeRequiredNotes
latitudenumber (double)required

Latitude of the place, in decimal degrees. Positive is north, negative is south. Example: 26.9124 for Jaipur, 40.7128 for New York. Minutes and seconds are not accepted - convert first.

min -90 · max 90

longitudenumber (double)required

Longitude of the place, in decimal degrees. Positive is east, negative is west. Example: 75.7873 for Jaipur, -74.0060 for New York. Note the sign: a missing minus puts New York in China.

min -180 · max 180

ayanamsastringoptional
brandingobjectoptional

Reseller details printed on the cover, header and footer.

chart_stylestringoptional

Which convention the birth chart is drawn in. Both are included by default.

northsouthboth
date_timestring (date-time)optional

The moment to calculate for, ISO 8601. ALWAYS include an offset or a trailing Z - a value with no zone is read as Asia/Kolkata (UTC+05:30), not UTC, and can return the previous day's result with a 200. '2026-09-01T06:00:00Z' and '2026-09-01 06:00:00' are different instants and give different answers.

dayintegeroptional

Day of the month as a number, 1-31.

min 1 · max 31

genderstringoptional
hourintegeroptional

Hour of birth in 24-hour form, 0-23. Local time at the place of birth.

min 0 · max 23

minuteintegeroptional

min 0 · max 59

monthintegeroptional

Month of birth as a number, 1-12. January is 1.

min 1 · max 12

namestringoptional
placestringoptional
timezone_as_floatnumber (double)optional

UTC offset of the place, in hours, as a decimal. Example: 5.5 for India (UTC+05:30), -5 for New York in winter, 5.75 for Nepal. This is NOT validated against date_time - if the two disagree you get a successful response for the wrong moment, so derive both from the same source. Use the offset in force on that date, not today's: a summer birth in a country with daylight saving needs the summer offset.

min -12 · max 14

yearintegeroptional

Year of birth as a number, e.g. 1990. Four digits.

min 1800 · max 2200

Example request

curl -X POST https://api.occultapi.com/api/astro/pdf/horoscope/ \
  -H "X-API-Key: $OCCULT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Ajeet Kanojia","gender":"male","date_time":"1985-02-23T05:45:00+05:30","latitude":20.8833,"longitude":76.2,"timezone_as_float":5.5,"place":"Malkapur, Maharashtra, India","chart_style":"both","branding":{"company_name":"Acme Astrology","company_info":"Vedic reports since 2011.","company_email":"hello@acme.example","company_mobile":"+91 90000 00000","domain_url":"https://acme.example","footer_link":"acme.example"}}'

Response

Errors

Metering errors return { "error": "…", "message": "<code>", "is_error": true }. Show error to people and branch on message. See the error reference.