Cost Headers

Cost Headers

The Xweather Weather API provides headers to help clients understand how much each request will cost the user. There are several factors to consider when determining the value of a request. These include the dataset being accessed, temporal range, and spatial coverage.

The following headers can be referenced and utilized to determine how we calculate our usage, or "tokens".

HeaderDescription
X-Cost-EndpointThe name of the endpoint accessed.
X-Cost-MultipliersThe three multipliers to consider: endpoint, temporal, and spatial.
X-Cost-TokensMultiplying the X-Cost-Multipliers together, this indicates the number of tokens, or hits, this request will cost.

Additional Considerations

  • Any 2xx request returned will contain these headers and the calculations will be applied to the client usage.
  • Any 5xx & 4xx requests will not count towards token usage.

For more information about your specific limits, please reach out to support (opens in a new tab) or your account executive.