I would recommend working backwards: do some research on the attractions you want to see and anything else you think you might want to do and then determine how many days you need to do them. Honestly, I think you could spend a month in NYC doing all the touristy things and still not see everything. You can spend DAYS at the Met or any of the other large museums. What are your kids in to? Maybe start there and look at your options.
My DH spent a long weekend in NYC in Feb and we crammed a lot into that time but that's easier to do w 2 adults than when you have kids in tow (we have 3; 9yrs, 6yrs, and 2 yrs and we have not taken them yet). We were there for a Fri-Tues and saw 3 musicals, 1 play, and a cabaret act. And we went to MoMA, Fraunces Tavern, and the Tenement Museum.
MoMA is free on Fri night from 4-8 and that might be a good option bc you can hit the highlights of the museum and with the ages of your kids that might be all you need. But it would be cool for them to see some famous works (Van Gogh, Klimt, Monet, Picasso, etc). If you're in to American history there are some really neat things to see downtown - Fraunces Tavern (there is still a restaurant there as well as the museum) is where revolutionaries would meet and hold meeting prior to the war and it even served as offices for the federal government after the war. It is also where Washington said farewell to his officers at the close of the war. Its really cool to see the intimate places that these amazing historical figures actually stood. I would highly recommend the Tenement Museum. It is located in a 19th century tenement building and they have recontructed what the living quarters would have looked like for the immigrant families that would have lived here. You can look on their site to see which tours they are offering. They offer some options for kids where the guides are dressed in period attire and I've read that its a really great experience for kids because it is so immersive and really brings the history of these people to life. On past trips we have gone to the Guggenheim and the Whitney (both art museums that are very interesting but I wouldn't recommend unless you are really into art) and the Met. The Met is amazing and I could spend forever in there. I think there is a lot there that the kids would like (I know mine would love it). We've also done the Statue of Liberty and Ellis Island. We just rode the ferry by the Statue bc we really felt like that was enough to experience it (and I think the statue itself was actaully closed for renovations when we were there) but Ellis Island was extremely interesting and a must for anyone who is interested in the history of immigration.
Unless there is something in particular that you want to see (and even if there is) I would recommend just going to the TKTS booth (there are 2 in Manhatten and 1 in Brooklyn - the one everyone seems to know about is the one in Times Square). You can get tickets that are about 1/2 off to most shows that are not sold out. We saw Hamilton (you will def NOT find tix at TKTS for Hamilton - we are major theater nerds and paid an insane 3rd party broker price to see it but it was worth EVERY. LAST. CENT.), Something Rotten (Very funny but maybe not 100% child appropriate?? Look into the show and see what you think for your kids. Our kids have listened to the cast album and really like it but I don't know if I'd take them to see it yet), Les Miserables (closes at the beginning of Sept), and The Humans (one the Tony for best play this year; very very good not but for kids - nothing graphic or anything, just adult themes). We took our 2 oldest to see a touring production of Wicked in May and they LOVED it - its a great show. Aladdin and Lion King are still on - both safe bets w kids. Waitress is a newer show that is fantastic, but once again, prob too mature for the kiddies. There are several things opening in the coming months so keep an eye on that.
Kids would love Dylan's Candy Bar (our kids have been to the one in Chicago and thought it was paradise) and Serendipity 3 and taking them to Macy's and Bloomingdales would be fun just to see the huge stores.
There are several passes you can get that include admission to a lot of the touristy things for one price. Check into those.
As far as where to stay, I would comb through the deals on Priceline and similar sites and then check reviews for places you are interested in on Yelp and Trip Advisor. We have stayed in a hotel in Times Sqaure that is now called Row NYC (it was the Milford Plaza when we stayed there). Its very trendy and busy but would be convenient for getting to dfferent areas of the city and would be kid-friendly. You can usually get good deals there too. On our last trip we stayed at The Ace on 29th St (still a good central location) and it was great. Very trendy and full of hipsters so take that into account. We also stayed at The Paul (literally like 4 doors down from The Ace - we got snowed in and couldn't get an extra night at The Ace bc they were booked up). It was nice enough but nothing spectacular. Know when you're looking at hotels in NYC that they are generally tiny compared to hotels elsewhere. With 2 kids you may want to consider a suite.
Take advantage of the public transportion - a lot of out of towners are afraid of the subways but I have always felt perfectly safe and I really think its part of the NYC experience. We don't live in area that has public transportation so riding the lines in DC, Chicago, and Atlanta is always one of the things are kids look forward to when we go there.
I haven't been to Niagra Falls in about 20 years (went when I was in high school) and 2 days and a night was plenty of time to see and do what we wanted. They may have more going on up there now, just do some research and see what all there is that you want to do while you're there. 1 day may be plenty for you.
Happy planning! You will love NYC! We are going again this Sept but it will be more of a business trip so I don't know how much we will get to do outside of meetings and such. Just BEING there is enough for me.

I might love it as much as WDW but obv for very different reasons!