I don't have the data or time offhand, but if you're interested, have a look at ourworldindata.org; they probably have many relevant things.
"Santos ran as a Republican for the United States House of Representatives in New York's 3rd congressional district, against Democratic incumbent Tom Suozzi, launching his campaign in November 2019.[24] Normally, the Nassau County Republican Committee, known for the tight control that its leadership exercises over often competitive races for its nominations, would have discouraged an unknown candidate with such minimal experience. However, Suozzi was expected to win the race easily, and no other candidates had put their names forward."
If you otherwise meet the requirements for the seat--citizen (usually), resident , not a felon--you too can find a ballot line for a contest a party expects to lose.
I should add that I have no idea whether Santos actually was on the primary ballots.