Difference between revisions of "WebAPI/GetSchema"

From Team Fortress Wiki
Jump to: navigation, search
m (Result Data: Slight tweak to wording of Community & Self-Made)
m
 
(37 intermediate revisions by 16 users not shown)
Line 1: Line 1:
This documentation is for version v0001 of GetSchema.
+
'''Main article about [[WebAPI]].'''
 +
 
  
 
== URL ==
 
== URL ==
<nowiki>http://api.steampowered.com/IEconItems_<ID>/GetSchema/v0001/</nowiki>
+
{{notice|type=style|image=Team Fortress 2.png|imagewidth=35px|contents='''Note for Team Fortress 2''': This endpoint has been <span style="color: red">deprecated</span>. Please refer to [[WebAPI/GetSchemaItems]] and [[WebAPI/GetSchemaOverview]].}}
  
See the [[WebAPI#appids|ID list]] for a valid ID.
+
<nowiki>https://api.steampowered.com/IEconItems_<ID>/GetSchema/v0001/?key=<API key></nowiki>
 +
 
 +
See the [[WebAPI#appids|ID list]] for a valid ID. You can get an API key [https://steamcommunity.com/dev/apikey here].
  
 
== Method-specific Parameters ==
 
== Method-specific Parameters ==
; language
+
; {{API optional|language}} (string)
:The [[Wikipedia:List of ISO 639-1 codes|ISO639-1 language code]] for the language all localized strings should be returned in. Not all strings have been translated to every language. If a language does not have a string, the English string will be returned instead. If this parameter is omitted the string token will be returned for the strings.
+
: The [[Wikipedia:List of ISO 639-1 codes|ISO639-1 language code]] for the language all localized strings should be returned in. Not all strings have been translated to every language. If a language does not have a string, the English string will be returned instead. If this parameter is omitted the string token will be returned for the strings.
 
 
Supported languages for TF2 are:
 
* Danish (da)
 
* Dutch (nl)
 
* English (en)
 
* Finnish (fi)
 
* French (fr)
 
* German (de)
 
* Hungarian (hu)
 
* Italian (it)
 
* Japanese (ja)
 
* Korean (ko)
 
* Norwegian (no)
 
* Polish (pl)
 
* Portuguese (pt)
 
* Romanian (ro)
 
* Russian (ru)
 
* Simplified Chinese (zh - hides Traditional Chinese)
 
* Spanish (es)
 
* Swedish (sv)
 
* Traditional Chinese (zh2 - Cannot be specified by ISO639-1)
 
* Turkish (tr)
 
 
 
Alternative codes:
 
*en_US
 
*de_DE
 
*fr_FR
 
*it_IT
 
*ko_KR
 
*es_ES
 
*zh_CN
 
*zh_TW
 
*ru_RU
 
*th_TH
 
*ja_JP
 
*pt_PT
 
*pl_PL
 
*da_DK
 
*nl_NL
 
*fi_FI
 
*no_NO
 
*sv_SE
 
*ro_RO
 
*tr_TR
 
*hu_HU
 
*cs_CZ
 
*pt_BR
 
*bg_BG
 
 
 
== Status codes ==
 
 
 
*'''<tt>1</tt>''': The normal code. Should always be returned.
 
  
 
== Result Data ==
 
== Result Data ==
  
; items_game_url: A string containing the URL to the full item schema as used by the game.
+
;result:
; qualities: An object containing the numeric values corresponding to each "quality" an item can have:
+
:;status: The status of the request, should always be 1.
:; '''normal''' (''0'' - ''Normal''): Set on all the default items the player will have equipped if nothing else (also referred to as [[stock items]]).
+
:; items_game_url: A string containing the URL to the full item schema as used by the game.
:; '''rarity1''' (''1'' - ''Genuine''): Items acquired for a promotional event have this quality (for example, [[Sun-On-A-Stick]] and [[Sharpened Volcano Fragment]]).
+
:; qualities: An object containing the numeric values corresponding to each "quality" an item can have:
:; '''rarity2''' (''2''): Unused
+
::; normal (''0'' - ''[[Normal]]''): Set on [[stock items]].
:; '''vintage''' (''3'' - ''Vintage''): Set on items that were owned before certain updates and promotions.
+
::; rarity1 (''1'' - ''[[Genuine]]''): Set on items acquired for a promotional event (for example, [[Sun-On-A-Stick]] and [[Sharpened Volcano Fragment]]).
:; '''rarity3''' (''4''): Unused
+
::; rarity2 (''2''): Unused
:; '''rarity4''' (''5'' - ''Unusual''): Set on [[Quality#Unusual|unusual]] items.
+
::; vintage (''3'' - ''[[Vintage]]''): Set on items that were owned before certain updates and promotions.
:; '''unique''' (''6'' - ''Unique''): Set on most schema items and all items found by drop, achievement, or crate opening.
+
::; rarity3 (''4''): Unused
:; '''community''' (''7'' - ''Community''): Set on items granted to community contributors. Attaches a particle effect and special description string.
+
::; rarity4 (''5'' - ''[[Unusual]]''): Set on items with an effect attached or that were gained from a Halloween event.
:; '''developer''' (''8'' - ''Valve''): Set on items owned by Valve staff members.
+
::; unique (''6'' - ''[[Unique]]''): Set on the most common items including those found via drops and crafting.
:; '''selfmade''' (''9'' - ''Self-Made''): Set on items owned by 3rd-party content creators. Attaches a particle effect and special description string.
+
::; community (''7'' - ''[[Community (quality)|Community]]''): Set on items granted to community contributors.
:; '''customized''' (''10'' - ''Customized''): Unused
+
::; developer (''8'' - ''[[Valve (quality)|Valve]]''): Set on items owned by Valve staff members.
:; '''strange''' (''11'' - ''Strange''): Set on items that store (via attribute) kill counts and rank up.
+
::; selfmade (''9'' - ''[[Self-Made]]''): Set on items owned by 3rd-party content creators.
; '''qualityNames''': If the language argument is specified this object is included in the output. It includes the translations of the internal quality names to the specified language.
+
::; customized (''10'' - ''Customized''): Unused
; '''items''': An object containing a list of associative arrays.
+
::; strange (''11'' - ''[[Strange]]''): Set on ranked items.
:;'''name''': A string that defines the item in the items_game.txt
+
::; completed (''12'' - ''Completed''): Unused
:;'''defindex''': The item's unique index, used to refer to instances of the item in GetPlayerItems.
+
::; haunted (''13'' - ''[[Haunted]]''): Set on [[Halloween]] items.
:;'''item_class''': The item's class in game (ie. what you would use as the argument to "equip" in the console to equip it).
+
::; collectors (''14'' - ''[[Collector's]]''): Set on [[Collector's]] items.
:;'''item_type_name''': The tokenized string that describes the item's class (eg. "<tt>#TF_Wearable_Shield</tt>" for the [[Chargin' Targe]] and the [[Razorback]]). If the language argument is specified the string for that language will be returned instead of the token.
+
::; paintkitweapon (''15'' - ''[[Decorated Weapon]]''): Set on [[Decorated]] items.
:;'''item_name''': The tokenized string for the item's name (eg. "<tt>#TF_Spy_Camera_Beard</tt>" for the [[Camera Beard]]). If the language argument is specified the string for that language will be returned instead of the token.
+
:; qualityNames: If the language argument is specified this object is included in the output. It includes the translations of the internal quality names to the specified language.
:;'''item_description''' ''(<span style="color: red;">Optional</span>)'': The tokenized string for the item's description if it has one. If a language is specified this will be the localized description string.
+
:; originNames: A list of objects describing an item's origin.
:;'''proper_name''': A boolean value indicating the item requires "The" to be prefixed to it's name. Ignored if language is not English.
+
::; origin: An integer identifying the origin. See [[../GetPlayerItems#origin|GetPlayerItems]].
:;'''item_slot''': A string indicating what loadout slot the item can be equipped to.
+
::; name: The localized name of the origin.
::;''primary'': Primary slot items (including "Slot Token - Primary")
+
:; items: A list of item objects.
::;''secondary'': Secondary slot items (including "Slot Token - Secondary")
+
::;name: A string that defines the item in the items_game.txt
::;''melee'': Melee slot items (including "Slot Token - Melee")
+
::;defindex: The item's unique index, used to refer to instances of the item in GetPlayerItems.
::;''head'': Hats and "Slot Token - Head"
+
::;item_class: The item's class in game (ie. what you would use as the argument to "equip" in the console to equip it).
::;''misc'': Misc slot items such as medals
+
::;item_type_name: The tokenized string that describes the item's class (eg. "<tt>#TF_Wearable_Shield</tt>" for the [[Chargin' Targe]] and the [[Razorback]]). If the language argument is specified the string for that language will be returned instead of the token.
::;''pda'': The Engineer's Build PDA, the Spy's Disguise Kit, and "Slot Token - PDA"
+
::;item_name: The tokenized string for the item's name (eg. "<tt>#TF_Spy_Camera_Beard</tt>" for the [[Camera Beard]]). If the language argument is specified the string for that language will be returned instead of the token.
::;''pda2'': The Engineer's Destroy PDA, the Spy's [[Invisibility Watch]], the [[Cloak and Dagger]], the [[Dead Ringer]], and "Slot Token - PDA2"
+
::;{{API optional|item_description}}: The tokenized string for the item's description if it has one. If a language is specified this will be the localized description string.
::;''building'': "TF_WEAPON_BUILDER" (an unused copy of the Engineer's Build PDA) and the unused "Slot Token - Building"
+
::;proper_name: A boolean value indicating the item requires "The" to be prefixed to it's name. Ignored if language is not English.
::;''grenade'': The unused "Slot Token - Grenade"
+
::;item_slot: A string indicating what loadout slot the item can be equipped to.
::;''action'': Gifts and the Duel minigame
+
:::;''primary'': Primary slot items (including "Slot Token - Primary")
:;'''item_quality''': The item's default quality value. See description of "'''<tt>qualities</tt>'''" above.
+
:::;''secondary'': Secondary slot items (including "Slot Token - Secondary")
:;'''image_inventory''': The image to display, as an escaped-slash ("\/") path to the material, without the extension
+
:::;''melee'': Melee slot items (including "Slot Token - Melee")
:;'''image_url''': The URL of the small (128x128) backpack icon for the relevant item. Will be an empty string if none is available.
+
:::;''head'': Hats and "Slot Token - Head"
:;'''image_url_large''': The URL of the large (512x512) backpack image for the relevant item. Will be an empty string if none is available.
+
:::;''misc'': Misc slot items such as medals
:;'''drop_type''' ''(<span style="color: red;">Optional</span>)'': A string indicating how an item will detach (if it does) from the player upon death. This is only relevant to cosmetic items (for example, the drop type of the [[Le Party Phantom]] would be ''none'' and the mask will stay attached to the Spy's face upon death. The [[Fancy Fedora]] would have a drop type of ''drop'' and will fall from the Spy's head.)
+
:::;''pda'': The Engineer's Build PDA, the Spy's Disguise Kit, and "Slot Token - PDA"
::;''none'': The item does not detach.
+
:::;''pda2'': The Engineer's Destroy PDA, the Spy's [[Invisibility Watch]], the [[Cloak and Dagger]], the [[Dead Ringer]], and "Slot Token - PDA2"
::;''drop'': The item detaches.
+
:::;''building'': "TF_WEAPON_BUILDER" (an unused copy of the Engineer's Build PDA) and the unused "Slot Token - Building"
:;'''item_set''' ''(<span style="color: red;">Optional</span>)'': Used to look up the set the item is part of in '''item_sets'''.
+
:::;''grenade'': The unused "Slot Token - Grenade"
:;'''holiday_restriction''' ''(<span style="color: red;">Optional</span>)'': A string indicating the holiday on which the item can be used, if not present the item is available all year.
+
:::;''action'': Gifts and the Duel minigame
::;''halloween'': [[Halloween]]
+
::;item_quality: The item's default quality value. See description of "<tt>qualities</tt>" above.
:;'''model_player''': The model to display for the item, using a path similar to the above but with an ".mdl" extension, or null if the object has no model.
+
::;image_inventory: The image to display, as an escaped-slash ("\/") path to the material, without the extension
:;'''min_ilevel''': The minimum level of the item in the schema. See [[#Level Ranges|notes]]
+
::;image_url: The URL of the small (128x128) backpack icon for the relevant item. Will be an empty string if none is available.
:;'''max_ilevel''': The maximum level of the item in the schema. See [[#Level Ranges|notes]]
+
::;image_url_large: The URL of the large (512x512) backpack image for the relevant item. Will be an empty string if none is available.
:;'''craft_class''' ''(<span style="color: red;">Optional</span>)'': The type of the item from the crafting system's point of view. If this field is not present the item cannot be crafted by the random crafting recipes. This will be weapon, hat, craft_bar, or craft_token.
+
::;{{API optional|drop_type}}: A string indicating how an item will detach (if it does) from the player upon death. This is only relevant to cosmetic items (for example, the drop type of the [[Le Party Phantom]] would be ''none'' and the mask will stay attached to the Spy's face upon death. The [[Fancy Fedora]] would have a drop type of ''drop'' and will fall from the Spy's head.)
:;'''craft_material_type''' ''(<span style="color: red;">Optional</span>)'': Currently identical to '''craft_class'''.
+
:::;''none'': The item does not detach.
:;'''capabilities''' ''(<span style="color: red;">Optional</span>)'': An associative array that lists various capabilities of the item, including how it can be interacted with.
+
:::;''drop'': The item detaches.
::;'''can_craft_mark''': The item will have the crafter's name attached to it.
+
::;{{API optional|item_set}}: Used to look up the set the item is part of in item_sets.
::;'''nameable''': [[Tags]] can be used on the item.
+
::;{{API optional|holiday_restriction}}: A string indicating the holiday on which the item can be used, if not present the item is available all year.
::;'''can_gift_wrap''': The item can be [[gift wrap]]ped.
+
:::;''halloween_or_fullmoon'': [[Holiday#Halloween|Halloween or Full Moon Events]]
::;'''paintable''': The item can be [[paint]]ed.
+
:::;''halloween'': [[Holiday#Halloween|Halloween]] - Currently only used on [[Eerie Crates]]
::;'''can_craft_count''': The item can be marked as a numbered craft.
+
:::;''christmas'': [[Holiday#Smissmas|Smissmas]] - Currently only used on [[Noise_Maker#Australian_Christmas_2011|Winter Holiday Noisemakers]]
::;'''decodable''': The item can be opened with a key (this possibly refers to an abandoned predecessor of the crate system).
+
:::;''birthday'': [[Holiday#TF_Birthday|Birthday]] - Currently only used on [[Noise_Maker#Team_Fortress_Birthday|TF Birthday Noisemakers]]
::;'''usable''': The item is an Action item.
+
::;model_player: The model to display for the item, using a path similar to the above but with an ".mdl" extension, or null if the object has no model.
::;'''usable_gc''': May mark items that can be used from within the backpack and do not need to be assigned a loadout slot.
+
::;min_ilevel: The minimum level of the item in the schema. See [[#Level Ranges|notes]]
::;'''usable_out_of_game''': May mark items that can be activated while the user is not in-game.
+
::;max_ilevel: The maximum level of the item in the schema. See [[#Level Ranges|notes]]
:;'''tool''' ''(<span style="color: red;">Optional</span>)'': If the item is a tool this will contain certain meta-data such as it's type, purpose, or string for use in the client UI.
+
::;{{API optional|craft_class}}: The type of the item from the crafting system's point of view. If this field is not present the item cannot be crafted by the random crafting recipes. If it is not empty it will be weapon, hat, craft_bar, haunted_hat, tool, supply_crate, or craft_token.
:;'''used_by_classes''' ''(<span style="color: red;">Optional</span>)'': The list of classes that can use this item. If this field is not present all classes can use the item.
+
::;{{API optional|craft_material_type}}: Similar to craft_class, except this determines if it can be used in certain crafting recipes. An item can be used in random recipes without being able to be crafted by random recipes and visa-versa.
:;'''per_class_loadout_slots''' ''(<span style="color: red;">Optional</span>)'': An associative array that describes class specific loadout slots for the item if applicable.
+
::;{{API optional|capabilities}}: An object describing various capabilities of the item, including how it can be interacted with.
:;{{anchor|styles}} '''styles''' ''(<span style="color: red;">Optional</span>)'': If the item has changeable styles, an object containing an array of
+
:::;can_craft_mark: The item will have the crafter's name attached to it.
::;'''name''': The style's name.
+
:::;nameable: [[Tags]] can be used on the item.
:;'''attributes''' ''(<span style="color: red">Optional</span>)'': If the item has effects normally associated with it, an object containing an array of
+
:::;can_gift_wrap: The item can be [[gift wrap]]ped.
::;'''name''': The attribute's <tt>name</tt> value ''(see below)''
+
:::;paintable: The item can be [[paint]]ed.
::;'''class''': The attribute's <tt>attribute_class</tt> value ''(see below)''
+
:::;can_craft_count: The item can be marked as a numbered craft.
::;'''value''': The "value" of that attribute as a "%0.6f" formatted number: 1 (or 0) for boolean attributes (such as the [[Razorback]]'s backstab blocking), or the multiplier for percentage-based attributes (such as 0.300000 for the [[Direct Hit]]'s 30% blast radius, or 1.800000 for its 180% projectile speed)
+
:::;decodable: The item can be opened with a key (this possibly refers to an abandoned predecessor of the crate system).
;'''attributes''': An object containing an array of
+
:::;usable: The item is an Action item.
:;'''name''': A name describing the attribute (eg. "<tt>damage bonus</tt>" for damage increases found on weapons such as the [[Scotsman's Skullcutter]], or "<tt>scattergun has knockback</tt>" for the [[Force-A-Nature]]'s knockback)
+
:::;usable_gc: May mark items that can be used from within the backpack and do not need to be assigned a loadout slot.
:;'''defindex''': The attribute's unique index, possibly used to refer to unique instances of the item with these attributes in [[../GetPlayerItems|GetPlayerItems]].
+
:::;usable_out_of_game: May mark items that can be activated while the user is not in-game.
:;'''attribute_class''': an underscore-based name for the attribute (eg. "<tt>mult_dmg</tt>" for the attribute whose <tt>name</tt> is "<tt>damage bonus</tt>")
+
::;{{API optional|tool}}: If the item is a tool this will contain certain meta-data such as it's type, purpose, or string for use in the client UI.
:;'''minvalue''': The minimum value allowed for this attribute. See [[#Attribute_Min_and_Max_Values|notes]]
+
::;{{API optional|used_by_classes}}: The list of classes that can use this item. If this field is not present all classes can use the item.
:;'''maxvalue''': The maximum value allowed for this attribute. See [[#Attribute_Min_and_Max_Values|notes]]
+
::;{{API optional|per_class_loadout_slots}}: An object that describes class specific loadout slots for the item if applicable.
:;'''description_string''' ''(<span style="color: red">Optional</span>)'': The tokenized string that describes the attribute. See [[#Attribute Descriptions|notes]]
+
::;{{anchor|styles}} styles ''(<span style="color: red;">Optional</span>)'': If the item has changeable styles, an object containing an array of
:;'''description_format''' ''(<span style="color: red">Optional</span>)'': A string describing how to format the value for a description. See [[#Attribute Descriptions|notes]]
+
:::;name: The style's name.
::;''value_is_percentage'': For values that translate into percentages and are represented by that percentage (eg. changes to the blast radius)
+
::;{{API optional|attributes}}: If the item has effects normally associated with it, an object containing an array of
::;''value_is_inverted_percentage'': For values that translate into percentages and are represented by the difference in that percentage from 100% (eg. changes to the fire rate)
+
:::;name: The attribute's <tt>name</tt> value ''(see below)''
::;''value_is_additive'': For values that are a specific number (eg. max health bonuses and bleed durations) and boolean attributes (such as [[The Sandman]]'s ability to knock out balls)
+
:::;class: The attribute's <tt>attribute_class</tt> value ''(see below)''
::;''value_is_additive_percentage'': For values that add to an existing percentage (e.g. The Ubersaw adding 25% charge every hit)
+
:::;value: The "value" of that attribute as a "%0.6f" formatted number: 1 (or 0) for boolean attributes (such as the [[Razorback]]'s backstab blocking), or the multiplier for percentage-based attributes (such as 0.300000 for the [[Direct Hit]]'s 30% blast radius, or 1.800000 for its 180% projectile speed)
::;''value_is_date'': For values that are a unix timestamp
+
:;attributes: An object containing an array of
::;''value_is_particle_index'': For values that are a particle effect type. See [[#Particle_Index_Type|notes]]
+
::;name: A name describing the attribute (eg. "<tt>damage bonus</tt>" for damage increases found on weapons such as the [[Scotsman's Skullcutter]], or "<tt>scattergun has knockback</tt>" for the [[Force-A-Nature]]'s knockback)
::;''value_is_account_id'': For values that are a Steam account ID. See [[#Account_ID_Type|notes]]
+
::;defindex: The attribute's unique index, used to refer to unique instances of the item with these attributes in [[../GetPlayerItems|GetPlayerItems]].
::;''value_is_or'': Possibly for values that get applied if a condition is true (e.g. player is on fire)
+
::;attribute_class: an underscore-based name for the attribute (eg. "<tt>mult_dmg</tt>" for the attribute whose <tt>name</tt> is "<tt>damage bonus</tt>")
::;''value_is_item_def'': For values that are an item ID (a defindex value in the schema)
+
::;minvalue: The minimum value allowed for this attribute. See [[#Attribute_Min_and_Max_Values|notes]]
:;'''effect_type''': A string describing the type of effect the attribute has.
+
::;maxvalue: The maximum value allowed for this attribute. See [[#Attribute_Min_and_Max_Values|notes]]
::;''positive'': The effect is outright beneficial to the user (displayed in blue text in the item description window)
+
::;{{API optional|description_string}}: The tokenized string that describes the attribute. See [[#Attribute Descriptions|notes]]
::;''negative'': The effect is punitive to the user (red text)
+
::;{{API optional|description_format}}: A string describing how to format the value for a description. See [[#Attribute Descriptions|notes]]
::;''neutral'': The effect is more tangential to the normal behavior (eg. the [[Kritzkrieg]]'s ÜberCharge being critical hits rather than invulnerability) (white text).
+
:::;''value_is_percentage'': For values that translate into percentages and are represented by that percentage (eg. changes to the blast radius)
:;'''hidden''': A boolean that indicates if the attribute's description should be hidden from user view.
+
:::;''value_is_inverted_percentage'': For values that translate into percentages and are represented by the difference in that percentage from 100% (eg. changes to the fire rate)
:;'''stored_as_integer''': A boolean that indicates whether or not the value of the attribute is stored as an integer (opposed to a float).
+
:::;''value_is_additive'': For values that are a specific number (eg. max health bonuses and bleed durations) and boolean attributes (such as [[The Sandman]]'s ability to knock out balls)
;'''item_sets''': A list of associative arrays containing item set definitions.
+
:::;''value_is_additive_percentage'': For values that add to an existing percentage (e.g. The Ubersaw adding 25% charge every hit)
:;'''item_set''': The internal name of the set used for look ups.
+
:::;''value_is_date'': For values that are a unix timestamp
:;'''name''': The localized set name.
+
:::;''value_is_particle_index'': For values that are a particle effect type. See [[#Particle_Index_Type|notes]]
:;'''items''': A list of localized item names identifying the items contained in the set.
+
:::;''value_is_account_id'': For values that are a Steam account ID. See [[#Account_ID_Type|notes]]
:;'''attributes''' ''(<span style="color: red;">Optional</span>)'': A list of associative arrays that describe special attributes granted by equipping a complete set. Layout is identical to to item '''attributes'''.
+
:::;''value_is_or'': Possibly for values that get applied if a condition is true (e.g. player is on fire)
;'''attribute_controlled_attached_particles''': An object containing a list of associative arrays that describe the defined particle effects.
+
:::;''value_is_item_def'': For values that are an item ID (a defindex value in the schema)
:;'''system''': The name of the particle system.
+
::;effect_type: A string describing the type of effect the attribute has.
:;'''id''': The effect's ID, referred to by the '''attached particle effect''' attribute.
+
:::;''positive'': The effect is outright beneficial to the user (displayed in blue text in the item description window)
:;'''attach_to_rootbone''': A boolean that indicates whether or not the effect is attached to the "root" bone. That is the bone of the item with no parent bones used for rotation and animation calculations.  
+
:::;''negative'': The effect is punitive to the user (red text)
:;'''attachment''' ''(<span style="color: red;">Optional</span>)'': A string indicating where the effect is attached.
+
:::;''neutral'': The effect is more tangential to the normal behavior (eg. the [[Kritzkrieg]]'s ÜberCharge being critical hits rather than invulnerability) (white text).
:;'''name''': The localized name of the effect.
+
::;hidden: A boolean that indicates if the attribute's description should be hidden from user view.
;'''kill_eater_ranks''': An object containing a list of associative arrays that describe weapon ranks.
+
::;stored_as_integer: A boolean that indicates whether or not the value of the attribute is stored as an integer (opposed to a float).
:;'''name''': The localized name of the rank.
+
:;item_sets: A list of objects containing item set definitions.
:;'''level''': The "level" of the rank, this is different from the item's '''level''' field and should be treated as such.
+
::;item_set: The internal name of the set used for look ups.
:;'''required_score''': The number of kills the weapon must have less than for this rank to apply.
+
::;name: The localized set name.
 +
::;{{API optional|store_bundle}}: The localized set name as it appears in the store.
 +
::;items: A list of localized item names identifying the items contained in the set.
 +
::;{{API optional|attributes}}: A list of objects that describe special attributes granted by equipping a complete set. Layout is identical to to item attributes.
 +
:;attribute_controlled_attached_particles: An object containing a list of objects that describe the defined particle effects.
 +
::;system: The name of the particle system.
 +
::;id: The effect's ID, referred to by the attached particle effect attribute.
 +
::;attach_to_rootbone: A boolean that indicates whether or not the effect is attached to the "root" bone. That is the bone of the item with no parent bones used for rotation and animation calculations.  
 +
::;{{API optional|attachment}}: A string indicating where the effect is attached.
 +
::;name: The localized name of the effect.
 +
:;item_levels: A list of objects that describe ranks for kill eater items.
 +
::;name: The name of the rank set that the ranks are for.
 +
::;levels: A list of objects describing requirements and levels of each rank.
 +
:::;level: The rank's level.
 +
:::;required_score: The required kill eater score to level up the rank to the next one.
 +
:::;name: The rank/prefix name.
 +
:;kill_eater_score_types: An object containing a list of objects describing suffixes to use after a kill eater value in an attribute display line.
 +
::;type: An integer matching the one found in '''kill eater score type''' attributes. Use this to determine the string to use as a suffix.
 +
::;type_name: A localized suffix.
  
 
== Notes ==
 
== Notes ==
Line 192: Line 161:
  
 
; Steam Community ID
 
; Steam Community ID
: Add 1197960265728 to this value and prefix the string representation of the result with "7656" for a 64 bit Steam Community ID
+
: Add 76561197960265728 to this value for the 64 bit Steam Community ID
 
; STEAM_0 ID
 
; STEAM_0 ID
 
: Divide this value by 2 for a STEAM_0 ID value
 
: Divide this value by 2 for a STEAM_0 ID value
Line 207: Line 176:
 
In the localized description string there are "%s1" tokens, these are to be replaced with the appropriately formatted value generated with the format type and attribute values.
 
In the localized description string there are "%s1" tokens, these are to be replaced with the appropriately formatted value generated with the format type and attribute values.
  
{{Languages|WebAPI/GetSchema}}
 
 
[[Category:WebAPI|GetSchema]]
 
[[Category:WebAPI|GetSchema]]

Latest revision as of 16:23, 13 May 2024

Main article about WebAPI.


URL


https://api.steampowered.com/IEconItems_<ID>/GetSchema/v0001/?key=<API key>

See the ID list for a valid ID. You can get an API key here.

Method-specific Parameters

language (Optional) (string)
The ISO639-1 language code for the language all localized strings should be returned in. Not all strings have been translated to every language. If a language does not have a string, the English string will be returned instead. If this parameter is omitted the string token will be returned for the strings.

Result Data

result
status
The status of the request, should always be 1.
items_game_url
A string containing the URL to the full item schema as used by the game.
qualities
An object containing the numeric values corresponding to each "quality" an item can have:
normal (0 - Normal)
Set on stock items.
rarity1 (1 - Genuine)
Set on items acquired for a promotional event (for example, Sun-On-A-Stick and Sharpened Volcano Fragment).
rarity2 (2)
Unused
vintage (3 - Vintage)
Set on items that were owned before certain updates and promotions.
rarity3 (4)
Unused
rarity4 (5 - Unusual)
Set on items with an effect attached or that were gained from a Halloween event.
unique (6 - Unique)
Set on the most common items including those found via drops and crafting.
community (7 - Community)
Set on items granted to community contributors.
developer (8 - Valve)
Set on items owned by Valve staff members.
selfmade (9 - Self-Made)
Set on items owned by 3rd-party content creators.
customized (10 - Customized)
Unused
strange (11 - Strange)
Set on ranked items.
completed (12 - Completed)
Unused
haunted (13 - Haunted)
Set on Halloween items.
collectors (14 - Collector's)
Set on Collector's items.
paintkitweapon (15 - Decorated Weapon)
Set on Decorated items.
qualityNames
If the language argument is specified this object is included in the output. It includes the translations of the internal quality names to the specified language.
originNames
A list of objects describing an item's origin.
origin
An integer identifying the origin. See GetPlayerItems.
name
The localized name of the origin.
items
A list of item objects.
name
A string that defines the item in the items_game.txt
defindex
The item's unique index, used to refer to instances of the item in GetPlayerItems.
item_class
The item's class in game (ie. what you would use as the argument to "equip" in the console to equip it).
item_type_name
The tokenized string that describes the item's class (eg. "#TF_Wearable_Shield" for the Chargin' Targe and the Razorback). If the language argument is specified the string for that language will be returned instead of the token.
item_name
The tokenized string for the item's name (eg. "#TF_Spy_Camera_Beard" for the Camera Beard). If the language argument is specified the string for that language will be returned instead of the token.
item_description (Optional)
The tokenized string for the item's description if it has one. If a language is specified this will be the localized description string.
proper_name
A boolean value indicating the item requires "The" to be prefixed to it's name. Ignored if language is not English.
item_slot
A string indicating what loadout slot the item can be equipped to.
primary
Primary slot items (including "Slot Token - Primary")
secondary
Secondary slot items (including "Slot Token - Secondary")
melee
Melee slot items (including "Slot Token - Melee")
head
Hats and "Slot Token - Head"
misc
Misc slot items such as medals
pda
The Engineer's Build PDA, the Spy's Disguise Kit, and "Slot Token - PDA"
pda2
The Engineer's Destroy PDA, the Spy's Invisibility Watch, the Cloak and Dagger, the Dead Ringer, and "Slot Token - PDA2"
building
"TF_WEAPON_BUILDER" (an unused copy of the Engineer's Build PDA) and the unused "Slot Token - Building"
grenade
The unused "Slot Token - Grenade"
action
Gifts and the Duel minigame
item_quality
The item's default quality value. See description of "qualities" above.
image_inventory
The image to display, as an escaped-slash ("\/") path to the material, without the extension
image_url
The URL of the small (128x128) backpack icon for the relevant item. Will be an empty string if none is available.
image_url_large
The URL of the large (512x512) backpack image for the relevant item. Will be an empty string if none is available.
drop_type (Optional)
A string indicating how an item will detach (if it does) from the player upon death. This is only relevant to cosmetic items (for example, the drop type of the Le Party Phantom would be none and the mask will stay attached to the Spy's face upon death. The Fancy Fedora would have a drop type of drop and will fall from the Spy's head.)
none
The item does not detach.
drop
The item detaches.
item_set (Optional)
Used to look up the set the item is part of in item_sets.
holiday_restriction (Optional)
A string indicating the holiday on which the item can be used, if not present the item is available all year.
halloween_or_fullmoon
Halloween or Full Moon Events
halloween
Halloween - Currently only used on Eerie Crates
christmas
Smissmas - Currently only used on Winter Holiday Noisemakers
birthday
Birthday - Currently only used on TF Birthday Noisemakers
model_player
The model to display for the item, using a path similar to the above but with an ".mdl" extension, or null if the object has no model.
min_ilevel
The minimum level of the item in the schema. See notes
max_ilevel
The maximum level of the item in the schema. See notes
craft_class (Optional)
The type of the item from the crafting system's point of view. If this field is not present the item cannot be crafted by the random crafting recipes. If it is not empty it will be weapon, hat, craft_bar, haunted_hat, tool, supply_crate, or craft_token.
craft_material_type (Optional)
Similar to craft_class, except this determines if it can be used in certain crafting recipes. An item can be used in random recipes without being able to be crafted by random recipes and visa-versa.
capabilities (Optional)
An object describing various capabilities of the item, including how it can be interacted with.
can_craft_mark
The item will have the crafter's name attached to it.
nameable
Tags can be used on the item.
can_gift_wrap
The item can be gift wrapped.
paintable
The item can be painted.
can_craft_count
The item can be marked as a numbered craft.
decodable
The item can be opened with a key (this possibly refers to an abandoned predecessor of the crate system).
usable
The item is an Action item.
usable_gc
May mark items that can be used from within the backpack and do not need to be assigned a loadout slot.
usable_out_of_game
May mark items that can be activated while the user is not in-game.
tool (Optional)
If the item is a tool this will contain certain meta-data such as it's type, purpose, or string for use in the client UI.
used_by_classes (Optional)
The list of classes that can use this item. If this field is not present all classes can use the item.
per_class_loadout_slots (Optional)
An object that describes class specific loadout slots for the item if applicable.
styles (Optional)
If the item has changeable styles, an object containing an array of
name
The style's name.
attributes (Optional)
If the item has effects normally associated with it, an object containing an array of
name
The attribute's name value (see below)
class
The attribute's attribute_class value (see below)
value
The "value" of that attribute as a "%0.6f" formatted number: 1 (or 0) for boolean attributes (such as the Razorback's backstab blocking), or the multiplier for percentage-based attributes (such as 0.300000 for the Direct Hit's 30% blast radius, or 1.800000 for its 180% projectile speed)
attributes
An object containing an array of
name
A name describing the attribute (eg. "damage bonus" for damage increases found on weapons such as the Scotsman's Skullcutter, or "scattergun has knockback" for the Force-A-Nature's knockback)
defindex
The attribute's unique index, used to refer to unique instances of the item with these attributes in GetPlayerItems.
attribute_class
an underscore-based name for the attribute (eg. "mult_dmg" for the attribute whose name is "damage bonus")
minvalue
The minimum value allowed for this attribute. See notes
maxvalue
The maximum value allowed for this attribute. See notes
description_string (Optional)
The tokenized string that describes the attribute. See notes
description_format (Optional)
A string describing how to format the value for a description. See notes
value_is_percentage
For values that translate into percentages and are represented by that percentage (eg. changes to the blast radius)
value_is_inverted_percentage
For values that translate into percentages and are represented by the difference in that percentage from 100% (eg. changes to the fire rate)
value_is_additive
For values that are a specific number (eg. max health bonuses and bleed durations) and boolean attributes (such as The Sandman's ability to knock out balls)
value_is_additive_percentage
For values that add to an existing percentage (e.g. The Ubersaw adding 25% charge every hit)
value_is_date
For values that are a unix timestamp
value_is_particle_index
For values that are a particle effect type. See notes
value_is_account_id
For values that are a Steam account ID. See notes
value_is_or
Possibly for values that get applied if a condition is true (e.g. player is on fire)
value_is_item_def
For values that are an item ID (a defindex value in the schema)
effect_type
A string describing the type of effect the attribute has.
positive
The effect is outright beneficial to the user (displayed in blue text in the item description window)
negative
The effect is punitive to the user (red text)
neutral
The effect is more tangential to the normal behavior (eg. the Kritzkrieg's ÜberCharge being critical hits rather than invulnerability) (white text).
hidden
A boolean that indicates if the attribute's description should be hidden from user view.
stored_as_integer
A boolean that indicates whether or not the value of the attribute is stored as an integer (opposed to a float).
item_sets
A list of objects containing item set definitions.
item_set
The internal name of the set used for look ups.
name
The localized set name.
store_bundle (Optional)
The localized set name as it appears in the store.
items
A list of localized item names identifying the items contained in the set.
attributes (Optional)
A list of objects that describe special attributes granted by equipping a complete set. Layout is identical to to item attributes.
attribute_controlled_attached_particles
An object containing a list of objects that describe the defined particle effects.
system
The name of the particle system.
id
The effect's ID, referred to by the attached particle effect attribute.
attach_to_rootbone
A boolean that indicates whether or not the effect is attached to the "root" bone. That is the bone of the item with no parent bones used for rotation and animation calculations.
attachment (Optional)
A string indicating where the effect is attached.
name
The localized name of the effect.
item_levels
A list of objects that describe ranks for kill eater items.
name
The name of the rank set that the ranks are for.
levels
A list of objects describing requirements and levels of each rank.
level
The rank's level.
required_score
The required kill eater score to level up the rank to the next one.
name
The rank/prefix name.
kill_eater_score_types
An object containing a list of objects describing suffixes to use after a kill eater value in an attribute display line.
type
An integer matching the one found in kill eater score type attributes. Use this to determine the string to use as a suffix.
type_name
A localized suffix.

Notes

HTTP Headers

GetSchema responses will contain the Last-Modified header for use in caching and as a date for use in requests containing the If-Modified-Since header. This also applies to the client schema linked to by items_game_url.

Normal Weapons

The first 32 items listed describe the original class weapons, with an extraneous "TF_WEAPON_BUILDER" at defindex 28, which has the icon of the Engineer's Destroy PDA but the model of the Build PDA, and a "TF_WEAPON_FLAREGUN" at defindex 31, which uses "#TF_Weapon_Flaregun" for both item_name and item_type_name (where the normal "Unique Achievement Flaregun" uses "#TF_Unique_Achievement_Flaregun" for the item_name) and the pistol for the model. Every weapon in the first 32's name is its item_class in all caps.

Both Engineer PDAs and the Spy PDA use "#TF_Weapon_PDA_Engineer" for both their item_type_name and their item_name.

Attribute Min and Max Values

Values found on items are not guaranteed to fall within this range: for instance, "attach particle effect" lists "0.000000" as both its minvalue and maxvalue, but non-zero values are used to specify what particle effect to attach.

Particle Index Type

This type was introduced with the Polycount Update. It is to be used as an index to retrieve the particle effect name/description string.

Account ID Type

There are two formats of IDs that can be extracted from this.

Steam Community ID
Add 76561197960265728 to this value for the 64 bit Steam Community ID
STEAM_0 ID
Divide this value by 2 for a STEAM_0 ID value

Image Permissions

You are welcome to use the backpack images provided by image_url and image_url_large directly or to copy the files to your own server.

Level Ranges

If min_ilevel and max_ilevel are the same if the item does not have a random level.

Attribute Descriptions

If the attribute is unused or there is no applicable description_string and description_format will be unset. If there is a language specified this will be the localized description string instead of the token.

In the localized description string there are "%s1" tokens, these are to be replaced with the appropriately formatted value generated with the format type and attribute values.