With a knife, cut a small cross cut on the skin of tomatoes, on the opposite side of the stem end. Place the tomatoes in a large pot of boiling water and blanch for about 4 minutes. Place in cold water, then peel. If the tomatoes do not peel easily, use a vegetable peeler. Thinly slice the tomatoes. Place in a large saucepan with the salt. Let drain overnight.
Drain.
Place the pickling spices in a tea-infuser ball or a piece of cheesecloth and tie tightly.
In a large saucepan, add the tomatoes, onions, apples, celery, pickling spices and vinegar.
Bring to a boil, reduce the heat to medium and cook, uncovered, for about 2 hours 30 minutes, stirring occasionally. Add the sugar and cook for 1 hour over low heat, stirring occasionally.
Pour into hot sterilized jars. Sterilize the filled and tightly seal the ketchup jars in boiling water for 15 minutes to ensure a long shelf life. You can also freeze the ketchup without sterilization.