/api/astro/general_prediction/1 кредитЗагальні прогнози
Текстове тлумачення характеру й життя за натальною картою: темперамент місячного знака, значення кожної з дев’яти планет у домі, де вона стоїть, і значення кожного з дванадцяти володарів домів у домі, куди він потрапив. Це текстовий відповідник /api/astro/chart_analysis/, який повертає приблизно ту саму структуру у вигляді даних. Текст узято з опублікованих джерел — розділ про місячний знак спирається на How to Judge a Horoscope Б. В. Рамана для одного тлумачення і на інше джерело для другого, — тож та сама карта завжди дає той самий текст. Надішліть момент і місце народження та зміщення від UTC; інших параметрів немає. Усе повертається як HTML-фрагменти з жирними заголовками й розривами рядків, готові до вставлення на сторінку. Зверніть увагу: на цьому ендпоінті поле зміщення від UTC називається `timezone`, а не `timezone_as_float`.
https://api.occultapi.com/api/astro/general_prediction/Автентифікація
Передавайте ключ у заголовку X-API-Key. Ключ — це серверні облікові дані: ніколи не вставляйте його в JavaScript, що виконується в браузері, чи в мобільний застосунок.
X-API-Key: yt_live_a1b2c3d4_…
Content-Type: application/jsonПоля запиту
| Поле | Тип | Обов’язкове | Примітки |
|---|---|---|---|
| date_time | string (date-time) | обов’язковий | Момент, для якого виконується розрахунок, у форматі ISO 8601. ЗАВЖДИ вказуйте зміщення або Z у кінці: значення без часового поясу читається як Asia/Kolkata (UTC+05:30), а не UTC, і може повернути результат за попередній день із кодом 200. '2026-09-01T06:00:00Z' і '2026-09-01 06:00:00' — різні моменти, і відповіді для них різні. Обмеження ФОРМАТУ. DRF DateTimeField: лише ISO-8601 (типові формати введення DRF), напр. "2026-09-01T06:00:00+05:30", "2026-09-01T06:00:00Z" або "2026-09-01 06:00:00" (без часового поясу вважається UTC). |
| keys | array | обов’язковий | Які розрахунки повернути, у вигляді списку назв. Див. таблицю ключів цього ендпоінта; через нерозпізнану назву відхиляється весь запит. Один виклик коштує один кредит незалежно від кількості запитаних ключів, тож запитуйте все потрібне одразу, а не кількома викликами. get_prediction_detailsМасив рядків; доступний лише один ключ. |
| latitude | number (double) | обов’язковий | Широта місця в десяткових градусах. Додатні значення — північ, від’ємні — південь. Приклад: 26.9124 для Джайпура, 40.7128 для Нью-Йорка. Хвилини й секунди не приймаються — спершу переведіть їх у градуси. min -90 · max 90 |
| longitude | number (double) | обов’язковий | Довгота місця в десяткових градусах. Додатні значення — схід, від’ємні — захід. Приклад: 75.7873 для Джайпура, -74.0060 для Нью-Йорка. Зверніть увагу на знак: без мінуса Нью-Йорк опиниться в Китаї. min -180 · max 180 |
| timezone | number (double) | обов’язковий | Зміщення місця від UTC у годинах, десятковим дробом. Приклад: 5.5 для Індії (UTC+05:30). Означає те саме, що й timezone_as_float, — інші ендпоінти просто називають це поле інакше. |
Доступні ключі (1)
Перелічіть у keys саме ті розрахунки, які вам потрібні. Один невідомий ключ — і відхиляється весь запит. Скільки б ключів ви не запитали, спишеться 1 кредит, тож збирайте їх в один виклик.
| Ключ | Додаткові поля | Опис |
|---|---|---|
| get_prediction_details | — | Повне текстове тлумачення — об’єкт із чотирьох HTML-рядків. 'Janma rasi_1' і 'Janma rasi_2' дають два незалежні тлумачення розумових, фізичних і загальних схильностей за місячним знаком; 'Planets' описує кожну з дев’яти планет у домі, де вона стоїть, з відліком від асцендента; 'Houses' — кожного з дванадцяти володарів домів у домі, де він стоїть. Кожне значення — один HTML-фрагмент із жирними підзаголовками. |
Приклад запиту
curl -X POST https://api.occultapi.com/api/astro/general_prediction/ \
-H "X-API-Key: $OCCULT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"keys":["get_prediction_details"],"date_time":"2025-07-09T10:26:45.109Z","latitude":26.9124,"longitude":75.7873,"timezone":0}'Відповідь
{
"_truncated": true,
"_note": "Response shortened for the catalogue.",
"preview": "{\"data\": {\"get_prediction_details\": {\"Janma rasi_1\": \"<html><b>General Predictions</b><br><b>Source: How to judge a horoscope - BV. Raman</b><br><b>Mental Tendencies</b><br>Those born in Sagittarius have an inclination for philosophy and occult studies. They can acquire great<br><b>Physical Tendencies</b><br>Persons born in this sign are generally inclined towards corpulence. They possess almond eyes and their hair is brown. They are usually good looking. Evenly set teeth, a happy smile, and fullness of the figure characterise the natives of Dhanus.<br><b>General Tendencies</b><br>They are of a phlegmatic temperament. They are too conventional and also businesslike. They are prompt and uphold conservative views. They are sympathetic and loving, and possess good foresight. At times they are restless and over-anxious. They are too callous and enthusiastic. They hate all external show. They are God-fearing, honest, humble and free from hypocrisy. They exercise strict control over their food and drinks and in regard to their relations with the opposite sex. They are prone to be misunderstood unintentionally by others. In late years they must be careful about their lungs as they are liable to suffer from rheumatic pains and the like.<br>\", \"Janma rasi_2\": \"<html><b>General Predictions</b><br><b>Source: ChinmayaAstrolger.com</b><br><b>Specific Characteristics</b><br> You will have a sober mind, good judgement and a quick intellect. But richness of intellect and lack of concern for method may lead you to profusion and disorder. You will have versatility and capacity of general work. You will have a few enemies - sort of jealous people - but will always remain a victor over the vanquished. You will have studies in the fields of arts, literature, law and philosophy. You will have restless activities of mind, together with the rich creative power. You will have much romance, fertile imagination and life in foreign / distant lands. These may conduce to high renown and give wealth and good fortune. You are likely to gain through an inheritance or a legacy. Your chief characteristics are philosophical and literary pursuits and in-depth researches of a scientific nature. You have a taste for lofty speculation and your strong passions are well-controlled. Your mind will be philosophical and the temperament sober. Although riches will be difficult to acquire in initial stages, riches are certain to you. You will have a few steadfast friends.<br><b>Mental Qualities</b><br>You will be inclined to philosophy and religion, eclectic. You will not have much of interest in the intricacies of analytical sciences. Rather than becoming a store-house of information, you will acquire the superior capacity to have a quick overview of varied circumstances. You will be just, frank, generous, magnanimous and even-tempered.<br><b>Physical Attributes</b><br> According to your Horoscope, you will have a tall, upright and well-proportioned figure. You will have an elongated face, rounded forehead with grey, brown or blue eyes - sparkling and expressive. You will have fair complexion and receding hairline balding about the temples. You will be of athletic building and will be fond of athletics and other expeditious activities.<br><b>General State of Health</b><br> Your zodiacal sign has governance over genito-urinary system, external generative organs, excretory system, cervix, coccyx and prostrate gland. These are your vulnerable areas. Elimination or disorder in connection with elimination will determine your remaining in desired state of health or suffering from disease. You should take special care and exercise fullest possible control over your intake of food and drink, and also over your arousal of strong passions - which may increase the level of toxins in the body. You should have plenty of sleep and should remain in a relaxed state of mind. You should take more of leeks, radishes, garlic, ginger and ginseng.Since the Ascendant has no affliction in your c"
}Записано з реального виклику з точно таким запитом, як вище. Результати лежать у data під тими ключами, які ви запитали.
Помилки
Помилки обліку кредитів мають вигляд { "error": "…", "message": "<code>", "is_error": true }. Людям показуйте error, а логіку будуйте на message. Детальніше — у довіднику помилок.