Что это
Публичный интерфейс каталога sc-codex: корабли, контракты, товары, компоненты — всё, что видно на сайте, машиночитаемо и с историзмом по патчам. Контракт — JSON:API: конверт data, connexion через include, sparse fieldsets. Только чтение: витрина открыта, склад заперт.
Аутентификация
Каждый запрос несёт заголовок X-Api-Key с персональным ключом. Без ключа шлюз считает вас вакуумом и отвечает честным 401 — никакой магии, просто запросите ключ через форму обратной связи в сайдбаре. Отозванные ключи не воскресают.
curl -H "X-Api-Key: sck_ВАШ_КЛЮЧ" \
-H "Accept: application/vnd.api+json" \
/api/public/v1/shipsБазовый URL и формат
Все ресурсы живут под /api/public/v1. Ответы — application/vnd.api+json; шлите такой же Accept. Данные привязаны к живому патчу игры: сменился патч — сменились данные.
Ресурсы
Справочник генерируется из тех же схем, что обслуживают запросы, — дока не умеет отставать от кода.
ships GET /api/public/v1/ships GET /api/public/v1/ships/{id}
Атрибуты
uuidnamename_ruslugclass_namecareerrolesizeimage_blueprintimage_topimage_wireframecrew_mincrew_maxweapon_crewcargo_capacityprice_auecprice_usdmass_kgquantum_speed_mmsquantum_fuel_capacityquantum_fuel_per_mminsurance_expedited_costinsurance_expedited_claim_timeinsurance_standard_claim_timeshield_hpem_signature_shieldsem_signature_quantumdistortion_poolcooling_generation_segmentspower_generation_segmentsseating_crew_stationsseating_bedspropulsion_fuel_capacitypropulsion_fuel_usage_mainpropulsion_maneuvering_time_emptypropulsion_fuel_intake_rateammo_missilesmass_total_kgweapon_storage_slotsavailable_ingameis_conceptfittableis_ccu_targetbuy_locationsСвязи
manufacturervariantsФильтры filter[…]
idshipIdcareerrolesizeInclude
manufacturervariantscontracts GET /api/public/v1/contracts GET /api/public/v1/contracts/{id}
Атрибуты
uuidtitledescriptionmission_type_namefaction_nameillegalshareableonce_onlyavailable_in_prisonrank_indexreward_auec_minreward_auec_maxfee_auectime_to_complete_minutescrime_stat_mincrime_stat_maxmax_players_per_instancemin_standingmax_standingdifficulty_skilldifficulty_loaddifficulty_riskdifficulty_knowledgetotal_profituec_per_hourrep_per_hourencounters_countencounter_groupsloot_poolsreputation_rewardsСвязи
encountersreputationRewardslootPoolsФильтры filter[…]
idcontractIdInclude
encountersreputationRewardslootPoolscommodities GET /api/public/v1/commodities GET /api/public/v1/commodities/{id}
Атрибуты
uuidnamename_ruslugtypedescriptiondescription_ruscunpacked_kindtagsmining_methodsmining_compositionmining_attributesmining_tiermining_signature_basemining_cluster_maxis_mineablebest_buybest_sellprices_summarybuy_locationssell_locationsblueprintsmining_summaryprice_historymining_detailpricesfocus_locationsФильтры filter[…]
idcommodityIdtypehistoryPeriodwithMiningwithPricesfocusMethodfocusSystemmanufacturers GET /api/public/v1/manufacturers GET /api/public/v1/manufacturers/{id}
Атрибуты
uuidnamecodedescriptionСвязи
shipsФильтры filter[…]
idInclude
shipsitems GET /api/public/v1/items GET /api/public/v1/items/{id}
Атрибуты
uuidnamename_ruslugclass_nametypesub_typegradeclassificationdescriptiondescription_rusystemsizemass_kgcolorsshopsitem_classturret_specscomponent_specshas_blueprintblueprint_idСвязи
manufacturerФильтры filter[…]
iditemIdtypesub_typesizegradeclassificationsystemInclude
manufacturervehicles GET /api/public/v1/vehicles GET /api/public/v1/vehicles/{id}
Атрибуты
uuidnamename_ruslugclass_namecareerrolesizedescriptionsystemcrew_mincrew_maxseatstop_speed_kphhealth_hpshield_hpweapon_dpscargo_capacitymass_kgmass_total_kglength_mwidth_mheight_mprice_auecprice_usdprice_usd_warbondhas_warbond_skupledge_ship_idinsurance_standard_claim_timeinsurance_expedited_costbuy_locationsСвязи
manufacturerФильтры filter[…]
idcareerrolesizesystemInclude
manufacturerweapons GET /api/public/v1/weapons GET /api/public/v1/weapons/{id}
Атрибуты
uuidnamename_ruslugclass_nametypesub_typegradesystemsizemass_kgshopshas_blueprintblueprint_idvariantsСвязи
manufacturerФильтры filter[…]
idweaponIdtypesub_typesizegradesystemInclude
manufacturerarmors GET /api/public/v1/armors GET /api/public/v1/armors/{id}
Атрибуты
uuidnamename_ruslugclass_nametypegrademass_kgtype_labelresistancescolorsСвязи
manufacturerФильтры filter[…]
idtypegradeInclude
manufacturerblueprints GET /api/public/v1/blueprints
Атрибуты
uuidproduct_nameproduct_typemanufacturersystemcraft_time_secondsslotscontractssizegradeclassificationsub_typeФильтры filter[…]
idblueprintIdsearchproductTypemanufacturersizelocations GET /api/public/v1/locations/{id}
Атрибуты
uuidnametypesystemarchetypearchetype_labelpreview_urlplan_urlcontractsФильтры filter[…]
idorganizations GET /api/public/v1/organizations GET /api/public/v1/organizations/{id}
Атрибуты
uuidnameslugtypedescriptionФильтры filter[…]
idtypestarmaps GET /api/public/v1/starmaps GET /api/public/v1/starmaps/{id}
Атрибуты
uuidnametypeclassificationsystemjurisdictionaffiliationis_qt_destinationФильтры filter[…]
idsystemtypeВозможности JSON:API
?page[number]=2&page[size]=25— пагинация листингов.?filter[…]=…— фильтры (набор у каждого ресурса свой, см. выше).?fields[ships]=name,slug— sparse fieldsets: берите только нужное, канал скажет спасибо.?include=…— связанные ресурсы одним запросом (конвертincluded).
curl -H "X-Api-Key: sck_ВАШ_КЛЮЧ" \
-H "Accept: application/vnd.api+json" \
"/api/public/v1/ships?page[size]=5&fields[ships]=name,slug"Лимиты
60 запросов в минуту на ключ. Остаток — в заголовках X-RateLimit-Limit / X-RateLimit-Remaining; перебор — 429 и пауза. Кэшируйте на своей стороне — каталог меняется с патчами, не с секундами.
Ошибки
Ошибки приходят JSON:API-конвертом errors — массив объектов { status, title, detail }.
401— ключ не передан, неизвестен или отозван.404— ресурса нет. У нас, а не у вас.429— лимит исчерпан; подождите минуту.503(no_live_patch) — идёт импорт нового патча, каталог на минуту без сознания. Повторите позже.