The Share Group Data Service
Documentation for consumption of The Share Group's Data Services via GraphQL. This service allows access to TSG's vast data library, providing the ability to retrieve the number of records within a geography, create lists for those geographies as well as a host of other features.
GraphQL: GraphQL is a powerful query language for data-based APIs, giving clients the power to ask for exactly what they need and nothing more. If you aren't familiar with GraphQL, here are some resources to help get you started:
API Key: An API must be provided on every call. The key can be obtained from your account representative.
Getting Started: To verify you have initial connectivity to the API (as well as verify the service is running), you can hit the following URL using a standard HTTP request:
https://api.theshare.group/graphql/ping
If successful, you will see the following response:
{"message": "pong"}
Curl Example: curl https://api.theshare.group/graphql/ping -H "X-Api-Key: my_api_key"
Terms of Service
API Endpoints
https://api.theshare.group/graphql
Headers
# Include in all API calls
X-Api-Key: fake_hALuR22qJUdtL2Lh3XM3lM8JpmF8MjwdkRN
Version
1.0.0
Queries
blueprintCounts
Description
Retrieves the number of available leads given a blueprint. Once you have the quantity available, call the createList() mutation to generate the list.
Billing: There is a usage charge associated with this query.
Response
Returns a ListCount
Arguments
Name | Description |
---|---|
blueprint - Blueprint!
|
The Blueprint to get counts for |
Example
Query
query blueprintCounts($blueprint: Blueprint!) {
blueprintCounts(blueprint: $blueprint) {
available
}
}
Variables
{"blueprint": Blueprint}
Response
{"data": {"blueprintCounts": {"available": 123}}}
counts
Description
Retrieves the number of available leads. Once you have the quantity available, call the createList() mutation to generate the list.
Billing: There is a usage charge associated with this query.
Response
Returns a ListCount
Arguments
Name | Description |
---|---|
listType - ListType!
|
Type of list to get counts for. Note: This is an Enum so do not enclose the value within quotes as this will make it a string. |
zipCodes - [String]!
|
One or more zip codes |
dnc - Boolean
|
Include phone numbers on the DNC (Do Not Call) list |
emails - Boolean
|
Require email addresses for all records |
suppressionIDs - [Int]
|
[Optional] To prevent the inclusion of records you may have previously received, include the List IDs from those lists. |
Example
Query
query counts(
$listType: ListType!,
$zipCodes: [String]!,
$dnc: Boolean,
$emails: Boolean,
$suppressionIDs: [Int]
) {
counts(
listType: $listType,
zipCodes: $zipCodes,
dnc: $dnc,
emails: $emails,
suppressionIDs: $suppressionIDs
) {
available
}
}
Variables
{
"listType": "ABSENTEE",
"zipCodes": ["abc123"],
"dnc": false,
"emails": true,
"suppressionIDs": [987]
}
Response
{"data": {"counts": {"available": 123}}}
dataSource
Description
Retrieves the specified data source.
Billing: There is no charge for this call, however, excessive use may result in throttling.
Response
Returns a DataSource!
Arguments
Name | Description |
---|---|
id - Int!
|
Unique identifier of the data source (obtained from call to retrieve datasources) |
Example
Query
query dataSource($id: Int!) {
dataSource(id: $id) {
id
name
size
fields {
...DataSourceFieldFragment
}
dedupes {
...DedupeFragment
}
}
}
Variables
{"id": 123}
Response
{
"data": {
"dataSource": {
"id": 123,
"name": "abc123",
"size": 123,
"fields": [DataSourceField],
"dedupes": [Dedupe]
}
}
}
dataSources
Description
Retrieves all available data sources.
Billing: There is no charge for this call, however, excessive use may result in throttling.
Response
Returns [DataSource]!
Example
Query
query dataSources {
dataSources {
id
name
size
fields {
...DataSourceFieldFragment
}
dedupes {
...DedupeFragment
}
}
}
Response
{
"data": {
"dataSources": [
{
"id": 123,
"name": "xyz789",
"size": 123,
"fields": [DataSourceField],
"dedupes": [Dedupe]
}
]
}
}
list
Description
Retrieves the details of a list, including its processing status and a link to download the file when it is available.
Billing: There is no charge for this call, however, excessive use may result in throttling.
Response
Returns a ListDetails!
Arguments
Name | Description |
---|---|
id - Int!
|
Unique identifier of the list (obtained from call to create list) |
Example
Query
query list($id: Int!) {
list(id: $id) {
id
name
status
recordCount
fileURL
createdAt
updatedAt
}
}
Variables
{"id": 123}
Response
{
"data": {
"list": {
"id": 987,
"name": "xyz789",
"status": "xyz789",
"recordCount": 987,
"fileURL": "xyz789",
"createdAt": "xyz789",
"updatedAt": "abc123"
}
}
}
lookup
Description
Retrieves personal and property information for the specified Lookup parameters.
Billing: There is a usage charge associated with this query.
Response
Returns [LookupResult]
Arguments
Name | Description |
---|---|
lookup - Lookup
|
Lookup parameters to use for the query |
Example
Query
query lookup($lookup: Lookup) {
lookup(lookup: $lookup) {
first
middle
last
address
city
state
zip
zip4
phone
phone_type
email
dnc
latitude
longitude
exact_age
home_value
lor
year_built
presence_of_children
marital_status
est_income
loan_to_value
most_recent_mortgage_date
most_recent_mortgage_amount
education
property_type
}
}
Variables
{"lookup": Lookup}
Response
{
"data": {
"lookup": [
{
"first": "abc123",
"middle": "xyz789",
"last": "xyz789",
"address": "xyz789",
"city": "xyz789",
"state": "abc123",
"zip": "xyz789",
"zip4": "abc123",
"phone": "abc123",
"phone_type": "abc123",
"email": "abc123",
"dnc": "abc123",
"latitude": "abc123",
"longitude": "abc123",
"exact_age": "xyz789",
"home_value": "abc123",
"lor": "xyz789",
"year_built": "xyz789",
"presence_of_children": "xyz789",
"marital_status": "abc123",
"est_income": "xyz789",
"loan_to_value": "xyz789",
"most_recent_mortgage_date": "xyz789",
"most_recent_mortgage_amount": "xyz789",
"education": "xyz789",
"property_type": "abc123"
}
]
}
}
lookupAddress
Description
Retrieves personal and property information for the specified address.
Billing: There is a usage charge associated with this query.
Response
Returns [LookupResult]
Example
Query
query lookupAddress(
$address: String,
$city: String,
$state: String,
$zip: String
) {
lookupAddress(
address: $address,
city: $city,
state: $state,
zip: $zip
) {
first
middle
last
address
city
state
zip
zip4
phone
phone_type
email
dnc
latitude
longitude
exact_age
home_value
lor
year_built
presence_of_children
marital_status
est_income
loan_to_value
most_recent_mortgage_date
most_recent_mortgage_amount
education
property_type
}
}
Variables
{
"address": "abc123",
"city": "abc123",
"state": "abc123",
"zip": "xyz789"
}
Response
{
"data": {
"lookupAddress": [
{
"first": "xyz789",
"middle": "xyz789",
"last": "abc123",
"address": "xyz789",
"city": "abc123",
"state": "xyz789",
"zip": "abc123",
"zip4": "xyz789",
"phone": "abc123",
"phone_type": "abc123",
"email": "xyz789",
"dnc": "abc123",
"latitude": "abc123",
"longitude": "xyz789",
"exact_age": "xyz789",
"home_value": "abc123",
"lor": "abc123",
"year_built": "abc123",
"presence_of_children": "xyz789",
"marital_status": "abc123",
"est_income": "abc123",
"loan_to_value": "xyz789",
"most_recent_mortgage_date": "abc123",
"most_recent_mortgage_amount": "xyz789",
"education": "abc123",
"property_type": "abc123"
}
]
}
}
lookupEmail
Description
Retrieves personal and property information for the specified email address.
Billing: There is a usage charge associated with this query.
Response
Returns [LookupResult]
Arguments
Name | Description |
---|---|
email - String
|
Email address of the person |
Example
Query
query lookupEmail($email: String) {
lookupEmail(email: $email) {
first
middle
last
address
city
state
zip
zip4
phone
phone_type
email
dnc
latitude
longitude
exact_age
home_value
lor
year_built
presence_of_children
marital_status
est_income
loan_to_value
most_recent_mortgage_date
most_recent_mortgage_amount
education
property_type
}
}
Variables
{"email": "xyz789"}
Response
{
"data": {
"lookupEmail": [
{
"first": "xyz789",
"middle": "xyz789",
"last": "xyz789",
"address": "xyz789",
"city": "xyz789",
"state": "abc123",
"zip": "xyz789",
"zip4": "abc123",
"phone": "abc123",
"phone_type": "xyz789",
"email": "abc123",
"dnc": "abc123",
"latitude": "abc123",
"longitude": "abc123",
"exact_age": "xyz789",
"home_value": "xyz789",
"lor": "xyz789",
"year_built": "xyz789",
"presence_of_children": "xyz789",
"marital_status": "xyz789",
"est_income": "abc123",
"loan_to_value": "abc123",
"most_recent_mortgage_date": "abc123",
"most_recent_mortgage_amount": "abc123",
"education": "xyz789",
"property_type": "abc123"
}
]
}
}
lookupName
Description
Retrieves personal and property information for the specified persons name.
Billing: There is a usage charge associated with this query.
Response
Returns [LookupResult]
Example
Query
query lookupName(
$first: String,
$last: String,
$state: String
) {
lookupName(
first: $first,
last: $last,
state: $state
) {
first
middle
last
address
city
state
zip
zip4
phone
phone_type
email
dnc
latitude
longitude
exact_age
home_value
lor
year_built
presence_of_children
marital_status
est_income
loan_to_value
most_recent_mortgage_date
most_recent_mortgage_amount
education
property_type
}
}
Variables
{
"first": "xyz789",
"last": "abc123",
"state": "abc123"
}
Response
{
"data": {
"lookupName": [
{
"first": "abc123",
"middle": "abc123",
"last": "xyz789",
"address": "abc123",
"city": "xyz789",
"state": "abc123",
"zip": "xyz789",
"zip4": "abc123",
"phone": "abc123",
"phone_type": "xyz789",
"email": "abc123",
"dnc": "abc123",
"latitude": "xyz789",
"longitude": "abc123",
"exact_age": "abc123",
"home_value": "abc123",
"lor": "xyz789",
"year_built": "abc123",
"presence_of_children": "abc123",
"marital_status": "xyz789",
"est_income": "xyz789",
"loan_to_value": "xyz789",
"most_recent_mortgage_date": "xyz789",
"most_recent_mortgage_amount": "abc123",
"education": "abc123",
"property_type": "abc123"
}
]
}
}
lookupPhone
Description
Retrieves personal and property information for the specified phone number.
Billing: There is a usage charge associated with this query.
Response
Returns [LookupResult]
Arguments
Name | Description |
---|---|
phone - String
|
Phone number of a person |
Example
Query
query lookupPhone($phone: String) {
lookupPhone(phone: $phone) {
first
middle
last
address
city
state
zip
zip4
phone
phone_type
email
dnc
latitude
longitude
exact_age
home_value
lor
year_built
presence_of_children
marital_status
est_income
loan_to_value
most_recent_mortgage_date
most_recent_mortgage_amount
education
property_type
}
}
Variables
{"phone": "xyz789"}
Response
{
"data": {
"lookupPhone": [
{
"first": "abc123",
"middle": "xyz789",
"last": "xyz789",
"address": "abc123",
"city": "abc123",
"state": "abc123",
"zip": "xyz789",
"zip4": "xyz789",
"phone": "abc123",
"phone_type": "xyz789",
"email": "abc123",
"dnc": "xyz789",
"latitude": "xyz789",
"longitude": "abc123",
"exact_age": "abc123",
"home_value": "abc123",
"lor": "xyz789",
"year_built": "xyz789",
"presence_of_children": "abc123",
"marital_status": "abc123",
"est_income": "xyz789",
"loan_to_value": "abc123",
"most_recent_mortgage_date": "xyz789",
"most_recent_mortgage_amount": "xyz789",
"education": "abc123",
"property_type": "abc123"
}
]
}
}
Mutations
createCustomList
Description
Creates a custom list based on the blueprint provided. List creation can take a few minutes so it runs in the background on the server. The workflow for creating a list is:
- Call the createCustomList() mutation. The response will contain a list ID.
- Call the list() query periodically (i.e, every 30 seconds) with the list ID.
- Inspect the 'status' field until its value is 'ready'.
- When 'status == ready', the 'fileURL' field will contain a temporary, secure link.
- Download the file.
Billing: You are charged for the number of records returned in the list.
Response
Returns a ListDetails!
Arguments
Name | Description |
---|---|
blueprint - Blueprint!
|
The Blueprint to create the list from |
recordCount - Int!
|
Quantity of records to retrieve |
Example
Query
mutation createCustomList(
$blueprint: Blueprint!,
$recordCount: Int!
) {
createCustomList(
blueprint: $blueprint,
recordCount: $recordCount
) {
id
name
status
recordCount
fileURL
createdAt
updatedAt
}
}
Variables
{"blueprint": Blueprint, "recordCount": 123}
Response
{
"data": {
"createCustomList": {
"id": 123,
"name": "abc123",
"status": "abc123",
"recordCount": 987,
"fileURL": "abc123",
"createdAt": "abc123",
"updatedAt": "abc123"
}
}
}
createList
Description
Creates a list. List creation can take a few minutes so it runs in the background on the server. The workflow for creating a list is:
- Call the createList() mutation. The response will contain a list ID.
- Call the list() query periodically (i.e, every 30 seconds) with the list ID.
- Inspect the 'status' field until its value is 'ready'.
- When 'status == ready', the 'fileURL' field will contain a temporary, secure link.
- Download the file.
Billing: You are charged for the number of records returned in the list.
Response
Returns a ListDetails!
Arguments
Name | Description |
---|---|
name - String!
|
A friendly name, ID or internal reference number to help you keep track of the request |
recordCount - Int!
|
Quantity of records to retrieve |
listType - ListType!
|
Type of list to create. Note: This is an Enum so do not enclose the value within quotes as this will make it a string. |
zipCodes - [String]!
|
One or more zip codes |
dnc - Boolean
|
Include phone numbers on the DNC (Do Not Call) list |
emails - Boolean
|
Require email addresses for all records |
suppressionIDs - [Int]
|
[Optional] To prevent the inclusion of records you may have previously received, include the List IDs from those lists. |
Example
Query
mutation createList(
$name: String!,
$recordCount: Int!,
$listType: ListType!,
$zipCodes: [String]!,
$dnc: Boolean,
$emails: Boolean,
$suppressionIDs: [Int]
) {
createList(
name: $name,
recordCount: $recordCount,
listType: $listType,
zipCodes: $zipCodes,
dnc: $dnc,
emails: $emails,
suppressionIDs: $suppressionIDs
) {
id
name
status
recordCount
fileURL
createdAt
updatedAt
}
}
Variables
{
"name": "xyz789",
"recordCount": 123,
"listType": "ABSENTEE",
"zipCodes": ["xyz789"],
"dnc": false,
"emails": false,
"suppressionIDs": [123]
}
Response
{
"data": {
"createList": {
"id": 123,
"name": "abc123",
"status": "abc123",
"recordCount": 123,
"fileURL": "xyz789",
"createdAt": "xyz789",
"updatedAt": "abc123"
}
}
}
Types
Blueprint
Description
Blueprint is the definition of a list to be created
Fields
Input Field | Description |
---|---|
name - String!
|
A friendly name, ID or internal reference number to help you keep track of the request |
data_source_id - Int!
|
DataSource ID obtained by calling the dataSource and/or dataSources query |
phones - Phones
|
Specifies whether records must have a phone number or not |
phone_type - PhoneType
|
Specifies the type of phones that should be included in the list |
dnc - Boolean
|
Include phone numbers on the DNC (Do Not Call) list |
emails - Emails
|
Species whether records must have an email address or not |
select_type - String
|
Specified which dedupe you want to use. If you do not specify a dedupe, the default is to not dedupe and return all records available. See the 'dedupes' field of the DataSource for allowable values |
match_type - String
|
The match type determines how records are matched to the suppression list. If left blank, matching is based on the criteria for this list. Available match types for a list are shown in the available_match_types attribute from the List query. |
phone_score - [String]
|
Phone Score specifies the degree of accuracy of the phone number. Lower numbers indicating higher accuracy. If left blank, all phone scores are included. See the 'phone_score' field of the DataSource for allowable values |
filters - [BlueprintFilter]!
|
Filters |
dedupe_within - String
|
Dedupe within |
output_fields - [String]!
|
Output fields specifies which fields to return in the output. See the 'filters' field of the DataSource for allowable values |
Example
{
"name": "abc123",
"data_source_id": 987,
"phones": "all",
"phone_type": "landline",
"dnc": true,
"emails": "all",
"select_type": "xyz789",
"match_type": "abc123",
"phone_score": ["abc123"],
"filters": [BlueprintFilter],
"dedupe_within": "abc123",
"output_fields": ["xyz789"]
}
BlueprintFilter
Description
Blueprint Filter contains the query fields and their values
Fields
Input Field | Description |
---|---|
field - String!
|
Name of the field |
values - [String]!
|
Values of the field |
condition - String
|
The condition attribute for a filter is optional. If you do not specify a condition, the default is “and”. This means all records must match this filter. Alternatively you can specify a group name for the condition. The group name can be anything other than “and”. This creates an “OR” select, where records must match at least one filter in the group. |
option - String
|
Option specifies how to match. The option can be set to “exact” or “like” to change how to query. Exact must match one of the filter's values exactly, while like does a wildcard search. The wildcard search will match anything that contains the values parts in that order. For example, '%Chief%Technical%' will match on 'Chief Technical Officer', or 'Super Chief Mega Technical Officer'. |
omit - Boolean
|
Omit specifies whether to include or exclude records that match the filter. If omitted, the default is to include records that match the filter. |
Example
{
"field": "abc123",
"values": ["abc123"],
"condition": "xyz789",
"option": "xyz789",
"omit": false
}
Boolean
Description
The Boolean
scalar type represents true
or false
.
DataSource
Description
Shows the details for a data source
Fields
Field Name | Description |
---|---|
id - Int!
|
ID of the data source |
name - String!
|
Friendly Name |
size - Int!
|
Total number of records available |
fields - [DataSourceField]
|
Fields contains the details of the fields available in the data source |
dedupes - [Dedupe]
|
Supported option for de-duplicating records |
Example
{
"id": 123,
"name": "xyz789",
"size": 987,
"fields": [DataSourceField],
"dedupes": [Dedupe]
}
DataSourceField
Description
Shows the details for a data source
Fields
Field Name | Description |
---|---|
key - String!
|
Name of the field |
range - Boolean!
|
Identifies whether a range of values is supported |
values - [DataSourceValue]
|
Allowable values for the field |
Example
{
"key": "abc123",
"range": true,
"values": [DataSourceValue]
}
DataSourceValue
Dedupe
Emails
Description
Specifies whether records must have an email address or not
Values
Enum Value | Description |
---|---|
|
All records will have an email address |
|
Not all records will have an email address |
Example
"all"
Int
Description
The Int
scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Example
123
ListCount
Description
Shows the number of available leads
Fields
Field Name | Description |
---|---|
available - Int
|
Quantity of available leads |
Example
{"available": 123}
ListDetails
Description
Contains detailed information about a list
Fields
Field Name | Description |
---|---|
id - Int
|
Unique identifier of the list |
name - String
|
A friendly name, ID or internal reference number to help you keep track of the request |
status - String
|
Processing status of the request. Once completed, the status will show 'ready' |
recordCount - Int
|
Quantity of leads requested/returned |
fileURL - String
|
A Temporary and secure link to the completed list. This field will be empty until the list is available. |
createdAt - String
|
Timestamp of when the list creation was initiated |
updatedAt - String
|
Timestamp of the most recent update |
Example
{
"id": 123,
"name": "abc123",
"status": "abc123",
"recordCount": 987,
"fileURL": "abc123",
"createdAt": "xyz789",
"updatedAt": "xyz789"
}
ListType
Description
Describes all of the supported list types that are available. Note that these values should NOT be enclosed within quotes when used as a parameter in a call.
Values
Enum Value | Description |
---|---|
|
Absentee list. From a real estate perspective, an Absentee Owner is someone who owns a residential property and does not occupy that property. Although this can refer to landlords and owners of rental properties, the term 'absentee owner' is typically used to refer to owners who's property sits vacant. |
|
All Homes (with Phones) list. 100% of all homes in the area that have valid phones. |
|
Distressed list. Distressed property owners are typically facing financial difficulties. Known as 'pre-foreclosure' homes, they are not yet in active foreclosure but are at risk. |
|
Divorced list. Nearly half of all marriages in the US will end in divorce. While this is a sad reality, divorces create situations where a diplomatic real estate agent can turn a single lead into three transactions. Usually, divorcing couples are focused on selling their property quickly. Once that is complete, they need to buy or rent a new home. |
|
Downsizer list. According to the U.S. Census Bureau, of the 6.5 million homes sold every year, roughly 750,000 come from the downsizing senior community. That number is expected to DOUBLE in the next few years to over 1.8 million homes, all selling from this one demographic of Downsizing 'Empty Nest' seniors. |
|
Likely-to-Sell list. Homeowners who are ready and in a hurry to sell their property are motivated sellers. No matter their reason, them being in a rush to sell their property works in your favor. They're usually willing to sell their property at a low price, typically 10 to 30% below market value. They're also willing to lock in the property sale with favorable terms. This can include 0% interest or no money down. |
Example
"ABSENTEE"
Lookup
Description
Lookup defines the parameters for a lookup request. Values should be specified in upper case and phone numbers should include digits only. When querying for addresses, the address format can be troublesome to match on. For best results, abbreviate the street type (e.g., ST, AVE, BLVD), direction (e.g., NE, W, SW) and remove any punctuation. Some addresses may interchange the order of street type and direction.
Fields
Input Field | Description |
---|---|
data_source_id - Int!
|
DataSource ID obtained by calling the dataSource and/or dataSources query |
select_type - String
|
Specified which dedupe you want to use. If you do not specify a dedupe, the default is to not dedupe and return all records available. See the 'dedupes' field of the DataSource for allowable values |
filters - [BlueprintFilter]!
|
Filters |
output_fields - [String]!
|
Output fields specifies which fields to return in the output. See the 'filters' field of the DataSource for allowable values |
Example
{
"data_source_id": 123,
"select_type": "xyz789",
"filters": [BlueprintFilter],
"output_fields": ["xyz789"]
}
LookupResult
Description
Shows the available output fields for a lookup request.
Fields
Field Name | Description |
---|---|
first - String
|
|
middle - String
|
|
last - String
|
|
address - String
|
|
city - String
|
|
state - String
|
|
zip - String
|
|
zip4 - String
|
|
phone - String
|
|
phone_type - String
|
|
email - String
|
|
dnc - String
|
|
latitude - String
|
|
longitude - String
|
|
exact_age - String
|
|
home_value - String
|
|
lor - String
|
|
year_built - String
|
|
presence_of_children - String
|
|
marital_status - String
|
|
est_income - String
|
|
loan_to_value - String
|
|
most_recent_mortgage_date - String
|
|
most_recent_mortgage_amount - String
|
|
education - String
|
|
property_type - String
|
Example
{
"first": "xyz789",
"middle": "abc123",
"last": "abc123",
"address": "xyz789",
"city": "xyz789",
"state": "abc123",
"zip": "abc123",
"zip4": "xyz789",
"phone": "xyz789",
"phone_type": "abc123",
"email": "abc123",
"dnc": "xyz789",
"latitude": "abc123",
"longitude": "abc123",
"exact_age": "xyz789",
"home_value": "abc123",
"lor": "xyz789",
"year_built": "xyz789",
"presence_of_children": "abc123",
"marital_status": "abc123",
"est_income": "xyz789",
"loan_to_value": "abc123",
"most_recent_mortgage_date": "xyz789",
"most_recent_mortgage_amount": "xyz789",
"education": "xyz789",
"property_type": "xyz789"
}
PhoneType
Description
Specifies the type of phone to include in the list
Values
Enum Value | Description |
---|---|
|
Landline phone |
|
Wireless phone |
|
Wireless (Priority) + Landline |
|
Landline (Priority) + Wireless |
Example
"landline"
Phones
Description
Specifies whether records must have a phone number or not
Values
Enum Value | Description |
---|---|
|
All records will have a phone number |
|
Not all records will have a phone number |
Example
"all"
String
Description
The String
scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Example
"xyz789"