GunSpec

Ammunition

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

Authentifizierung erforderlichBuilder+

List ammunition with optional filters and pagination.

list(params?: ListAmmunitionParams): Promise<PaginatedResponse<Ammunition>>
GET/v1/ammunition

  • stringHeadererforderlich

    Ihr API-Schlüssel. Authorization: Bearer <key> wird ebenfalls akzeptiert.

  • integerstandard1

    Page number, from 1 to 10,000

    Bereich
    1 – 10000
    Beispiel
  • integerstandard20

    Items per page (max 100)

    Bereich
    1 – 100
    Beispiel
  • string

    Filter by caliber slug

    Beispiel
  • string

    Filter by bullet construction

    Beispiel
  • integer

    Restrict to commonly stocked loads (1) or uncommon ones (0)

    Bereich
    0 – 1
    Beispiel

  • AmmunitionLoad[]

    A specific factory ammunition load within a caliber.

  • string

    URL-safe slug identifying the load, e.g. 9mm-124gr-fmj.

  • string

    Slug of the cartridge. Resolve against /v1/calibers/{id}.

  • string

    Display name, as the maker writes it.

  • string | null

    Military or standards designation for the load, e.g. M882.

  • string | null

    Who makes it.

  • string | null

    ISO 3166-1 alpha-2 code of where it was designed, e.g. AT.

  • number

    Bullet weight in grams. Divide by 0.0648 for grains.

  • string

    Bullet construction: fmj, jhp, sp, match.

  • number | null

    Ballistic coefficient against the G1 drag model, the convention for flat-based bullets.

  • number | null

    Ballistic coefficient against the G7 drag model, which fits boat-tail rifle bullets better than G1.

  • number

    Muzzle velocity in metres per second at the reference barrel length below, not at the barrel of any particular firearm.

  • number

    Barrel length in millimetres the reference velocity was measured from. Velocity for another barrel is extrapolated from this pair.

  • number | null

    Bullet mass divided by the square of its diameter. Higher penetrates better, all else equal.

  • integer | null

    Year it entered production or service. Null where the date is disputed or unknown.

  • integer

    1 when the load is commonly stocked.

  • string | null

    Absolute URL of the rendered bullet diagram.

  • number | null

    Decay exponent used when extrapolating velocity to a barrel length other than the reference one.

  • string | null

    Prose summary of the record, where one has been written.

  • integer

    1 when the load is a military issue round.

  • string

    When the record was first added, YYYY-MM-DD HH:MM:SS in UTC.

  • string

    When a field we serve last changed, YYYY-MM-DD HH:MM:SS in UTC.

  • 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

Mindeststufe
Builder+
Monatskontingent
25,000/mo
Anfragerate
60/min
Tageslimit
2,000

Die Werte gelten für die Mindeststufe dieses Endpunkts. Höhere Stufen erhöhen alle Limits.

Dieser Aufruf beantwortet bedingte Anfragen. Speichern Sie das ETag einer Antwort und senden Sie es als If-None-Match zurueck: ein unveraenderter Datensatz liefert 304 Not Modified ohne Body. Das zaehlt auf Ihr Minutenlimit, aber nicht auf Ihr Tageskontingent.

Authentifizierung erforderlichBuilder+

Auto-paginate through all ammunition matching the given filters. Returns an async iterator that fetches pages on demand, yielding individual Ammunition objects.

