In 1824 , a ketchup recipe using tomatoes appeared in The Virginia Housewife . This was an important 19th-century cookbook written by Mary Randolph , Thomas Jefferson 's cousin . In 1824 , a ketchup recipe using tomatoes appeared in The Virginia Housewife ( an influential 19th-century cookbook written by Mary Randolph , Thomas Jefferson 's cousin ) .