# News (API)

> Changelog of the API, from sc-keeper.

## November 2026

New feature(s):

- Upgrade to `sparecores-crawler` 0.12.0, adding `Server.retirement_date`,
  `Database.retirement_date`, the bundled disk speeds of servers
  (`storage_read_iops_max`, `storage_write_iops_max`, `storage_read_throughput_max`,
  `storage_write_throughput_max`) and the same per-disk speeds in `Server.storages`.
- Records with the new `ARCHIVED` status (replaced or deliberately dropped records, e.g.
  the old Hetzner datacenter regions) are never returned by any endpoint, including
  `/regions`, the `/table/...` endpoints and `only_orderable=false` or `only_active=false`
  queries; there is no parameter to include them.
- Every response has `SC-Data-Hash` and `SC-Data-Published-At` headers: the hash and the
  publication time of the database it was built from.
- Add `/snapshot/{hash}/...` endpoints (API key required): every table pinned to a
  database hash, tables that reference a vendor split by vendor (scores by vendor and
  benchmark), with available records only, prices in USD and every column except
  `observed_at`, as gzipped columnar JSON. `/snapshot/{hash}` lists the files with
  checksums. Snapshots are built once per hash and shared between instances through S3
  (`SNAPSHOT_S3_URI`).
- `/healthcheck` lists the database hashes with snapshots on the instance in
  `snapshot_hashes`, and returns the publication time of the database in
  `database_published_at`.
- Add `/ping`, a liveness check that answers as long as the process does, without the
  database or the thread pool shared by the other endpoints (unlike `/healthcheck`).

Fix(es):

- The `family` method of `/server/{vendor}/{server}/similar_servers/{by}/{num}` returns
  the servers of the same series (e.g. `t2d`), and falls back to the same family (a broad
  category at most vendors, e.g. "General Purpose") only when the series is unknown or
  has fewer than 3 other servers.

## October 2026

Breaking change(s):

- Upgrade to `sparecores-crawler` 0.10.0: `Server.gpu_*` / `gpus` renamed to
  `accelerator_*` / `accelerators` in responses and `order_by` (`gpu_*` query params
  keep their names).
- `/servers` `gpu_*` filters now match only `accelerator_type=GPU`, except
  `gpu_max`, which also matches servers with non-GPU accelerators;
  `gpu_manufacturer` / `gpu_family` values are GPU-only on `/servers` and
  `/server_prices`. Use the new `accelerator_*` filters for all accelerator types.
- The `regions` and `vendor_regions` filter values only include active regions;
  inactive ones are rejected with 422.

New feature(s):

- Expose `Server.accelerator_type`, `series`, `api_reference_object`, and
  `compatible_storage_ids` in `/table/server/meta`.
- Return benchmark `subcategory` in `/benchmark_configs`; order configs and server /
  database benchmarks by the new categories, then subcategory and `benchmark_id`.
- Add `accelerator_type`, `accelerator_min`, `accelerator_max`,
  `accelerator_memory_min`, and `accelerator_memory_total` filters to `/servers` (any
  accelerator type) under a new `accelerator` filter category.
- Add `asic_min`, `asic_max`, `asic_memory_min`, `asic_memory_total`,
  `asic_manufacturer`, `asic_family`, and `asic_model` filters to `/servers` under a new
  `asic` filter category, matching all non-GPU accelerators (ASICs, e.g. Google TPUs);
  `asic_max` also matches servers with GPUs or no accelerators.
- Add `memory_max`, `memory_per_vcpu_min`, `memory_per_vcpu_max`, `gpu_max`, `price_max`,
  `benchmark_score_max`, and `benchmark_score_per_vcpu_min` filters to `/servers`.
- Add `/inspector/task_block_reason_codes` and
  `/inspector/server/{vendor}/{server}/task_block_reason_codes` endpoints to look up why
  inspector tasks are blocked.
- Add `Retry-After` header to 429 responses and expose it, along with the `X-RateLimit-*`
  headers, to browsers via CORS.
- Add `only_active` filter to `/server/{vendor}/{server}/prices` endpoint to enable querying inactive server prices.

Fix(es):

- Exclude TPUs from the `gpu_model` filter values based on the new
  `Server.accelerator_type`, as the TPU model name patterns no longer matched the
  normalized model names (e.g. `v5e`).
