Thanks! That clears some things up.
Using bash, I came up with this code:
for pg in {0..999}
do
curl -s --get -o lemmy-federate_nodes_pg"$pg".json\
--data-urlencode 'input={"search":"","skip":'"$((pg*50))"',"take":50,"enabledOnly":false}' \
'https://lemmy-federate.com/api/instance.find'
qty_of_items_returned=$(jq '.result.data.instances | length' < lemmy-federate_nodes_pg"$pg".json)
[[ "$qty_of_items_returned" -gt 0 ]] || break;
done
When it reached page 80, the array was zero in length so the loop was terminated at that moment. It started off taking 50 nodes per fetch but near the end the amount fetched gradually dropped off. I was expecting it to be 50 per fetch until the last page. I wonder if that’s a throttling feature? Anyway, it’s not problem. It worked.
update
updated the script above to not fetch redundant records