GunSpec

DataQuality

Resource class for interacting with the GunSpec Data Quality API. Wraps all /v1/data endpoints. Instantiated internally by the GunSpec client and exposed as client.dataQuality.

Auth RequiredEnterprise

Get overall data coverage statistics for the database. Returns per-field and aggregate coverage metrics showing what percentage of records have data for each field.

coverage(): Promise<APIResponse<DataCoverage>>
GET/v1/data/coverage

  • stringheaderrequired

    Your API key. Authorization: Bearer <key> is accepted in its place.

  • object

    The response payload.

  • object

    Per-field completeness across the firearms table.

  • integer

    Total records matching the query across every page.

  • object

    Per-field completeness, keyed by column name.

  • object

    Per-field completeness across the calibers table.

  • integer

    Total records matching the query across every page.

  • object

    Per-field completeness, keyed by column name.

  • object

    Per-field completeness across the manufacturers table.

  • integer

    Total records matching the query across every page.

  • object

    Per-field completeness, keyed by column name.

  • 400VALIDATION_ERRORValidation error
  • 401UNAUTHORIZEDAPI key required
  • 403FORBIDDENValid key, not permitted
  • 429RATE_LIMITEDRate limit exceeded
  • 500INTERNAL_ERRORUnexpected server error

Minimum tier
Enterprise
Monthly quota
1,000,000/mo
Rate limit
300/min
Daily cap
50,000

Figures shown are for this endpoint's minimum tier. Higher tiers raise every limit.

Auth RequiredEnterprise

Get firearms with confidence scores below a specified threshold. Useful for identifying records that may need additional data verification or enrichment.

confidence(params?: ConfidenceParams): Promise<PaginatedResponse<ConfidenceEntry>>
GET/v1/data/confidence

  • stringheaderrequired

    Your API key. Authorization: Bearer <key> is accepted in its place.

  • numberdefault0.5

    Only return records scoring below this threshold

    Range
    0 – 1
    Example
  • integerdefault1

    Page number, from 1 to 10,000

    Range
    1 – 10000
    Example
  • integerdefault20

    Items per page (max 100)

    Range
    1 – 100
    Example

  • object[]

    One page of results

  • string

    Slug of the firearm.

  • string

    Display name, as the maker writes it.

  • number

    How completely the record is specified and how well it is sourced, 0 to 1. A record-level completeness and provenance measure, not a per-field probability of correctness. dataConfidence on the camelCase endpoints.

  • number

    Current page number

  • number

    Items per page

  • number

    Total matching records (Builder and above)

  • 400VALIDATION_ERRORValidation error
  • 401UNAUTHORIZEDAPI key required
  • 403FORBIDDENValid key, not permitted
  • 429RATE_LIMITEDRate limit exceeded
  • 500INTERNAL_ERRORUnexpected server error

Minimum tier
Enterprise
Monthly quota
1,000,000/mo
Rate limit
300/min
Daily cap
50,000

Figures shown are for this endpoint's minimum tier. Higher tiers raise every limit.