/api/astro/general_prediction/1 créditoPrevisões gerais
Uma leitura em texto sobre caráter e vida, montada a partir de um mapa natal: o temperamento do signo lunar, o que cada um dos nove planetas significa na casa que ocupa e o que cada um dos doze senhores das casas significa na casa para onde foi. É a contraparte narrativa de /api/astro/chart_analysis/, que retorna praticamente a mesma estrutura como dados. O texto vem de fontes publicadas — a seção do signo lunar cita How to Judge a Horoscope, de B. V. Raman, em uma leitura e uma segunda fonte na outra —, então o mesmo mapa sempre gera o mesmo texto. Envie o momento do nascimento, o local e o deslocamento UTC; não há outras opções. Tudo vem como fragmentos HTML com títulos em negrito e quebras de linha, prontos para inserir em uma página. Atenção: neste endpoint, o campo do deslocamento UTC se chama `timezone`, e não `timezone_as_float`.
https://api.occultapi.com/api/astro/general_prediction/Autenticação
Envie sua chave no cabeçalho X-API-Key. A chave é uma credencial de servidor — nunca a coloque no JavaScript do navegador nem num app mobile.
X-API-Key: yt_live_a1b2c3d4_…
Content-Type: application/jsonCampos da requisição
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
| date_time | string (date-time) | obrigatório | O momento a calcular, em ISO 8601. SEMPRE inclua um deslocamento ou um Z no final - um valor sem fuso horário é lido como Asia/Kolkata (UTC+05:30), não como UTC, e pode retornar o resultado do dia anterior com um 200. '2026-09-01T06:00:00Z' e '2026-09-01 06:00:00' são instantes diferentes e dão respostas diferentes. Restrição de FORMATO. DRF DateTimeField: apenas ISO-8601 (formatos de entrada padrão do DRF), por exemplo "2026-09-01T06:00:00+05:30", "2026-09-01T06:00:00Z" ou "2026-09-01 06:00:00" (sem fuso horário = assume-se UTC). |
| keys | array | obrigatório | Quais cálculos retornar, como uma lista de nomes. Veja a tabela de chaves deste endpoint; um nome não reconhecido rejeita a requisição inteira. Uma chamada custa um crédito, não importa quantas chaves você peça, então solicite tudo o que precisa de uma vez em vez de fazer várias chamadas. get_prediction_detailsArray de strings; existe apenas uma chave. |
| latitude | number (double) | obrigatório | Latitude do local, em graus decimais. Positivo é norte, negativo é sul. Exemplo: 26.9124 para Jaipur, 40.7128 para Nova York. Minutos e segundos não são aceitos - converta antes. min -90 · max 90 |
| longitude | number (double) | obrigatório | Longitude do local, em graus decimais. Positivo é leste, negativo é oeste. Exemplo: 75.7873 para Jaipur, -74.0060 para Nova York. Atenção ao sinal: sem o sinal de menos, Nova York vai parar na China. min -180 · max 180 |
| timezone | number (double) | obrigatório | Deslocamento UTC do local, em horas, como número decimal. Exemplo: 5.5 para a Índia (UTC+05:30). Equivale a timezone_as_float, nome que outros endpoints usam para o mesmo valor. |
Chaves disponíveis (1)
Liste em keys só os cálculos que você quer. Uma chave desconhecida faz a requisição inteira ser rejeitada. O custo é 1 crédito, não importa quantas chaves você peça — então agrupe tudo numa chamada só.
| Chave | Campos extras exigidos | Descrição |
|---|---|---|
| get_prediction_details | — | A leitura escrita completa, como um objeto de quatro strings HTML. 'Janma rasi_1' e 'Janma rasi_2' trazem duas leituras independentes das tendências mentais, físicas e gerais do signo lunar; 'Planets' percorre os nove planetas pela casa que cada um ocupa, contada a partir do ascendente; 'Houses' percorre os doze senhores das casas pela casa que ocupam. Cada valor é um único fragmento HTML com subtítulos em negrito. |
Exemplo de requisição
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}'Resposta
{
"_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"
}Capturada de uma chamada real, com exatamente a requisição acima. Os resultados ficam em data, sob cada chave que você pediu.
Erros
Erros de consumo de créditos retornam { "error": "…", "message": "<code>", "is_error": true }. Mostre error para o usuário e use message para decidir o que fazer no código. Consulte a referência de erros.