- Fix inflated `X-Total-Count` header for `/servers` when using a non-default
  `best_price_allocation` without filtering for orderable servers.
- Include CORS headers in early 401 and 429 responses so that browsers can read them.
- Do not charge rate-limit credits or verify tokens for CORS preflight requests.
- Prevent caching of 429/401 and rejected preflight responses.

Housekeeping:

- Stop gzip compression at the origin and let CloudFront compress responses.
- Version the package as `<year>.<month>+g<short commit sha>` (e.g. `2026.10+g5e02c8c`),
  set at Docker build time and shown in the API docs and `/healthcheck`, instead of the
  manually bumped (and long stale) `0.3.6`.
- Use the most recent inspector rules from the sc-crawler GitHub repo at Docker build
  time when its version matches the installed `sparecores-crawler`, so rule changes no
  longer need a PyPI release. The source of the rules is shown in `/healthcheck` as
  `inspector_rules`.

## September 2026

New feature(s):

- Add `architecture`, `cpu_allocation`, `network_speed_baseline_min`, `network_speed_max_min`,
  `network_storage_speed_baseline_min`, and `network_storage_speed_max_min` filters to
  `/databases` (matched via identified `Database.server_id`).
- Add `cpu_flags` filter to `/servers`.
- Add `cpu_hyperthreading` filter to `/servers` (vCPUs > CPU cores).
- Add `/table/vendor_compliance_link` dump for vendor / compliance framework mapping.
- Add `storage_count_min` filter to `/servers` for minimum bundled storage count.

## August 2026

New feature(s):

- Add `/databases` benchmark filters (`benchmark_id` default `pgbench:heavy_read_only`,
  `benchmark_config`, `benchmark_score_min`, `benchmark_score_per_price_min`) and
  `selected_benchmark_score*` ordering.
- Add `/ai/assist_database_filters` for natural-language database filter extraction.
- Refactor `/databases` endpoint: drop `engine` and `wire_protocol` filters and modify 
  `engine_versions` filter to `engine_version` (supports only one required major engine version).

## July 2026

New feature(s):

- Add `/databases`, `/database/{vendor}/{database}`, `/database/{vendor}/{database}/prices`, and
  `/database_storage_prices` endpoints to support the newly implemented DBaaS data from `sparecores-crawler`.
- Add `/table/database`, `/table/database_price`, and `/table/database_storage` table dump endpoints.
- Add `/databases` filters for new `sparecores-crawler` v0.8.5 fields (`wire_protocol`,
  `max_read_replicas`, monitoring, `connection_pool`, `disk_encryption`, `security_features`,
  `autotuning_apply`, `ha_strategy`, and related capabilities).
- Treat `ha` / `ha_strategy` as `database_price` primary keys (min price = cheapest HA row).
- Use `BestDatabasePriceAllocation` for `/databases` (no `SPOT_ONLY`; schema rejects it).

## June 2026

New feature(s):

- Update database to `sparecores-crawler` v0.6.0 to expose new `vendor` (`stopped_server_charged`, `billing_increment_seconds`,  `minimum_billing_seconds` and `billing_comment`) and `server` (`ecpus`, `scalability`, `hw_virt`, `memory_amount_actual`, `network_speed_max`, `network_storage_speed_baseline`, `network_storage_speed_max`, and `average_time_to_start`) fields.
- Add `hw_virt` filter to `/servers` and `/server_prices`.
- Add `network_speed_max_min`, `network_storage_speed_baseline_min` and `network_storage_speed_max_min` filters to `/servers`.
- Update parameter titles and descriptions.
- Add `/server/{vendor}/{server}/descriptions` endpoint returning the `ServerDescription` of a single server.

‼ Breaking changes:

- Renamed `network_speed` to `network_speed_baseline` in the `Server` table.
- Renamed `network_speed_min` filter on the `/servers` endpoint to `network_speed_baseline_min`.

## May 2026

Fix(es):

- Explicit request error when trying to order a table by a relation instead of an actual column.

## April 2026

New feature(s):

