The API provided by cancerprediction.org allows HTTP POST requests of only one type: application/json.
Requests can be made using API platforms such as Postman or by creating an XMLHttpRequest (XHR), and should be directed to https://www.cancerprediction.org/api.
To make a successful API request, the 32 keys in the “Keys” section must be used in the given order. For “Values,” strings, floats, and integers are the only accepted types.
This API is useful for obtaining large quantities of predictions from cancerprediction.org’s machine learning model.
Every key value must be convertible to either type int or float.
age (years):
Numeric
height1 (feet):
Numeric
height2 (inches):
Numeric
weight (pounds):
Numeric
sex:
1=“Male”
2=“Woman”
race7:
1=“White, Non-Hispanic”
2=“Black, Non-Hispanic”
3=“Hispanic”
4=“Asian”
5=“Pacific Islander”
6=“American Indian”
7=“Missing”
educat:
1=“Less Than 8 Years”
2=“8-11 Years”
3=“12 Years Or Completed High School”
4=“Post High School Training Other Than College”
5=“Some College”
6=“College Graduate”
7=“Postgraduate”
marital:
1=“Married Or Living As Married”
2=“Widowed”
3=“Divorced”
4=“Separated”
5=“Never Married”
occupat:
1=“Homemaker”
2=“Working”
3=“Unemployed”
4=“Retired”
5=“Extended Sick Leave”
6=“Disabled”
7=“Other”
cig_stat:
0=“Never Smoked Cigarettes”
1=“Current Cigarette Smoker”
2=“Former Cigarette Smoker”
cig_years:
0.5=“Six Months”
0=“0”
1=“1-10”
2=“11-20”
3=“21-30”
4=“31-40”
5=“41-60”
6=“61-80”
7=“81+”
cigar:
0=“Never”
1=“Current Cigar Smoker”
2=“Former Cigar Smoker”
pipe:
0=“Never”
1=“Current Pipe Smoker”
2=“Former Pipe Smoker”
0=“No”
1=“Yes”
0=“No”
1=“Yes, Immediate Family Member”
9=“Possibly - Relative Or Cancer Type Not Clear”
Numeric
0=“None”
1=“1/Day”
2=“2+/Day”
3=“1/Week”
4=“2/Week”
5=“3-4/Week”
6=“<2/Month”
7=“2-3/Month”
0=“None”
1=“1/Day”
2=“2+/Day”
3=“1/Week”
4=“2/Week”
5=“3-4/Week”
6=“<2/Month”
7=“2-3/Month”
The following diseases/events refer to keys #18 and onward in the “Keys” section. Depending on whether or not the disease/event occurred, the “Values” are:
0=“No”
1=“Yes”
Arthritis
Bronchitis
Colon Comorbidities
Diabetes
Diverticulitis/Diverticulosis
Emphysema
Gallbladder Stones or Inflammation
Heart Attack
Hypertension
Liver Comorbidities
Osteoporosis
Colorectal Polyps
Stroke
Note the mixed use of strings, floats, and integers.
Payload must be of type JSON.