listAutoPaging(params?: ListAmmunitionParams): AsyncIterableIterator<Ammunition>
GET/v1/ammunition

  • stringHeadererforderlich

    Ihr API-Schlüssel. Authorization: Bearer <key> wird ebenfalls akzeptiert.

  • integerstandard1

    Page number, from 1 to 10,000

    Bereich
    1 – 10000
    Beispiel
  • integerstandard20

    Items per page (max 100)

    Bereich
    1 – 100
    Beispiel
  • string

    Filter by caliber slug

    Beispiel
  • string

    Filter by bullet construction

    Beispiel
  • integer

    Restrict to commonly stocked loads (1) or uncommon ones (0)

    Bereich
    0 – 1
    Beispiel

  • AmmunitionLoad[]

    A specific factory ammunition load within a caliber.

  • string

    URL-safe slug identifying the load, e.g. 9mm-124gr-fmj.

  • string

    Slug of the cartridge. Resolve against /v1/calibers/{id}.

  • string

    Display name, as the maker writes it.

  • string | null

    Military or standards designation for the load, e.g. M882.

  • string | null

    Who makes it.

  • string | null

    ISO 3166-1 alpha-2 code of where it was designed, e.g. AT.

  • number

    Bullet weight in grams. Divide by 0.0648 for grains.

  • string

    Bullet construction: fmj, jhp, sp, match.

  • number | null

    Ballistic coefficient against the G1 drag model, the convention for flat-based bullets.

  • number | null

    Ballistic coefficient against the G7 drag model, which fits boat-tail rifle bullets better than G1.

  • number

    Muzzle velocity in metres per second at the reference barrel length below, not at the barrel of any particular firearm.

  • number

    Barrel length in millimetres the reference velocity was measured from. Velocity for another barrel is extrapolated from this pair.

  • number | null

    Bullet mass divided by the square of its diameter. Higher penetrates better, all else equal.

  • integer | null

    Year it entered production or service. Null where the date is disputed or unknown.

  • integer

    1 when the load is commonly stocked.

  • string | null

    Absolute URL of the rendered bullet diagram.

  • number | null

    Decay exponent used when extrapolating velocity to a barrel length other than the reference one.

  • string | null

    Prose summary of the record, where one has been written.

  • integer

    1 when the load is a military issue round.

  • string

    When the record was first added, YYYY-MM-DD HH:MM:SS in UTC.

  • string

    When a field we serve last changed, YYYY-MM-DD HH:MM:SS in UTC.

  • 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

Returns an async iterator: it fetches each page as you consume it, so a loop over the whole collection is one statement and one page in memory at a time.

Mindeststufe
Builder+
Monatskontingent
25,000/mo
Anfragerate
60/min
Tageslimit
2,000

Die Werte gelten für die Mindeststufe dieses Endpunkts. Höhere Stufen erhöhen alle Limits.

Dieser Aufruf beantwortet bedingte Anfragen. Speichern Sie das ETag einer Antwort und senden Sie es als If-None-Match zurueck: ein unveraenderter Datensatz liefert 304 Not Modified ohne Body. Das zaehlt auf Ihr Minutenlimit, aber nicht auf Ihr Tageskontingent.

Authentifizierung erforderlichBuilder+

Get a single ammunition load by its slug or ID.

get(id: string): Promise<APIResponse<Ammunition>>
GET/v1/ammunition/{id}

  • stringHeadererforderlich

    Ihr API-Schlüssel. Authorization: Bearer <key> wird ebenfalls akzeptiert.

  • stringerforderlich

    Ammunition load slug

    Akzeptiert
    a lowercase slug: letters, digits and hyphens
    Beispiel

  • AmmunitionLoad

    A specific factory ammunition load within a caliber.

  • string

    URL-safe slug identifying the load, e.g. 9mm-124gr-fmj.

  • string

    Slug of the cartridge. Resolve against /v1/calibers/{id}.

  • string

    Display name, as the maker writes it.

  • string | null

    Military or standards designation for the load, e.g. M882.

  • string | null

    Who makes it.

  • string | null

    ISO 3166-1 alpha-2 code of where it was designed, e.g. AT.

  • number

    Bullet weight in grams. Divide by 0.0648 for grains.

  • string

    Bullet construction: fmj, jhp, sp, match.

  • number | null

    Ballistic coefficient against the G1 drag model, the convention for flat-based bullets.

  • number | null

    Ballistic coefficient against the G7 drag model, which fits boat-tail rifle bullets better than G1.

  • number

    Muzzle velocity in metres per second at the reference barrel length below, not at the barrel of any particular firearm.

  • number

    Barrel length in millimetres the reference velocity was measured from. Velocity for another barrel is extrapolated from this pair.

  • number | null

    Bullet mass divided by the square of its diameter. Higher penetrates better, all else equal.

  • integer | null

    Year it entered production or service. Null where the date is disputed or unknown.

  • integer

    1 when the load is commonly stocked.

  • string | null

    Absolute URL of the rendered bullet diagram.

  • number | null

    Decay exponent used when extrapolating velocity to a barrel length other than the reference one.

  • string | null

    Prose summary of the record, where one has been written.

  • integer

    1 when the load is a military issue round.

  • string

    When the record was first added, YYYY-MM-DD HH:MM:SS in UTC.

  • string

    When a field we serve last changed, YYYY-MM-DD HH:MM:SS in UTC.

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

