# Hosted election search

Search a bounded window for a declared set of sky conditions over HTTP.

Engine 1.0.0: On npm.
Archive identity and release status: https://zodiacs.org/developers/engine/

## State the conditions

This is the Compute API's committed synthetic example. It asks for a waxing Moon outside void-of-course periods, direct Mercury and angular Jupiter at a declared place. It is a traditional selection rule, not a prediction of an outcome.

~~~javascript
const request = {
  from: '2026-12-09T00:00:00Z',
  to: '2026-12-12T00:00:00Z',
  conditions: [
    { kind: 'phase', phase: 'waxing' },
    { kind: 'void-of-course', not: true },
    { kind: 'retrograde', body: 'Mercury', not: true },
    { kind: 'angular', body: 'Jupiter' },
  ],
  place: { latitude: 51.5072, longitude: -0.1276, houseSystem: 'placidus' },
};
const response = await fetch('https://zodiacs.org/api/v1/elections', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify(request),
});
const result = await response.json();
if (!response.ok) throw new Error('The service refused this request: ' + response.status);
console.log(result);
~~~

## Read the guarantee

Keep the service's method, sampling policy, budgets and receipts with the returned stretches. Do not label a sampled result as proven complete. A budget refusal means the request was not completed.

Use only the conditions the endpoint documents. The HTTP call transfers the request; obtain consent before sending any personal chart context.

## References

- [Compute API](https://zodiacs.org/developers/compute/)
- [OpenAPI](https://zodiacs.org/api/v1/openapi.json)
