Document Engine

Astrology PDF API

Programmatically generate beautiful, multi-page Kundli and matchmaking reports. Fully white-labeled with your own brand logo, colors, and content delivered via secure CDN links.

Response: /v1/pdf/generate
{
  "status": "success",
  "report_id": "rep_8x9a2b4c",
  "document_type": "Comprehensive Kundli (42 Pages)",
  "language": "en",
  "download_url": "https://pdf.planetsxp.com/d/rep_8x9a2b4c.pdf",
  "expires_at": "2026-08-10T14:30:00Z"
}

White-Label

100% Your Branding

Multi-Language

English, Hindi & More

Webhooks

Async Delivery Support

CDN Hosted

Fast Secure Downloads

Built for Commercial Astrology Platforms

Don't spend months building a PDF generator. Use ours to monetize printable astrology reports instantly.

Complete Custom Branding

Pass your company logo, primary hex colors, and custom header/footer text in the JSON request. The resulting PDF will look like your team designed it.

Comprehensive Kundli

Generate massive 40+ page life reports containing basic details, all divisional charts, Dasha timelines, and AI-powered planetary predictions.

Matchmaking Reports

Pass two sets of birth details to generate a beautiful Ashtakoot Milan report, complete with Guna charts, Dosha analysis, and a final conclusion.

Multi-Language Support

Select the output language dynamically. The API fully supports English, Hindi, Marathi, Gujarati, and Bengali typography out of the box.

Managed Cloud Hosting

We host the generated PDFs on our secure AWS S3 / CloudFront infrastructure. You get a clean, temporary download URL to serve directly to your users.

Sync & Async Delivery

For short 2-page reports, get the URL synchronously. For massive 50-page reports, use our webhook system to get notified the second the render finishes.

Predictable Endpoints

Send birth data and brand styles, receive a professional document.

POST /v1/pdf/generate

Generate PDF Document

The primary document rendering endpoint. You specify the `report_type` (e.g., "kundli_basic", "kundli_comprehensive", "matchmaking"), supply the user's birth data, and attach your UI configuration object.

Request Payload (Snippet)
{
  "report_type": "kundli_comprehensive",
  "language": "hi",
  "user_data": {
    "name": "Rahul Sharma",
    "dob": "1990-08-15",
    "tob": "14:30",
    "lat": 28.6139,
    "lon": 77.2090
  },
  "branding": {
    "logo_url": "https://your-app.com/logo.png",
    "primary_color": "#4F46E5",
    "footer_text": "Generated by YourApp"
  }
}

Frequently Asked Questions

Everything you need to know about generating documents with the Astrology PDF API.

What is the Astrology PDF API?
The Astrology PDF API by PlanetsXP is a document generation service that allows developers to programmatically create beautifully formatted, multi-page astrology reports (like Kundlis and compatibility charts) in PDF format using simple REST requests.
Can I white-label the reports with my own branding?
Yes, it is a fully white label astrology pdf generator. By passing a `branding` object in your JSON request, you can inject your own company logo, set the primary and secondary hex colors to match your app's theme, and customize the header and footer text on every page.
Does the api generate a complete Kundli PDF?
Absolutely. The kundli pdf generator api supports multiple report sizes. The basic version includes standard planetary positions and the Lagna chart, while the comprehensive version generates a 40+ page document covering all divisional charts, Dashas, and deep predictive text.
What languages are supported in the PDF reports?
Currently, the kundli report api supports English, Hindi, Marathi, Gujarati, and Bengali. All astrological terms, chart labels, and predictive paragraphs will be fully translated and rendered with high-quality Unicode fonts.
Can I generate matchmaking or compatibility PDFs?
Yes. By specifying the `matchmaking` report type and passing the birth details for a boy and a girl, the API will generate an Ashtakoot Milan report detailing the 36-point Guna match, Dosha presence (like Manglik), and a final compatibility conclusion.
How are the PDF files delivered to my app?
Instead of returning a massive Base64 string that crashes mobile clients, our horoscope pdf api renders the file on our servers and returns a secure, temporary CDN link (e.g., an AWS S3 URL). You simply pass this link to your user so they can download or view the PDF directly.
How long does it take to generate a PDF?
Basic 2-5 page reports are generated synchronously in under 2 seconds. However, massive 50-page comprehensive reports can take 5-8 seconds to render. For these larger files, we recommend using our asynchronous webhook system.
How do the async webhooks work for large PDF reports?
If you trigger an async request, the API immediately returns a `202 Accepted` status with a `task_id`. Once the PDF finishes rendering in the background, our servers will automatically POST the final CDN download link to your designated webhook URL.
How long do the PDF links stay active?
For security and privacy compliance, the generated CDN download links automatically expire and the file is permanently deleted from our servers after 24 hours. If your users need permanent access, you should download the file to your own storage infrastructure.
How is the PDF API billed?
Unlike standard data endpoints that count as 1 API request, generating a PDF consumes a specific "Document Token" due to the heavy server processing and bandwidth required. PDF Generation is available exclusively on our Developer Pro and Business Scale pricing tiers.

Ready to automate your report generation?

Start building beautiful, branded astrology PDFs today. Explore the documentation to see the full UI configuration object.