I think you need more work on this. The recommended tagging as per the wiki is amenity=social_facility with social_facility=nursing_home. Also you would need to change the “around” from 5000 to 10000 as your post says “within 10km radius” unless I’m understanding you wrongly? And, I never use the timeout thing in any queries!
This will should find most of them within a 10km radius of Derby city centre, even the ones that have non-standard tagging, and display them on the map. Just change the lat,lon to wherever. The second line is commented out but that would output as text ready to copy and paste into a spreadsheet.
Hi, a more simple version for your reference.
You can take a look at this code that I use for equine-assisted centers and adjust to 10 km. It finds the center of the slippy map without having to enter in a specific lat/lon.
[out:json][timeout:25];
// the center macro will determine the map's center as shown.
nw(around:5000, {{center}})["social_facility"~"(nursing_home|care_home)"];
nw(around:5000, {{center}})["amenity"~"(nursing_home|care_home)"];