I used the api to get sections information to build my custom toc.
But a few days age, I found it didn't work and I checked that it gets a error.
[WT81eApAAE4AAAUL8GwAAABB] Exception caught: The supplied ParserOptions are not safe to cache. Fix the options or set $forceParse = true.
It seems like it's a error of mw parser's ParserOptions which it can't be configured by the interface of the web API. Maybe it need to be fixed.