I just had this SAME issue exactly.
I was looking at the documentation for the wrong version and there is a slight syntax difference. Looks like you need to wrap the script and specify inline for the version if yours is similar version as mine.
curl -XPOST 'localhost:9200/scraped_links/_update_by_query' -d '{
"script": {
"inline":"ctx._source.scraped_data = 0"
},
"query": {
"term": {
"scraped_data": 1
}
}
}'