{"openapi":"3.2.0","info":{"title":"4D Results ASEAN API","description":"Provides 4D results from Malaysia and Southeast Asia regions.","version":"1.0.0"},"servers":[{"url":"https://4d-asean.jojapi.net"}],"security":[{"ApiKeyAuth":[]}],"tags":[{"name":"Standard Endpoints"}],"x-agent-commerce":{"catalog_url":"https://4d-asean.jojapi.net/_jojapi/agent/plans","discovery_url":"https://4d-asean.jojapi.net/.well-known/x402","directory_url":"https://agents.jojapi.net/apis/4d-results-asean","docs":"https://docs.jojapi.com/consumers/agents"},"paths":{"/v1/draw-results":{"post":{"operationId":"post_v1_draw_results","summary":"Latest Draw Results","description":"Fetch latest draw results.","tags":["Standard Endpoints"],"responses":{"200":{"description":"Response 200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"game_provider":{"type":"string"},"game_type":{"type":"string"},"draw_date":{"type":"string"},"draw_no":{"type":"string"},"results":{"type":"object","properties":{"consolation":{"type":"array","items":{"type":"string"}},"p1":{"type":"string"},"p2":{"type":"string"},"p3":{"type":"string"},"starter":{"type":"array","items":{"type":"string"}}}}}}},"examples":{"Success-Response":{"summary":"Success Response","value":[{"game_provider":"gdlotto","game_type":"4d","draw_date":"2026-05-18T00:00:00Z","draw_no":"","results":{"consolation":["3230","9035","5352","4095","8439","8377","1568","6297","8031","5305"],"p1":"6958","p2":"8176","p3":"4251","starter":["4266","4755","3622","9639","3756","8832","9363","1882","8110","1865"]}}]}}}}},"400":{"description":"Error code 400 Bad Request","content":{"application/json":{"examples":{"Invalid-Game-Provider":{"summary":"Invalid Game Provider","value":{"error":"Invalid game provider"}},"Invalid-Game-Type":{"summary":"Invalid Game Type","value":{"error":"invalid game type"}}}}}},"402":{"description":"Payment required — pay per request with x402/mpp (offer in the PAYMENT-REQUIRED / WWW-Authenticate headers and the JSON body), or send a JoJ API key."}},"x-payment-info":{"protocols":["x402","mpp"],"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"intent":"charge"},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"game_provider":{"type":"string"},"game_type":{"type":"string"}}},"example":{"game_provider":"gdlotto","game_type":"4d"}}}}}},"/v1/draw-results-history":{"post":{"operationId":"post_v1_draw_results_history","summary":"Draw Results History","description":"Get lottery results history.","tags":["Standard Endpoints"],"responses":{"200":{"description":"Response 200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"game_provider":{"type":"string"},"game_type":{"type":"string"},"draw_date":{"type":"string"},"draw_no":{"type":"string"},"results":{"type":"object","properties":{"consolation":{"type":"array","items":{"type":"string"}},"p1":{"type":"string"},"p2":{"type":"string"},"p3":{"type":"string"},"starter":{"type":"array","items":{"type":"string"}}}}}}},"examples":{"Success-Response":{"summary":"Success Response","value":[{"game_provider":"sportstoto","game_type":"4d","draw_date":"2026-05-06T00:00:00Z","draw_no":"6127/26","results":{"consolation":["2506","6516","0574","9973","0957","8119","7334","8106","1413","5839"],"p1":"5396","p2":"9186","p3":"4828","starter":["4411","5941","3134","7896","9527","9212","5476","3554","4729","4036"]}}]}}}}},"400":{"description":"Error code 400 - Bad request","content":{"application/json":{"examples":{"Invalid-Game-Provider":{"summary":"Invalid Game Provider","value":{"error":"invalid game provider"}},"Invalid-Game-Type":{"summary":"Invalid Game Type","value":{"error":"invalid game type"}},"Invalid-Date-Range":{"summary":"Invalid Date Range","value":{"error":"date range must be within 3 months"}}}}}},"402":{"description":"Payment required — pay per request with x402/mpp (offer in the PAYMENT-REQUIRED / WWW-Authenticate headers and the JSON body), or send a JoJ API key."}},"x-payment-info":{"protocols":["x402","mpp"],"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"intent":"charge"},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"start_date":{"type":"string"},"end_date":{"type":"string"},"game_provider":{"type":"string"},"game_type":{"type":"string"}}},"example":{"start_date":"2026-05-01","end_date":"2026-05-14","game_provider":"sportstoto","game_type":"4d"}}}}}},"/v1/number-history":{"post":{"operationId":"post_v1_number_history","summary":"Lucky Number History","description":"Get past draw result history based on numbers and selected game provider.","tags":["Standard Endpoints"],"responses":{"200":{"description":"Response 200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"game_provider":{"type":"string"},"game_type":{"type":"string"},"draw_date":{"type":"string"},"draw_no":{"type":"string"},"matched_prizes":{"type":"array","items":{"type":"string"}},"results":{"type":"object","properties":{"consolation":{"type":"array","items":{"type":"string"}},"p1":{"type":"string"},"p2":{"type":"string"},"p3":{"type":"string"},"starter":{"type":"array","items":{"type":"string"}}}}}}},"examples":{"Success-Response":{"summary":"Success Response","value":[{"game_provider":"magnum","game_type":"4d","draw_date":"2020-10-03T00:00:00Z","draw_no":"413/20","matched_prizes":["p3"],"results":{"consolation":["1354","9451","2232","0846","0195","3835","2010","6739","7536","1896"],"p1":"4856","p2":"9929","p3":"1234","starter":["3236","6767","9366","9733","3438","2630","9947","2325","3527","2831"]}}]}}}}},"400":{"description":"Error code 400 - Bad request","content":{"application/json":{"examples":{"Invalid-Game-Provider":{"summary":"Invalid Game Provider","value":{"error":"invalid game provider"}},"Invalid-Game-Type":{"summary":"Invalid Game Type","value":{"error":"invalid game type"}},"Invalid-Date-Range":{"summary":"Invalid Date Range","value":{"error":"date range must be within 3 months"}}}}}},"402":{"description":"Payment required — pay per request with x402/mpp (offer in the PAYMENT-REQUIRED / WWW-Authenticate headers and the JSON body), or send a JoJ API key."}},"x-payment-info":{"protocols":["x402","mpp"],"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"intent":"charge"},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"game_provider":{"type":"string"},"number":{"type":"string"}}},"example":{"game_provider":"magnum","number":"1234"}}}}}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-JoJAPI-Key","description":"Your JoJ API key."}}}}