---
title: "Get record count and sample of consumers"
method: POST
path: "/Consumer/getCount"
tags: ["Consumer"]
---

# Get record count and sample of consumers

`POST /Consumer/getCount`

This endpoint allows API users to retrieve a count and 10 record sample of the results to preview before purchasing a file version of the full dataset.

## Headers

- `Accept` 'application/json' | '*/*', required
- `Content-Type` 'application/json', required

## Request body

- RequestConsumerGetCount
  - `CustomerID` string, required — The [License Key](https://docs.melissa.com/melissa/license/license-information.html) issued by Melissa.
  - `Includes` ConsumerIncludes, required — Any parameter you would like to include in the query. Requires at least one from: - Zips - Cities - Radius - ShapeWKTs
    - `Zips` object[] — A list of Zips objects containing Zip codes and optionally Plus4.
      - `Zip` string, required
      - `Plus4` string
    - `Cities` object[] — A list of cities objects each containing City and State.
      - `City` string, required
      - `State` string, required
    - `Radius` Radius — A Radius object containing a Latitude, Longitude, and Distance represented in miles.
      - `Latitude` number, required
      - `Longitude` number, required
      - `Distance` number, required
    - `ShapeWKTs` string[] — A list of WKT polygon strings
    - `RBDI` string[] — A list of RBDI codes.
    - `FIPSCode` string[] — A list of FIPSCodes.
    - `AddressStreetName` object[] — A list of address street name objects.
      - `ZipCode` string
      - `Street` string
    - `AgeRange` AgeRange — The specified age range
      - `minimum` integer
      - `maximum` integer
    - `AgeRangeMale` AgeRangeMale — The specified male age range
      - `minimum` integer
      - `maximum` integer
    - `AgeRangeFemale` AgeRangeFemale — The specified female age range
      - `minimum` integer
      - `maximum` integer
    - `AgeRangeUnknownGender` AgeRangeUnknownGender — The specified unknown gender age range
      - `minimum` integer
      - `maximum` integer
    - `NetWorthGoldRank` string[] — The specified net worth gold rank
  - `Excludes` ConsumerExcludes — Any parameter you would like to exclude in the query.
    - `Zips` object[] — A list of Zips objects containing Zip codes and optionally Plus4.
      - `Zip` string, required
      - `Plus4` string
    - `Cities` object[] — A list of cities objects each containing City and State.
      - `City` string, required
      - `State` string, required
    - `RBDI` string[] — A list of RBDI codes.
    - `FIPSCode` string[] — A list of FIPSCodes.
    - `AddressStreetName` object[] — A list of address street name objects.
      - `ZipCode` string
      - `Street` string
    - `AgeRange` AgeRange — The specified age range
      - `minimum` integer
      - `maximum` integer
    - `AgeRangeMale` AgeRangeMale — The specified male age range
      - `minimum` integer
      - `maximum` integer
    - `AgeRangeFemale` AgeRangeFemale — The specified female age range
      - `minimum` integer
      - `maximum` integer
    - `AgeRangeUnknownGender` AgeRangeUnknownGender — The specified unknown gender age range
      - `minimum` integer
      - `maximum` integer
    - `NetWorthGoldRank` string[] — The specified net worth gold rank
  - `Columns` string[], required — All [Consumer Columns](https://docs.melissa.com/reference-data/data-retriever/data-retriever-reference-guide.html#consumer-one) you want returned.
  - `OrderBy` object[] — Specify the desired column to order the responses by.
    - `column` string
    - `sortorder` 'ASC' | 'DESC'

## Response `200`

Successful response

- ResponseGetCount
  - `JobId` string — The JobId to be used to purchase and access the full dataset.
  - `Count` integer — Number of records returned by the query.
  - `ResultCode` string — Success or Error codes based on the response/request.
  - `Message` string — Success or Error message associated with the result code.
  - `Sample` object[] — A 10 record sample response.

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.dev/melissa/apis/data-retriever.md) · [All operations](https://skmtc.dev/melissa/apis/data-retriever/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/melissa/data-retriever/revisions/5eb8fbc33099/schema)
