GunSpec

Countries

Resource class for interacting with the GunSpec Countries API. Wraps all /v1/countries endpoints. Instantiated internally by the GunSpec client and exposed as client.countries.

Auth RequiredExplorer+

List all countries that have adopted at least one firearm.

list(): Promise<APIResponse<Country[]>>
GET/v1/countries

  • stringheaderrequired

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

  • object[]

    The response payload.

  • string

    ISO 3166-1 alpha-2 country code.

  • integer

    Distinct catalogued firearms this country operates.

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

Minimum tier
Explorer+
Monthly quota
200/mo
Rate limit
10/min
Daily cap
50

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

Auth RequiredBuilder+

Get the full firearm arsenal for a specific country. Returns all firearms adopted by the country, grouped by usage type (military, law enforcement, etc.).

getArsenal(code: string): Promise<APIResponse<CountryArsenal>>
GET/v1/countries/{code}/arsenal

  • stringheaderrequired

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

  • stringrequired

    ISO 3166-1 alpha-2 country code

    Example

  • object

    The country arsenal, keyed by operator type.

  • string

    ISO 3166-1 alpha-2 code of the country, echoing the path parameter.

  • object

    Operator type -> the firearms that type operates. Keys are dynamic; entries missing a type are grouped under "unknown".

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

Minimum tier
Builder+
Monthly quota
25,000/mo
Rate limit
60/min
Daily cap
2,000

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