- Add new `/table/server/select` endpoint to allow selecting specific Server `columns` in the response.
- Add `extra_storage_size`, `extra_storage_type`, `monthly_inbound_traffic`, and `monthly_outbound_traffic` query
  parameters to the `/servers` endpoint. All `min_price` fields and the always-present `price_breakdown` response
  object now include traffic and storage cost components, with tiered pricing and built-in server storage deducted from
  `extra_storage_size`.

Fix(es):

- `Benchmark` `category` is now sourced from the database instead of being hardcoded.

## March 2026

New feature(s):

- New endpoint `/benchmark_score_stats` for querying benchmark config and score statistics.
- Add optional `countries` and `vendor_regions` query filters for the `/server/{vendor}/{server}/prices` and
  `/server/{vendor}/{server}/similar_servers/{by}/{num}` endpoints.
- Add `benchmark_score` and `benchmark_score_per_price` ordering options to
  `/server/{vendor}/{server}/similar_servers/{by}/{num}` endpoint.
- Add optional `currency`, `benchmark_id`, `benchmark_config`, `server_region` and `best_price_allocation` query
  parameters for the `/server/{vendor}/{server}/similar_servers/{by}/{num}` endpoint.
- Added `network_speed_min`, `cpu_speed_min`, `cpu_l1d_cache_min`, `cpu_l1d_cache_total_min`, `cpu_l1i_cache_min`,
  `cpu_l1i_cache_total_min`, `cpu_l2_cache_min`, `cpu_l2_cache_total_min`, `cpu_l3_cache_min`, and
  `cpu_l3_cache_total_min` filters for the `/servers` with predefined ranges for filtering.

Performance improvements:

- Aggressive content caching with multi-layer CDN.
- Fallback to stale cached content

    - while revalidating in the background,
    - on temporarily origin errors.

Fix(es):

- Background thread to clean-up expired in-memory rate-limit keys.
- Disable content caching for error responses.
- Add sorting to `/server/{vendor}/{server}/benchmarks` endpoint.

## February 2026

New feature(s):

- Monthly pricing calculations for on-demand servers with optional capping.
- Support for float GPU count values for fractional GPU allocation.
- New endpoint `/stats` for querying database table statistics with optional vendor and only_active filters.
- New endpoint `/debug` for querying debug information about the availability of benchmark scores for servers.
- Include monthly price caps (calculated from tiered prices) in server and server price search results.
- Add optional country/region filter for the servers endpoint.
- Add optional `vendor_regions` filter for all endpoints already supporting the `regions` filter for more precise
  filtering.
- Add optional `best_price_allocation` configuration parameter for the search servers endpoint to control how the
  server's "best price" is computed (e.g. use any price, spot only, or on-demand only).
- Add optional `currency` configuration parameter for the search servers endpoint to convert the prices to a requested
  currency.

Fix(es):

- Upgrade FastAPI from 0.115.13 to 0.128.8.
- Fix macOS compatibility issue with `iowait` CPU metric logging (not available on Darwin systems).
- Convert tiered prices to requested currency in the server price search results.
- Fix `X-Total-Count` header for server search when ordered by price-derived fields and not filtering for active
  servers.
- Filter out server prices without a related server score when ordering by score or score_per_price.
- Fix `price_max` calculation and currency checking in `/server_prices` endpoint.

‼ Breaking changes:

- Minimum required Python version upgraded from 3.8 to 3.11.

## January 2026

New feature(s):

- OAuth2 Bearer token authentication support with configurable security schemes.
- Token introspection for OAuth2 authentication.
- Rate limiting with Redis backend and in-memory fallback.
- Credit-based rate limiting with configurable penalties for different response codes.
- Custom CEL (Common Expression Language) expressions for token validation and claim extraction.
- User authentication tracking and token source monitoring.
- Optional authentication requirements for specific endpoints.
- Server prices table dump endpoint with filters and authentication protection.

Fix(es):

- Redis connection error logging and graceful fallback handling.
- Token active status validation in all authentication flows.
- Self-reference issues in authentication middleware.
- Rate limit middleware properly applies 401 penalties.
- Currency code validation with HTTP 400 on invalid codes.
- Price currency handling in conversion operations.
- Middleware execution order for proper auth and rate limiting.
- Exclude low-frequency and potentially incorrect GPU models.

Housekeeping:

