I've been looking into the Stack Exchange API, and thinking of building a bot.
That is awesome! Bots are very popular programming assignments (either voluntary or mandatory).
I often see posts by new users that have poor spelling and grammar.
Yes, not all users have English as their first language and we're not all Peter Mortensen.
I figure that a bot can easily do the job of fixing this up
If you have come to the conclusion that the API offers end-points for reading a post and making an edit, you're right. However, language and specially grammar and spelling, is a complex matter as it often needs context to be able to correct all issues.
I do not think that falls into the easy category. Keep in mind that code-blocks and things like citations should be left untouched. Not all posts might use the same markdown for that, causing troubles to make the right decision, either for users or bots...
I know it's not the most useful way to help out, but it can't hurt?
Fixing grammar and spelling is useful and encouraged.
You should read How does editing work? to familiarize yourself and your bot with the basic rules of editing, among others.
It can hurt if you only fixes a few things and not the whole post. All editors, including you (and your bot) should aim for fixing a post 100% so that no other user would feel the need to edit it again. This is assuming your bot is not polishing a turd.
If you fail that it does hurt. Their might be consequences as making useless, low quality edits is considered abuse. Users get suspended for that. Your bot would have to understand and comply with How does editing work
So my question is, would it be okay to build a bot like this?
It is okay to make such bot as long as you make sure its logic will beat the Turing test. That is, the edits made by your bot would be recognized by the community as if they are made by a human. If you can't come near that goal, your bot will not be okay.
Also, how often would it be acceptable for the bot to edit posts? As in, how many times per minute, or second?
That is laid out in the throttling guide:
- not more than 30 requests a second per single IP
- maximum 10,000 calls per day (with an access_token)
- honor the dynamic throttle given in the
backoff
parameter
Keep in mind that editing a post bumps it on the active tab. Enough users keep an eye on that tab. Trying to edit a lot of posts as quickly as possible might not win you the popularity prize. Again, speed is not the biggest challenge here...