Request Details
Example Request Url
https://geodata.cdxtech.com/api/utility/servicelist?key={key}&servicename={servicename}&format={format}
Description | Required | Default Value | Example | |
key | Authentication Key | key=dd76pxfi4feydh4bz_dtrjyf6flu4-987asdjhajkd555usds28ad984yhz | ||
servicename | Optional service name filter | servicename=GeoRadius | ||
format | Output Formatting | json | format=json (supported formats: json, xml) |
Coding Examples
Here are some coding examples to get you started. Please feel free to contact support if you need additional assistance.
string key = "{your-key}";
string serviceName = "";
string format = "json";
HttpResponseMessage message = null;
using (HttpClient client = new HttpClient())
{
client.BaseAddress = new Uri("https://geodata.cdxtech.com");
StringBuilder url = new StringBuilder("/api/utility/servicelist?");
url.Append("key=").Append(key);
url.Append("&serviceName=").Append(serviceName);
url.Append("&format=").Append(format);
message = client.GetAsync(url.ToString()).Result;
}
import requests
def get_service_list(api_key, service_name, response_format="json"):
"""Fetch available services list using utility endpoint."""
base_url = "https://geodata.cdxtech.com"
endpoint = "/api/utility/servicelist"
url = f"{base_url}{endpoint}"
params = {
"key": api_key,
"serviceName": service_name,
"format": response_format,
}
response = requests.get(url, params=params)
response.raise_for_status()
try:
return response.json()
except ValueError:
return response.text
if __name__ == "__main__":
key = "{your-key}"
service_name = ""
format = "json"
data = get_service_list(key, service_name, format)
import json
if isinstance(data, (dict, list)):
print(json.dumps(data, indent=2))
else:
print(data)
// Cargo.toml
// [dependencies]
// reqwest = { version = "0.11", features = ["blocking", "json"] }
// serde = { version = "1.0", features = ["derive"] }
// serde_json = "1.0"
use std::error::Error;
fn get_service_list(
api_key: &str,
service_name: &str,
response_format: &str,
) -> Result> {
let client = reqwest::blocking::Client::new();
let resp = client
.get("https://geodata.cdxtech.com/api/utility/servicelist")
.query(&[
("key", api_key),
("serviceName", service_name),
("format", response_format),
])
.send()?
.error_for_status()?;
let json: serde_json::Value = resp.json()?;
Ok(json)
}
fn main() -> Result<(), Box> {
let api_key = "{your-key}";
let service_name = "";
let format = "json";
match get_service_list(api_key, service_name, format) {
Ok(data) => println!("Response JSON:\n{}", serde_json::to_string_pretty(&data)?),
Err(err) => eprintln!("Error fetching data: {}", err),
}
Ok(())
}
async function getServiceList({ key, serviceName, format = "json" }) {
const baseUrl = "https://geodata.cdxtech.com";
const endpoint = "/api/utility/servicelist";
const params = new URLSearchParams({ key, serviceName, format });
const url = `${baseUrl}${endpoint}?${params.toString()}`;
const response = await fetch(url);
if (!response.ok) {
throw new Error(`HTTP error! Status: ${response.status}`);
}
const text = await response.text();
try {
return JSON.parse(text);
} catch {
return text;
}
}
// Example usage:
(async () => {
const key = "{your-key}";
const serviceName = "";
const format = "json";
try {
const data = await getServiceList({ key, serviceName, format });
console.log("Response:", data);
} catch (err) {
console.error("Error fetching data:", err);
}
})();
Dim key As String = "{your-key}"
Dim serviceName As String = ""
Dim format As String = "json"
Dim message As HttpResponseMessage = Nothing
Using client As New HttpClient()
client.BaseAddress = New Uri("https://geodata.cdxtech.com")
Dim url As New StringBuilder("/api/utility/servicelist?")
url.Append("key=").Append(key)
url.Append("&serviceName=").Append(serviceName)
url.Append("&format=").Append(format)
message = client.GetAsync(url.ToString()).Result
End Using
The following is for the VBA-WEB Excel template available at http://vba-tools.github.io/VBA-Web/
Dim Client As New WebClient
Dim Request As New WebRequest
Dim key As String
Dim serviceName As String
Dim format As String
key = "{your-key}"
serviceName = ""
format = "json"
Client.BaseUrl = "https://geodata.cdxtech.com/api/utility/"
Request.Method = WebMethod.HttpGet
Request.ResponseFormat = WebFormat.Json
Request.Resource = "servicelist?key={key}&serviceName={serviceName}&format={format}"
Request.AddUrlSegment "key", key
Request.AddUrlSegment "serviceName", serviceName
Request.AddUrlSegment "format", format
Set Response = Client.Execute(Request)
Output Examples
Here are some output data examples. You can also use the Report Generator tab to export specific data files.
{
"service": "GeoDataUtility",
"tokenCharge": 0,
"message": null,
"totalResults": 17,
"results": [
{
"name": "GeoRadius",
"tokenCharge": 1
},
{
"name": "GeoZipListCity",
"tokenCharge": 1
},
{
"name": "GeoZipListCounty",
"tokenCharge": 10
},
{
"name": "GeoZipListState",
"tokenCharge": 100
},
{
"name": "GeoFindZip",
"tokenCharge": 1
},
{
"name": "GeoGeneral",
"tokenCharge": 1
},
{
"name": "GeoRace",
"tokenCharge": 1
},
{
"name": "GeoDemographics",
"tokenCharge": 1
},
{
"name": "GeoGender",
"tokenCharge": 1
},
{
"name": "GeoVerify",
"tokenCharge": 5
},
{
"name": "GeoVerifySingle",
"tokenCharge": 5
},
{
"name": "GeoDistance",
"tokenCharge": 1
},
{
"name": "GeoRoute",
"tokenCharge": 2
},
{
"name": "GeoLocate",
"tokenCharge": 2
},
{
"name": "GeoLocateAddress",
"tokenCharge": 2
},
{
"name": "GeoLocatePoint",
"tokenCharge": 2
},
{
"name": "GeoRoutePoint",
"tokenCharge": 2
}
],
"usage": {
"used": 100,
"remaining": 1000
},
"duration": 0.0069435999999999994,
"timeStamp": "2017-02-22T21:54:28.6998127-05:00"
}
<Root>
<Service>GeoDataUtility</Service>
<Url>https://geodata.cdxtech.com/api/utility/servicelist?key={your-key}&format=xml</Url>
<Status>Success</Status>
<TokenCharge>0</TokenCharge>
<Message />
<TotalResults>17</TotalResults>
<Results>
<Name>GeoRadius</Name>
<TokenCharge>1</TokenCharge>
</Results>
<Results>
<Name>GeoZipListCity</Name>
<TokenCharge>1</TokenCharge>
</Results>
<Results>
<Name>GeoZipListCounty</Name>
<TokenCharge>10</TokenCharge>
</Results>
<Results>
<Name>GeoZipListState</Name>
<TokenCharge>100</TokenCharge>
</Results>
<Results>
<Name>GeoFindZip</Name>
<TokenCharge>1</TokenCharge>
</Results>
<Results>
<Name>GeoGeneral</Name>
<TokenCharge>1</TokenCharge>
</Results>
<Results>
<Name>GeoRace</Name>
<TokenCharge>1</TokenCharge>
</Results>
<Results>
<Name>GeoDemographics</Name>
<TokenCharge>1</TokenCharge>
</Results>
<Results>
<Name>GeoGender</Name>
<TokenCharge>1</TokenCharge>
</Results>
<Results>
<Name>GeoVerify</Name>
<TokenCharge>5</TokenCharge>
</Results>
<Results>
<Name>GeoVerifySingle</Name>
<TokenCharge>5</TokenCharge>
</Results>
<Results>
<Name>GeoDistance</Name>
<TokenCharge>1</TokenCharge>
</Results>
<Results>
<Name>GeoRoute</Name>
<TokenCharge>2</TokenCharge>
</Results>
<Results>
<Name>GeoLocate</Name>
<TokenCharge>2</TokenCharge>
</Results>
<Results>
<Name>GeoLocateAddress</Name>
<TokenCharge>2</TokenCharge>
</Results>
<Results>
<Name>GeoLocatePoint</Name>
<TokenCharge>2</TokenCharge>
</Results>
<Results>
<Name>GeoRoutePoint</Name>
<TokenCharge>2</TokenCharge>
</Results>
<Usage>
<Used>100</Used>
<Remaining>1000</Remaining>
</Usage>
<Duration>0.0075527999999999993</Duration>
<TimeStamp>2017-02-22T21:56:26.7354388-05:00</TimeStamp>
</Root>