- Authentication and rate limiting middleware order optimization.
- Cache control to skip caching endpoints requiring authentication.
- Async HTTP client migration from `requests` to `httpx`.
- Logger namespace standardization across all modules.
- Currency conversion optimized to run only when needed.
- Excluded inactive server types from API responses.
- Test coverage for authentication and rate limiting features.
- Thread-safe in-memory credit consumption tracking.
- Move rate-limit logic to Redis for atomic updates.
- Log client application ID when available.
- Pin ReDoc version for stability.

## December 2025

Housekeeping:

- Bump `sparecores-crawler` and `sparecores-data` dependencies to 0.3.2.

## October 2024

New feature(s):

- Support for CPU allocation filtering (shared vs dedicated).
- Materialized views for minimum server prices for improved performance.
- Background thread for currency rate updates from ECB.
- Currency table with live exchange rates.
- Server minimum prices included in Server objects.
- Similar servers by score per price endpoint.
- Min `$Core` (score per price) filter for server searches.

Fix(es):

- Consider servers without price as inactive.
- Descending order on computed columns.
- Hide servers without values when filtering by related columns.
- Green energy definition synchronized with crawler.

Housekeeping:

- Bump version to match `sparecores-crawler` for `Disk` description support.
- Drop v1 server details endpoint.
- Drop dead `min_server_price` code.
- Index optimization for server prices.
- Round `score_per_price` to 4 digits.
- Code review with automated linting improvements using `ruff`.

## September 2024

New feature(s):

- Storage prices endpoint with comprehensive filtering options.
- Traffic prices endpoint with monthly pricing calculations.
- Tiered pricing support for traffic costs with proper tier calculation.
- Integration tests for all major API endpoints.
- Similar servers endpoint based on hardware specifications.
- Currency conversion support for storage and traffic prices.
- Parametrized test suite for comprehensive coverage.
- Server details v2 endpoints with improved data structure.

Fix(es):

- Duplicate rows from many-to-many relationships eliminated.
- Slow full-row lookups optimized.
- Active price filtering consistency across endpoints.
- Correct tiered price calculation (only apply delta per tier).
- Default to outbound traffic prices.
- Function name conflicts resolved.

Housekeeping:

- Indexed SQLite for better full-row lookup performance.
- Efficient count queries to avoid N+1 problems.
- Pre-query optimization for compliance framework lookups.
- Eager loading strategies for relationships to reduce query count.
- Optimized query performance with strategic JOINs.
- Test performance monitoring (flag queries >250ms).
- Require latest version of crawler and data packages.
- Code organization: split routers into separate files.

## August 2024

New feature(s):

- Cache control headers for client-side caching.
- Sentry integration for error tracking and monitoring.
- System resource logging (CPU, memory, I/O, iowait).
- Request/response logging with unique request IDs.
- Sentry release tracking with environment context.
- Allow Sentry headers in CORS configuration.
- Experimental DuckDB integration for faster queries.

Fix(es):

- Thread-safe database operations with proper locking.
- Proper connection handling and cleanup for database operations.
- Self-locking issues in database update operations resolved.
- Fall back to SQLite when DuckDB is unavailable.
- IO counters handling on unsupported platform.

Housekeeping:

- Async database operations with proper locking mechanisms.
- Database updates moved to background threads.
- Increased page size limits for server prices (from 50 to higher limits).
- Later reduced default page size for performance.
- Server list reloading every 10 minutes.
- Production infrastructure moved to EU.
- Background database update at initialization.
- Search support for 200+ CPUs.
- Limit page size of server price queries.
- Install Sentry SDK as optional dependency.

## June 2024

New feature(s):

- Benchmark scores endpoint with full benchmark data.
- Benchmark table dump for all available benchmarks.
- API reference queries for servers using api_reference parameter.
- Human-friendly column names with category information.
- Support for `SCore` (Spare Cores Score) metric in API responses.
- Price per `SCore` (`$Core`) calculations and filtering.
- GPU total memory search and filtering capabilities.
- `Score` and `$Core` added to individual server lookups.

Fix(es):

- Example JSON on `/benchmark_scores` endpoint corrected.
- Server ID references in subqueries fixed.
- Handling of missing `SCore` values in calculations.
- Division by zero errors in price per score calculations.
- Missing `KeyValue` errors for lowest prices.
- Price information handling when unavailable.

