Service endpoint

https://api.targetsmart.com/service/dictionary

Overview

This service can be used to query information about the different data fields available. You can explore human readable descriptions for component fields, statistical information about values for those fields, and discover new or updated fields.

Request parameters

Key Required Optional Default Permitted Values
field OR string with max 64 characters
prefix OR string, possible values can be found in a request without prefix


Additional parameter details

field

This parameter represents the query used to fuzzy search field names e.g. phone in vb.voterbase_phone.

prefix

This parameter represents the prefix preceeding field names e.g. vb in vb.voterbase_phone.

JSON response

Responses are JSON objects with the following keys:

  • result: Array of objects containing information per field found in the query.
    • component
      • raw name of the component
    • component_name_human
      • human readable name of the component
    • component_description_human
      • human readable description of the component
    • fieldname
      • name of the field in the component
    • fieldname_human
      • human readable name of the field
    • field_description_human
      • human readable description of the field
    • valid_values_human
      • human readable description of valid values for the field
    • data_source_human
      • human readable description of the database source of the field
    • min_width
      • minimum length of values in string typed field
    • max_width
      • maximum length of values in string typed field
    • is_categorical
      • boolean flag describing categorical values
    • min_value
      • minimum value for numerical field
    • max_value
      • maximum value for numerical field
    • is_continuous
      • boolean flag describing continuous numerical values
    • analyze_count
      • number of rows analyzed for the fifeld
    • blank_count
      • number of blank values found for the field
    • continuous_count
      • number of rows with continuous values in the field
    • categorical_count
      • number of rows with categorical values in the field
    • categorical_distinct_count
      • number of distinct categories found for the field
    • distinct_values
      • if number of distinct categories is less than or equal to 100, counts of each distinct category are also provided
    • mean
      • mean for numerical values
    • std_dev
      • standard deviation for numerical values
    • digits_total
      • total number of digits available for the numerical field
    • digits_after
      • number of digits available for the numerical field after decimal
    • sql_type_guess
      • database type of the field {VARCHAR, INT, FLOAT, etc}
    • release_datestamp
      • date string of when the field was released

Code Examples

🔐 Remember to secure your API key

Never expose your API key in plain text or source control accessible by a third party.

#! /usr/bin/env python3

import os
import requests

api_key = os.environ["TS_API_KEY"]
response = requests.get(
    "https://api.targetsmart.com/service/dictionary",
    params={"field": "name", "prefix": "vb"},
    headers={"x-api-key": api_key},
)
response.raise_for_status()
print(response.json())
#! /usr/bin/env node

const fetch = require("node-fetch");

const targetSmartApiKey = process.env.TS_API_KEY;

const queryParams = new URLSearchParams({
  field: "name",
  prefix: "vb",
});

fetch(
  "https://api.targetsmart.com/service/dictionary?" + queryParams.toString(),
  {
    method: "GET",
    headers: {
      "x-api-key": targetSmartApiKey,
    },
  }
)
  .then((res) => res.json())
  .then((json) => console.log(json));
#! /usr/bin/env bash

result=$(curl -XGET \
    -H "x-api-key: $TS_API_KEY" \
    "https://api.targetsmart.com/service/dictionary?field=name&prefix=vb")
echo $result