Limiting entries object when using as json_encode
As per the docs:

Element queries are specialized query builders under the hood, so they
support most of the same methods provided by craft\db\Query.

...So, in your case you could use select() to only select the fields you want:
{% set services = craft.entries.section('services').asArray().select(['title','id','url']).all() %}