Field masks
Field masks allow you to specify which fields you want to include in the response. This can help reduce the amount of data returned and improve performance.
How to use field masks
Section titled “How to use field masks”To use field masks, you can include the fields query parameter in your API request. The value of this parameter should be a comma-separated list of the fields you want to include in the response.
For example, if you want to include only the ip,country_code, and country_name fields in the response, you can make a request like this:
curl https://api.ip-sonar.com/v1/myip?fields=ip,country_code,country_nameThis will return a response that includes only the specified fields:
{ "country_code": "US", "country_name": "United States", "ip": "x.x.x.x"}Supported fields
Section titled “Supported fields”The following fields are supported for field masks:
accuracy_radiuscity_namecontinent_codecontinent_namecountry_codecountry_nameipis_in_eulatitudelongitudepostal_codesubdivision_1_codesubdivision_1_namesubdivision_2_codesubdivision_2_nametimezone
Please remember, if you do not specify the fields parameter, the API will return all available fields by default.