Car runs awhile then runs rough . on 1991 Nissan Stanza

Car starts runs well for 10-20 min , then starts to run very rough and dies if you try to idle . let it set for a while and you start the whole thing over again . Have changed fuel filter . Not sure where to go from hear ?

Asked by for the 1991 Nissan Stanza
1990 stanza runs like a ner car for 2 hours then starts to jitter bug
it runs ,skips. i stop turn it off for 4 min. then it will run like a new car again.

my email is i can not pay for help.
check the engine temp sensor and O2 sensor