I'm using the following format:
/w/api.php?action=expandtemplates&text=***&prop=wikitext&format=json
but categories are still being added to the wikitext. How to disable it?
I'm using the following format:
/w/api.php?action=expandtemplates&text=***&prop=wikitext&format=json
but categories are still being added to the wikitext. How to disable it?
Categories will be included if they're part of the actual wikitext. There's no way to disable that other than to use a RegEx replace or similar means. (Keep in mind that unless you're deliberately removing categories from the page, you will have to add them all back in, in their correct locations, if you're going to be saving the text later on.)
Good to know: If you get this warning you probably want to add &prop=wikitext
to the request.
Because no values have been specified for the prop parameter, a legacy format has been used for the output. This format is deprecated, and in the future, a default value will be set for the prop parameter, causing the newformat to always be used.