Housekeeping:

- Renamed Datacenter to Region across the entire API.
- Updated field descriptions for improved clarity.
- Server memory field renamed to `memory_amount`.
- Path parameters changed from generic IDs to descriptive names (e.g., `vendor_id`, `server_id`).
- Locked `sparecores-data` and `sparecores-crawler` versions for the SQLModel schema versions.

## May 2024

New feature(s):

- `/servers` endpoint for server listings without price information.
- `/server_prices` endpoint (renamed from previous `/servers`).
- AI assistant endpoints for natural language queries via OpenAI integration.
- Currency parameter for server and price queries with automatic conversion.
- Freetext search on server IDs and names.
- Unit of measurement display in API responses.
- Table metadata endpoints for data exploration.
- Endpoint categories and organization for better API navigation.
- Healthcheck endpoint with database validation.
- `X-Total-Count` header for pagination support.
- Request ID tracking in custom headers.
- Compliance framework filtering by multiple frameworks.
- Country-based filtering for regions/datacenters.
- Vendor ID enumeration for better type safety.
- Optional total count parameter to improve performance.
- Comprehensive filter options:
    - Vendor, CPU, memory, storage, GPU filters.
    - Green energy availability filtering.
    - Compliance framework filtering (HIPAA, SOC2, etc.).
    - Architecture filtering (x86_64, arm64, etc.).
    - Storage type filtering.
    - GPU manufacturer, family, and model filters.
    - Total GPU memory filtering.
- Server similarity endpoints based on hardware specifications.
- Similar servers by family endpoint.

Fix(es):

- Don't key enum values by name to avoid serialization issues.
- Filter conditions properly enforced in count queries.
- CORS header exposure for `X-Total-Count`.
- Duplicate server entries in filtered results.
- Filter enforcement in count queries.
- Distinct query optimization when joining compliance frameworks.
- Fix OpenAPI/Swagger syntax error due to dict vs array confusion.

Housekeeping:

- Separated AI endpoints to dedicated module file.
- Query parameter details moved to helpers module for DRY code.
- Standardized lookups across all endpoints.
- File restructuring for better code organization.
- API restructured into logical modules with routers.
- Moved healthcheck, tables, and metadata to separate files.
- Router-based organization with OpenAPI tags.
- Filter descriptions moved to DRY helpers.
- Restructured main API file for readability.
- Consistent examples across all endpoints.
- Load examples into a dictionary for reusability.

## April 2024

New feature(s):

- CORS support for cross-origin requests.
- Nested data structure for vendor relationships.
- Currency conversion support via ECB rates.
- Green energy filter option.
- Server listing query support with multiple filters.
- Query parameter metadata for frontend filtering.
- Architecture filter option.

Fix(es):

- Database session caching issues resolved.
- Join operations on overlapping compound foreign keys.
- Last updated date tracking fixed.
- SQL query logging disabled by default for performance.
- Coerce filter values to proper boolean type.
- Status filter properly applied.

Housekeeping:

- Response compression enabled via middleware.
- Session handling improvements to avoid caching.
- Moved `main.py` to `api.py` for clarity.
- Move source code under `src/` directory.
- Package dependencies updated (`sc` to `sparecores` naming).
- Reflect `sc-crawler` schema updates.
- Request/response logging middleware using structured JSON output.
- Logging configuration with custom formatters.
- Initialize linting and testing framework.
- Docker build configuration improvements.
- GitHub Actions workflow for automated deployment.

## March 2024

Fix(es):

- Schema name updates to match recent `sc-crawler` changes.

Housekeeping:

- Cross-platform path handling for Windows compatibility using `os.path`.
- Package distribution name updated to `sparecores`.

## February 2024

Initial release:

- FastAPI application structure and foundation.
- SQLite database file integration via `sc_data` package.
- Database hot-reload on updates.
- Response model annotations using type hints.
- Set example values for Swagger documentation.
- Annotated example inputs for API documentation.

API endpoints:

- Server instance lookup endpoint by vendor and API ID.
- Server search endpoint by CPU/RAM specifications.
- Swagger/OpenAPI documentation with examples.