Mindeststufe
Builder+
Monatskontingent
25,000/mo
Anfragerate
60/min
Tageslimit
2,000

Die Werte gelten für die Mindeststufe dieses Endpunkts. Höhere Stufen erhöhen alle Limits.

Dieser Aufruf beantwortet bedingte Anfragen. Speichern Sie das ETag einer Antwort und senden Sie es als If-None-Match zurueck: ein unveraenderter Datensatz liefert 304 Not Modified ohne Body. Das zaehlt auf Ihr Minutenlimit, aber nicht auf Ihr Tageskontingent.

Authentifizierung optionalExplorer+

Get a bullet profile SVG image for an ammunition load. Returns a raw SVG string representing the bullet projectile shape. This endpoint returns raw SVG content, not the standard JSON envelope.

getBulletSvg(id: string): Promise<string>
GET/v1/ammunition/{id}/bullet.svg

  • stringHeader

    Optional. Ohne Schlüssel antwortet dieser Endpunkt nach der öffentlichen Richtlinie; ein Schlüssel erhöht Ihre Limits und schaltet planabhängige Felder frei. Authorization: Bearer <key> wird ebenfalls akzeptiert.

  • stringerforderlich

    Ammunition load slug

    Akzeptiert
    a lowercase slug: letters, digits and hyphens
    Beispiel

  • 400VALIDATION_ERRORValidation error
  • 404NOT_FOUNDResource not found
  • 429RATE_LIMITEDRate limit exceeded
  • 500INTERNAL_ERRORUnexpected server error

Mindeststufe
Explorer+
Monatskontingent
200/mo
Anfragerate
10/min
Tageslimit
50

Die Werte gelten für die Mindeststufe dieses Endpunkts. Höhere Stufen erhöhen alle Limits.

Authentifizierung erforderlichBuilder+

Get ballistic trajectory data for an ammunition load.

ballistics(id: string, params?: AmmunitionBallisticsParams): Promise<APIResponse<BallisticProfile>>
GET/v1/ammunition/{id}/ballistics

  • stringHeadererforderlich

    Ihr API-Schlüssel. Authorization: Bearer <key> wird ebenfalls akzeptiert.

  • stringerforderlich

    Ammunition load slug

    Akzeptiert
    a lowercase slug: letters, digits and hyphens
    Beispiel

  • number

    Barrel length to adjust muzzle velocity for

    Bereich
    50 – 2000
    Beispiel
  • string

    Comma-separated distances in metres

    Beispiel

  • object

    The response payload.

  • object

    The load the figures are for.

  • string

    Slug of the load the table was computed for.

  • string

    Display name, as the maker writes it.

  • string

    Slug of the cartridge. Resolve against /v1/calibers/{id}.

  • number | null

    Barrel length in millimetres, measured from the breech face.

  • number

    Muzzle velocity in metres per second, for the default load.

  • number

    Muzzle energy in joules, for the default load.

  • number

    Effective range in metres against a point target.

  • TerminalBallistics

    Terminal performance indices computed at the muzzle.

  • number

    Taylor Knock-Out factor.

  • number

    Momentum in kilogram-metres per second.

  • number

    Bullet mass divided by the square of its diameter. Higher penetrates better, all else equal.

  • number

    Hatcher Relative Stopping Power.

  • number

    Energy per unit frontal area, in joules per square centimetre.

  • TrajectoryPoint[]

    The solution sampled at each requested distance.

  • number

    Distance from the muzzle in metres.

  • number

    Remaining velocity at this distance, in metres per second.

  • number

    Remaining energy at this distance, in joules.

  • number

    Bullet drop below the line of sight at this distance, in centimetres.

  • number

    Time of flight to this distance, in seconds.

  • number

    Velocity as a multiple of the speed of sound. Below ~1.2 the projectile is transonic and destabilises.

  • number

    Momentum in kilogram-metres per second.

  • number

    Taylor Knock-Out factor at this distance.

  • number

    Energy per unit frontal area, in joules per square centimetre.

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

Mindeststufe
Builder+
Monatskontingent
25,000/mo
Anfragerate
60/min
Tageslimit
2,000

Die Werte gelten für die Mindeststufe dieses Endpunkts. Höhere Stufen erhöhen alle Limits.