{"openapi":"3.1.0","info":{"title":"Blood Type API","version":"1.0.0","description":"Blood-type compatibility as an API, covering the ABO and Rh(D) systems, computed locally and deterministically. The compatibility endpoint says whether a given donor can give to a given recipient, for both red blood cells and plasma — the red-cell rule being that the donor's antigens must be a subset of the recipient's (Rh included), and plasma being the reverse and ignoring Rh. The info endpoint describes a blood type: the antigens it carries, the antibodies in its plasma, every type it can receive red cells from and donate red cells to, who it can give plasma to, whether it is a universal red-cell donor (O−), universal red-cell recipient (AB+) or universal plasma donor (AB), and its approximate US population frequency. The donors endpoint lists every compatible donor type for a recipient, for red cells or plasma. Blood types are accepted in many forms (O-, O neg, AB positive, …). Everything is computed locally and deterministically, so it is instant and private. This is educational only — real transfusion requires laboratory cross-matching and clinical judgement, and it is not medical advice. Ideal for medical-education and first-aid apps, blood-donation and health tools, and quiz and reference sites. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is ABO/Rh compatibility; for a drug reference database use a drug API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/bloodtype-api","description":"oanor gateway"}],"tags":[{"name":"Blood"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/compatibility":{"get":{"operationId":"get_v1_compatibility","tags":["Blood"],"summary":"Donor → recipient compatibility","description":"","parameters":[{"name":"donor","in":"query","required":true,"description":"Donor blood type","schema":{"type":"string"},"example":"O-"},{"name":"recipient","in":"query","required":true,"description":"Recipient blood type","schema":{"type":"string"},"example":"AB+"},{"name":"component","in":"query","required":false,"description":"rbc|plasma (default rbc)","schema":{"type":"string"},"example":"rbc"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Red-cell rule: donor antigens must be a subset of the recipient's (Rh included). Plasma is the reverse and ignores Rh.","input":{"donor":"O-","component":"rbc","recipient":"AB+"},"compatible":true,"disclaimer":"Educational only — actual transfusion requires laboratory cross-matching and clinical judgement. Not medical advice.","rbc_compatible":true,"plasma_compatible":false},"meta":{"timestamp":"2026-06-04T01:59:17.004Z","request_id":"7d3668f9-92e4-4ccf-a07f-65672e46b8d0"},"status":"ok","message":"Donor/recipient compatibility","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/donors":{"get":{"operationId":"get_v1_donors","tags":["Blood"],"summary":"Compatible donors for a recipient","description":"","parameters":[{"name":"recipient","in":"query","required":true,"description":"Recipient blood type","schema":{"type":"string"},"example":"A+"},{"name":"component","in":"query","required":false,"description":"rbc|plasma","schema":{"type":"string"},"example":"rbc"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Red-cell donors this recipient can safely receive from.","input":{"component":"rbc","recipient":"A+"},"disclaimer":"Educational only — actual transfusion requires laboratory cross-matching and clinical judgement. Not medical advice.","donor_count":4,"compatible_donors":["O-","O+","A-","A+"]},"meta":{"timestamp":"2026-06-04T01:59:17.083Z","request_id":"7e3f3f5b-abd4-41f0-b356-68c9881c2d3d"},"status":"ok","message":"Compatible donors","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/info":{"get":{"operationId":"get_v1_info","tags":["Blood"],"summary":"Blood type details","description":"","parameters":[{"name":"type","in":"query","required":true,"description":"Blood type","schema":{"type":"string"},"example":"A+"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Antigens present, plasma antibodies, and RBC/plasma compatibility for this type.","type":"A+","antigens":["A","RhD"],"disclaimer":"Educational only — actual transfusion requires laboratory cross-matching and clinical judgement. Not medical advice.","plasma_antibodies":["anti-B"],"rbc_can_donate_to":["A+","AB+"],"universal_rbc_donor":false,"plasma_can_donate_to":["O-","O+","A-","A+"],"rbc_can_receive_from":["O-","O+","A-","A+"],"us_frequency_percent":35.7,"universal_plasma_donor":false,"universal_rbc_recipient":false},"meta":{"timestamp":"2026-06-04T01:59:17.160Z","request_id":"49d6cf00-b596-4950-b9eb-c3756da3b360"},"status":"ok","message":"Blood type info","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Educational only. Educational only — actual transfusion requires laboratory cross-matching and clinical judgement. Not medical advice.","types":["O-","O+","A-","A+","B-","B+","AB-","AB+"],"service":"bloodtype","endpoints":{"/v1/info":"Antigens, antibodies, who a type can give to / receive from, and frequency.","/v1/donors":"All compatible donor types for a recipient (red cells or plasma).","/v1/compatibility":"Whether a donor can give to a recipient (red cells and plasma)."},"description":"ABO + Rh blood-type compatibility: red-cell and plasma donor/recipient rules, antigens/antibodies and population frequency."},"meta":{"timestamp":"2026-06-04T01:59:17.244Z","request_id":"5ab2bf1a-af68-45c1-b484-b979232af363"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":11535,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":1305,"monthly_call_quota":21150,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":3295,"monthly_call_quota":261500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":7095,"monthly_call_quota":1350000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/bloodtype-api"}