GET /v1/results
Every official draw of one day.
Parameters
date | date | The day, as the draws' local date. |
|---|
Returns V1DayPossible statuses 200400401403429500
Everything /v1 answers: endpoints, parameters, objects and errors, taken from the API's OpenAPI document.
$RC_API/v1/… Every request goes to that address followed by the path. The address is published with sign-up.Authorization: Bearer <token> Every request carries your token in that header. Tokens come with sign-up./v1/resultsEvery official draw of one day.
date | date | The day, as the draws' local date. |
|---|
Returns V1DayPossible statuses 200400401403429500
/v1/lotteriesThe available lotteries, with the days they draw.
Returns V1LotteriesPossible statuses 200401429500
/v1/lotteries/{id}/resultsOne lottery's history between two dates, one day per date.
id | integer | The lottery's id, from /v1/lotteries. |
|---|---|---|
from | date | First day of the range, included. |
to | date | Last day of the range, included. Up to 400 days after from, within your plan's history. |
Returns V1LotteryResultsPossible statuses 200400401403404429500
/v1/coverageThe first and the last day with official results.
Returns V1CoveragePossible statuses 200401404429500
V1DayOne day's official draws.
| Field | Type | Description |
|---|---|---|
date | date | The day, as the draws' local date. |
generatedAt | UTC date and time | When the answer was generated. |
draws | list of V1Draw | The official draws your plan already sees. |
V1DrawAn official draw.
| Field | Type | Description |
|---|---|---|
id | string | The draw's id on that day. |
lotteryId | integer | Its lottery's id. |
lottery | string | The lottery's name. |
sortition | string | The draw's name. |
country | one of unitedStates, dominicanRepublic, haiti, anguilla, sintMaarten, honduras, elSalvador, bonaire, panama | The lottery's country. |
date | date | The draw's local day. |
drawAt | UTC date and time | When it was drawn, in UTC. |
numbers | list of V1Number | The numbers drawn, in order. |
V1NumberOne number of the result.
| Field | Type | Description |
|---|---|---|
field | one of first, second, third, pickTwo, pickThree, pickFour, pickFive, pickFourSecond, pickFourThird | Which position or game it is: first, second and third in Dominican lotteries; pickTwo to pickFive in American ones. |
display | string | The number as published, zero-padded. |
V1LotteriesThe API's lotteries.
| Field | Type | Description |
|---|---|---|
lotteries | list of V1Lottery | Each available lottery. |
V1LotteryA lottery.
| Field | Type | Description |
|---|---|---|
id | integer | Its id, the one the other paths use. |
name | string | Its name. |
slug | string | Its URL name. |
schedule | list of integer | The days of the week it draws: 0 is Sunday, 6 is Saturday. |
V1LotteryResultsA lottery's history.
V1CoverageThe range of dates with official results.
| Field | Type | Description |
|---|---|---|
earliest | date | The first day with results. |
latest | date | The last day with results. |
ErrorResponseThe body of every error answer.
| Field | Type | Description |
|---|---|---|
erroroptional | one of internal, method.not_allowed, not_found, request.invalid, request.param.invalid, request.too_large, v1.plan_history, v1.quota_exceeded, v1.rate_limited, v1.unauthorized | The error code. |
paramsoptional | object of strings | Details, like the parameter that failed. |
Every error answers with an ErrorResponse object and the matching HTTP status.
| Code | Description |
|---|---|
internal | 500 · Server error. Try again. |
method.not_allowed | 405 · That path only accepts GET. |
not_found | 404 · The lottery or the path does not exist. |
request.invalid | 400 · The request could not be read. |
request.param.invalid | 400 · A parameter is not valid; params.name says which. |
request.too_large | 413 · The request is too large. |
v1.plan_history | 403 · The date is outside your plan's history. |
v1.quota_exceeded | 429 · You reached your plan's monthly limit. |
v1.rate_limited | 429 · You reached your plan's per-minute limit. |
v1.unauthorized | 401 · The token is missing or not valid. |
429 answers carry a Retry-After header: the seconds to wait before calling again, at least 1.
| Plan | Per minute | Per month | Delay | History |
|---|---|---|---|---|
| Basic | 10 | 1,000 | 15 min delay | 30 days |
| Pro | 60 | 50,000 | 5 min delay | 400 days |
| Ultra | 300 | 500,000 | Real time | 400 days |
| Mega | 1,000 | 3,000,000 | Real time | 400 days |
The full /v1 contract, to generate your client.
Download openapi.yaml