Skip to content
TORNLIFE More

Upcoming API changes

Started by splent [2088243] Admin on in API Development.

380 replies · 11.9k views · thread synced · 4 days ago · View on torn.com

Posts archived: 381 / 381 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

splent [2088243] Admin Staff

Hey everyone, 

 

I've been working on restoring the 'user' -> 'inventory' selection recently. This has finally been achieved, but there are some limitations at the moment:

  • You can only request one item category at the time
  • Each category (once requested) is cached for 1 hour. I'm looking to reduce this down to 15 minutes or less if there will be no performance issues with this selection few weeks after the release
  • Weapons / Armour currently have a limitation of being able to return only up to 250 items per request (I'll try to increase that to at least 500 in the future). There are still some players with over 30,000 just Melee / Primary / Secondary weapons, and I'm afraid returning all weapons at once wouldn't be wise
  • Weapons / Armour don't contain any stats or bonuses at the moment. I'll try to add this in the future, once the inventory refactor is complete. Alternatively, I could try adding this before, with kind-of a "detailed" category, but the limit would probably have to be reduced down to 100 items returned (at least). Until then, you'll have to use 'torn' -> 'itemdetails' to get information about your gear
  • Faction owned items are shown as separate entries, so you might see two entries for some items (just like on the inventory page)

 

As many of you know, 'user' -> 'inventory' selection was disabled a while ago due to performance issues, so this is only an attempt at making it available again. As such, please treat this selection is very unstable until further notice, but I hope it will be useful at least a bit. 

 

Thanks!

 

 

--


The Swagger schema is now bumped to the version 5.6.0 (if you're not seeing changes make sure to hard-refresh the openapi.json file).

Please let me know if you encountered any bugs by creating a new thread in the Bugs & Issues forum.

 

If you would like to have something improved or just share your thoughts, please write so in this discussion thread. 

Mentions: API Suggestions, improvements & discussion

splent [2088243] Admin Staff

Hey everyone, 

 

Small, but hopefully welcome changes were done today:

  • [API-v2] Added 'user' -> 'casino' showing current casino streak and remaining casino tokens
  • [API-v2] Added 'total' to metadata links in 'torn' -> 'bounties' showing the final amount of rows

 

I'll try to add these totals to other selections where applicable. I can mostly do that just in globally cached selections, where everything is cached at once. Otherwise, totals might be (in some selections more than others), resource heavy.

Let me know if something's not right.


Thanks!

 

 

--


The Swagger schema is now bumped to the version 5.7.0 (if you're not seeing changes make sure to hard-refresh the openapi.json file).

Please let me know if you encountered any bugs by creating a new thread in the Bugs & Issues forum.

 

If you would like to have something improved or just share your thoughts, please write so in this discussion thread. 

 

Mentions: API Suggestions, improvements & discussion

splent [2088243] Admin Staff

Hey all,

 

Few more changes were done today: 

  • [API] Fixed last_action sometimes being incorrect (up to 60s) even if players were actively online
  • [API-v2] Added banner_image to 'faction' -> 'basic'
  • [API] Made some optimizations to reduce the number of queries needed to get user information in multiple selections
  • [Swagger] Fixed until being string instead of integer in FactionPact schema

 

Let me know if something's not right.


Thanks!

 

--


The Swagger schema is now bumped to the version 5.7.1 (if you're not seeing changes make sure to hard-refresh the openapi.json file).

Please let me know if you encountered any bugs by creating a new thread in the Bugs & Issues forum.

 

If you would like to have something improved or just share your thoughts, please write so in this discussion thread. 

 

Mentions: API Suggestions, improvements & discussion

splent [2088243] Admin Staff

Hey everyone,


I was finally able to start refactoring the 'company' section:

  • [API-v2] Refactored 'company' -> 'profile' - this selection now encompasses both 'company' -> 'profile' & 'company' -> 'details'. Detailed response is only available to company directors for their own companies with Limited, Custom or Full access API keys. This response also doesn't contain details about employees anymore
  • [API-v2] Refactored 'company' -> 'employees' - this selection is now public, though detailed information (working stats, wages, etc.) are only available to directors for their own employees with Limited, Custom or Full access API keys. If you have a secretary in your company, each employee will now also have the 'value' field populated
  • [API-v2] Refactored 'company' -> 'applications' - the response structure is slightly improved
  • [API-v2] Refactored 'company' -> 'stock' - mostly stayed the same

 

I'm looking to continue my work on this and refactor 'company' -> 'news', 'company' -> 'companies', 'torn' -> 'companies' & 'company' -> 'search' soon™.

Let me know if something's not right.


Thanks!

 

--


The Swagger schema is now bumped to the version 5.8.0 (if you're not seeing changes make sure to hard-refresh the openapi.json file).

Please let me know if you encountered any bugs by creating a new thread in the Bugs & Issues forum.

 

If you would like to have something improved or just share your thoughts, please write so in this discussion thread. 

 

Mentions: API Suggestions, improvements & discussion

splent [2088243] Admin Staff

Hey everyone, 

 

Some QoL were made today:

  • [API-v2] Added ability to see 'working_stats' & 'efficiency' in 'company' -> 'employees' to employees as well (previously visible only to the director). Thanks for the feedback on this - for some reason I automatically assumed this is available only to the director, but after confirming internally this was indeed intended behaviour in API v1, the same was done for API v2.
  • [API-v2] Added image to 'torn' -> 'itemmods'
  • [API-v2] Added equipped mods & current ammo to 'user' -> 'equipment'
  • [API-v2] Changed default sorting in 'market' -> 'rentals' to match the site (previously used 'Happy DESC, rent cost ASC', now using ' Happy DESC, rent per day ASC')
  • [API-v2] Added 'total' amount of rows to globally cached selections ('market' -> 'itemmarket', 'market' -> 'properties', 'market' -> 'rentals'
  • [API-v2] Fixed a strange bug with uppercase & lowercase letters on 'cat' query parameter in 'user' -> 'inventory'
  • [API-v2] Added 'user' -> 'itemmods' (will become available likely on Monday, May 11th 2026)

 

--


The Swagger schema is now bumped to the version 5.8.1 (if you're not seeing changes make sure to hard-refresh the openapi.json file).

Please let me know if you encountered any bugs by creating a new thread in the Bugs & Issues forum.

 

If you would like to have something improved or just share your thoughts, please write so in this discussion thread. 

Mentions: API Suggestions, improvements & discussion

splent [2088243] Admin Staff

Hey everyone, 


Continuing with the 'company' module refactor:

  • [API-v2] Refactored 'company' -> 'news'. This is pretty much the same as before, with a slightly changed structured. You can now also pass a specific category (only 1 category per request unfortunately), though the default is still 'all'
  • [API-v2] Refactored 'company' -> 'companies'. This selection now provides a bit more information (the 'image' field & more detailed director information), basically on-pair with 'company' -> 'profile'. There's one big difference compared to API v1 - it's possible to only get 100 companies in one request. This will become changed in API v1 soon (read below for more information
  • [API-v2] Added 'irradiated' boolean flag to 'faction' -> 'territoryownership'
  • [API-v2] Added 'in_progress' races to 'user' -> 'races'. The 'skill' is set to 'null' for such races, and 'results' field is an empty array

 

Important deprecation notice!

  • [API-v1] Starting on Monday, June 1st, 'company' -> 'companies' will return only up to 100 rows per request. This will be done both to decrease the bandwidth and further decrease the impact of mug bots. For some company types, there's well over 500 companies returned in a single request (for example, there is over 2000 Adult Novelty companies, making the response size almost 500KB!)

 

Important deprecation notice reminders!

  • Key owner's CPR for empty slots in 'faction' -> 'crimes' with Recruiting status will become zero (0) on Monday, June 1st!
  • The position_id & position_number are deprecated in FactionCrimeSlot schema and are replaced with position_info object. These fields will be removed on 1st of June 2026!
  • The id is deprecated in TornOrganizedCrimeSlot schema and is replaced with position_info object. This field will be removed on 1st of June 2026!

 

I'm hoping to work on 'company' -> 'search' & 'user' -> 'search' selections soon, as well as make other QoL improvements suggested in the API suggestions thread.

 

As always, if you notice any issues, please let me know so I can fix them. Thanks!

 

--


The Swagger schema is now bumped to the version 5.9.0 (if you're not seeing changes make sure to hard-refresh the openapi.json file).

Please let me know if you encountered any bugs by creating a new thread in the Bugs & Issues forum.

 

If you would like to have something improved or just share your thoughts, please write so in this discussion thread. 

 

Mentions: API Suggestions, improvements & discussion

splent [2088243] Admin Staff

Hey everyone,
 
I'm happy to announce our first 'snapshot' selection today. We'll be adding more of these in the future!

  • [API-v2] Added 'company' -> 'snapshot' - this selection returns a .csv file containing a list of all companies in the game. These are populated by a cron-job, once per day (around midnight TCT). It is possible to also get older snapshots, by passing a timestamp value for that day (e.g. `timestamp=1780133713` will get you data for 30th May 2026). Currently, the data retention is set to just 7 days, but we'll likely increase that in the future.
  • [API-v2] Added 'company' -> 'search' - this selection is similar to the 'faction' -> 'search'. It allows filtering by name/ID, daily & weekly customers & income, type and rating, recruiting or not recruiting. I also changed the filtering format, so instead of e.g. `filters=weeklyIncomeGreaterOrEqual20000,idLess1000,notRecruiting` you would now use `filters=weeklyIncome:>=:20000,id:<:1000,notRecruiting`. It's possible to use both signs and full words for filtering operations. Unlike 'company' -> 'profile' or 'company' -> 'companies', this selection doesn't contain the information about directors to prevent mugbots from bypassing cached information.
  • [API-v2] Changed 'image' to be of type `string | null` in 'company' related selections (previous just string)
  • [API-v2] Added 'applications_allowed' to everyone instead of just directors
  • [API-v2] Changed filtering in 'faction' -> 'search' to be in the format described above. The now legacy format will still be supported until 1st of December 2026.
  • [API-v2] Added 'members_max' field to 'faction' -> 'search' results & 'membersMax' filtering option.

 

Deprecated changes are now live!

  • [API-v1] The 'company' -> 'companies' selection now returns only 100 companies per request. Possible to use 'limit' & 'offset' query parameters
  • [API-v2] The CPR for empty slots is now set to zero in 'faction' -> 'crimes' & 'faction' -> 'crime' selections
  • [API-v2] Removed deprecated 'position_id' & 'position_number' from FactionCrimeSlot
  • [API-v2] Removed deprecated 'id' from TornOrganizedCrimeSlot
     

We plan on adding more snapshot selections in the near future, for example;

  • all factions compiled daily,
  • item/stock price movements,
  • potentially the active playerbase list and a few other things

 

Of course, this will require careful approach, so some of these things might take a bit more time, but at least we have a base system that we can expand on now. 

 

--


The Swagger schema is now bumped to the version 6.0.0 (if you're not seeing changes make sure to hard-refresh the openapi.json file).

Please let me know if you encountered any bugs by creating a new thread in the Bugs & Issues forum.

 

If you would like to have something improved or just share your thoughts, please write so in this discussion thread. 

 

Mentions: API Suggestions, improvements & discussion

splent [2088243] Admin Staff

Hey everyone, 

 

I'm happy to let everyone know we now have API v2 playground available. You can access it on this URL: 

 

https://api-playground.torn.com/ 

 

You can also always find the link on the API docs page from now on.


This project was heavily inspired by an API playground made by Legaci [2100546], so I would like to publicly thank Legaci for the idea and for offering us the codebase of his project, however, of course we've built our own version from the scratch (big thanks to TestPedroDev for his help on this project too). 

In case you have any suggestions or bugs, feel free to also report them here or in the bugs & issues forum. 

In other news, many bug fixes and Swagger schema updates were shipped this last week. Rough summary is here: 

 

The API updates were a bit slower than usual lately as my focus is mostly shifted towards Traveling 2.0 updates, but of course, it's not forgotten and there are still plans to finish the remaining work on API v2.

 

Thanks!

 

--


The Swagger schema is now bumped to the version 6.0.4 (if you're not seeing changes make sure to hard-refresh the openapi.json file).

Please let me know if you encountered any bugs by creating a new thread in the Bugs & Issues forum.

 

If you would like to have something improved or just share your thoughts, please write so in this discussion thread. 

 

Mentions: Legaci [2100546] · TestPedroDev [3613560] · /market/auctionhouse returning wrong price · [API] Mission rewards incorrect expiring date · [API] OCs apparently missing from /faction/crimes · [API] UserBars typing incorrect · A few OpenAPI v2 spec discrepancies - This is a feature, not a bug list · API BAZZAR BUG · API Suggestions, improvements & discussion · API v2 /faction/crimes Bug · API v2 returns incorrect Territories · Wrong outcome of attack in API

splent [2088243] Admin Staff

Hey everyone,

 

I've finally managed to add 'faction' -> 'snapshot' selection as well.

 

This selection contains daily snapshot of all factions and with all members (only ids) in those factions at the time of the snapshot. 


The first snapshot will happen tonight around midnight, so this selection is essentially not working until then.


Thanks! 

 

--


The Swagger schema is now bumped to the version 6.1.0 (if you're not seeing changes make sure to hard-refresh the openapi.json file).

Please let me know if you encountered any bugs by creating a new thread in the Bugs & Issues forum.

 

If you would like to have something improved or just share your thoughts, please write so in this discussion thread. 

 

Mentions: API Suggestions, improvements & discussion

splent [2088243] Admin Staff

Hey everyone, 

 

We've finally added a snapshot of daily active players to our API! In other news, there's another new selection, some improvements and some bug fixes:

 

Thanks!

 

--


The Swagger schema is now bumped to the version 6.3.0 (if you're not seeing changes make sure to hard-refresh the openapi.json file).

Please let me know if you encountered any bugs by creating a new thread in the Bugs & Issues forum.

 

If you would like to have something improved or just share your thoughts, please write so in this discussion thread. 

 

Mentions: API Suggestions, improvements & discussion · Chain Report API Bug · Faction Crimes API 2.0 returned incorrect value · OC 2.0 API response

splent [2088243] Admin Staff

Hey everyone, 

 

Continuing the refactor of the remaining API v2 selections and fixing some outstanding issues:

 

I'm hoping to make a small change to 'user' -> 'snapshot' soon based on the received feedback, but unfortunately it won't be possible to add xanax used to the daily snapshot. 

 

I'm looking to refactor the remaining non-inventory selections and add 'user' -> 'search' in the near future.

 

Thanks!

 

--


The Swagger schema is now bumped to the version 6.4.0 (if you're not seeing changes make sure to hard-refresh the openapi.json file).

Please let me know if you encountered any bugs by creating a new thread in the Bugs & Issues forum.

 

If you would like to have something improved or just share your thoughts, please write so in this discussion thread. 

 

Mentions: API endpoint /faction/attacks missing data · API Suggestions, improvements & discussion · Profile api bug. Shows my prof instead of Invalid

splent [2088243] Admin Staff

Hey everyone, 

 

Few more selections were added to API v2 now: 

  • Refactored 'user' -> 'perks'
  • Refactored 'market' -> 'pointsmarket'
  • Marked several selections as stable: the whole company module, 'user' -> 'casino', 'user' -> 'trades', 'user' -> 'trade', 'torn' -> 'museum'
  • Fixed ambiguous timestamp description - each selection now clearly states if the timestamp is used to get data in a specific point in time or to bypass cache

 

 

--


The Swagger schema is now bumped to the version 6.6.0 (if you're not seeing changes make sure to hard-refresh the openapi.json file).

Please let me know if you encountered any bugs by creating a new thread in the Bugs & Issues forum.

 

If you would like to have something improved or just share your thoughts, please write so in this discussion thread. 

Mentions: API Suggestions, improvements & discussion

splent [2088243] Admin Staff

One more upcoming update today, for the 'user' -> 'snapshot' selection:

  • removed 'role', 'last_action', 'networth' & 'location' fields
  • added 'job' (to complement 'company'), 'time_played' & 'awards' fields


Unfortunately, 'xanax_taken' or other personal stats won't be a part of this selection. 

 

Let me know if you have any concerns or improvements for this selection. 

 

Thanks!

--


The Swagger schema is now bumped to the version 6.6.1 (if you're not seeing changes make sure to hard-refresh the openapi.json file).

Please let me know if you encountered any bugs by creating a new thread in the Bugs & Issues forum.

 

If you would like to have something improved or just share your thoughts, please write so in this discussion thread, otherwise feel free to try this in the API v2 playground.

Mentions: API Suggestions, improvements & discussion

splent [2088243] Admin Staff

Hey everyone, 

 

Just a small general improvement was done today:

  • [API-v2] Refactored 'torn' -> 'companies' - it's basically the same data as API v1
  • [Playground] Added 'companies' catalog so 'company/{typeId}/companies' and 'torn/{typeId}/companies' are prefilled with company types
  • [Playground] Refreshed other catalogs to add new missing entries (e.g. new items)

 

 

--


The Swagger schema is now bumped to the version 6.7.0 (if you're not seeing changes make sure to hard-refresh the openapi.json file).

Please let me know if you encountered any bugs by creating a new thread in the Bugs & Issues forum.

 

If you would like to have something improved or just share your thoughts, please write so in this discussion thread, otherwise feel free to try this in the API v2 playground.

Mentions: API Suggestions, improvements & discussion

splent [2088243] Admin Staff

Hey everyone, 


The 'user' -> 'search' is now finally available in the API.

 

This selection is reusing on-site filtering options, so unfortunately, the filtering is not as flexible as 'faction' -> 'search' or 'company' -> 'search'. This means:

  • You can only use one of the following at the time : married, notMarried, traveling, notTraveling, inFaction, notInFaction, inCompany, notInCompany, inHospital, notInHospital, inJail, notInJail, inFederalJail, notInFederalJail
  • You can only have one last action filter at the time : lastActionNow, lastActionRecent, lastActionHourAgo, lastActionDayAgo, lastActionWeekAgo, lastActionMonthAgo, lastActionYearAgo
  • You can only have one gender filter at the time : male, female, enby
  • There are only 3 "dynamic" options, and there isn't 'not equal' filter this time : level, daysOld, offences
  • You can also pass the list of faction ids to 'factions' filter, but you have to use semicolon (I didn't have a good solution for this without introducing another query parameter which is sadly quite complicated process) : factions:1;2;3

 

The response is the same as the one visible on site, without faction tag images.

There's a real possibility this selection will be a bit heavy on our systems sometimes, so I'll leave it as "Unstable" for a while.

 

We might need to remove certain filtering options or even completely disable the whole selection temporarily (especially during high-load events like Halloween). 

Happy to hear your feedback on this selection and also to see what comes out of it! 

Thanks. 

 

P.S. Also fixed parameter text render for parameters (especially in the 'search' selections) in the playground.

 

--


The Swagger schema is now bumped to the version 6.8.0 (if you're not seeing changes make sure to hard-refresh the openapi.json file).

Please let me know if you encountered any bugs by creating a new thread in the Bugs & Issues forum.

 

If you would like to have something improved or just share your thoughts, please write so in this discussion thread, otherwise feel free to try this in the API v2 playground.

Mentions: API Suggestions, improvements & discussion

splent [2088243] Admin Staff

Hey everyone, 


Few more changes to the API were done today and yesterday: 

  • [API-v2] Refactored 'torn' -> 'searchforcash' - now contains subcrime ID instead of slug
  • [API-v2] Refactored 'torn' -> 'shoplifting' - now contains subcrime ID instead of slug
  • [API-v2] Split 'faction' -> 'warfare' into 5 selections and also deprecated 'faction' -> 'warfare'. This selection will be removed on 1st of January 2027
  • [API-v2] Added 'faction' -> 'warfarechains' - The same response as cat 'chains' or 'chainsOngoing' in 'faction' -> 'warfare'. By default, all active/cooldown chains are being returned, that is, category 'active'. It's possible to pass cat=complete to get all complete chains
  • [API-v2] Added 'faction' -> 'warfareraids' - The same response as cat 'raids' in 'faction' -> 'warfare'
  • [API-v2] Added 'faction' -> 'warfareranked' - The same response as cat 'ranked' in 'faction' -> 'warfare'
  • [API-v2] Added 'faction' -> 'warfareterritory' -> The same response as cat 'territory' in 'faction' -> 'warfare'
  • [API-v2] Added 'faction' -> 'dirtybombs' -> The same response as cat 'db' in 'faction' -> 'warfare'
  • [API-v2] Added 'user' -> 'medals' for other players
  • [Swagger] Fixed incorrect access type descriptions 
  • [API] Increased comment query parameter size to 15 characters (previously 10) 
  • [Playground] Added  'crimeID' to 'user' -> 'crimes' to suggest crimes based on crime names
  • [Playground] Added refresh button to refresh schema stuck on the older versions
  • [Playground] Added auto-generated types in various languages for responses

 

 

Please let me know if you encounter any issues with any of the above. 

Thanks!

 

--


The Swagger schema is now bumped to the version 6.9.0 (if you're not seeing changes make sure to hard-refresh the openapi.json file).

Please let me know if you encountered any bugs by creating a new thread in the Bugs & Issues forum.

 

If you would like to have something improved or just share your thoughts, please write so in this discussion thread, otherwise feel free to try this in the API v2 playground.

Mentions: [API v2] Urgent: Selection Access level inconsistencies · API Suggestions, improvements & discussion

splent [2088243] Admin Staff

Hey everyone, 

 

Few more changes landed today: 

 

Please let me know if you encounter any issues with any of the above. 

 

Thanks!

 

P.S. There are some issues with Github at the moment, so full changes will be live shortly.

 

--


The Swagger schema is now bumped to the version 6.10.2 (if you're not seeing changes make sure to hard-refresh the openapi.json file).

Please let me know if you encountered any bugs by creating a new thread in the Bugs & Issues forum.

 

If you would like to have something improved or just share your thoughts, please write so in this discussion thread, otherwise feel free to try this in the API v2 playground.

 

Mentions: [API V1/V2] Logs cannot display all items added on Bazaar in one go · [API] car_name for cars not in spec · [API] Incorrect weapon ammo in spec · API Suggestions, improvements & discussion

splent [2088243] Admin Staff

Hey everyone, 

 

Several changes today: 

  • [API-v2] Refactored 'torn' -> 'pokertables' - same response as in API v1, just formatted differently and added to Swagger/Playground
  • [API-v2] Refactored 'torn' -> 'cards' - same as above
  • [API-v2] Refactored 'torn' -> 'bank' - same as above
  • [API-v2] Refactored 'torn' -> 'cityshops' - this selection will now always show all items including default restock amounts. It's also possible to pass an ID to just get items from a specific shop
  • [API-v2] Added 'shops' array to 'value' object in 'torn' -> 'items' - this array shows all locations where items can be bought or sold from. Prices for 'Black Market' items are set as null. This change also deprecates the following fields in the 'value' object: 'vendor', 'buy_price', 'sell_price'. These fields will be removed on 1st of January 2027.
  • [API-v2] Disabled 'torn' -> 'pawnshop' - the Donator pack sell price is now available in 'torn' -> 'items' with the above change, so this selection is no longer necessary

 

Important upcoming changes for this Friday, August 21st 2026!

We'll be setting the chain value to zero (0) for all incoming attacks (both stealth and un-stealth attacks) in 'user' -> 'attacks' & 'faction' -> 'attacks' both in API v1 & API v2. 
This change will also affect all existing records retroactively.

After an internal discussion it was decided this value should not be shown for incoming attacks to make the attack logs more consistent with the site and also (for stealth attacks) reduce the ability to discover the attacker. 

 

Let me know if you discover any issues or if you have any thoughts about these changes. 

 

Thanks!

 

--


The Swagger schema is now bumped to the version 6.11.0 (if you're not seeing changes make sure to hard-refresh the openapi.json file).

Please let me know if you encountered any bugs by creating a new thread in the Bugs & Issues forum.

 

If you would like to have something improved or just share your thoughts, please write so in this discussion thread, otherwise feel free to try this in the API v2 playground.

 

Mentions: API Suggestions, improvements & discussion

splent [2088243] Admin Staff

Hey everyone, 


Late update today: 

  • [API-v2] Added 'faction' -> 'inventory'. This selection requires Limited access key and shows armoury items for the chosen category. All of the items are cached at once for the duration of 1 hour, just like 'user' -> 'inventory'. This selection shows all item uids given to each member (weapons/armour only) and all available uids for weapons & armour. Other stackable items only show "max" uid. I decided against adding item details to this selection since that would massively increase bandwidth (over long periods of time), for information that is basically static, so you'll have to get item details for each item separately. However, before you raise your pitchforks..
  • [API-v2] Improved 'torn' -> 'itemdetails' to accept multiple uids. This selection now accepts up to 25 item uids, and will return an array of TornItemDetails schema. The individual object response is now deprecated, and will be removed along with other deprecated changes on January 1st, 2027. However, there was no changes to the current behaviour, but please update your code to prepare for this change to avoid your app from crashing!
  • [API-v2] Added 'faction' -> 'crimeexp' to Swagger. There were no changes to this selection.
  • [API-v2] Removed 'faction' -> 'weapons', 'armor', 'boosters', 'cesium', 'drugs', 'medical', 'consumables', 'utilities', 'temporary' & 'caches'. All of these are now replaced by 'faction' -> 'inventory'

 

These were the last remaining changes for the 'faction' module in API v2, and I'm happy to close that down.

Once the internal site-wide inventory refactor is complete, we'll likely fully remove 1 hour cache both from 'faction' -> 'inventory' & 'user' -> 'inventory' and also possibly increase the number of uids accepted in the 'torn' -> 'itemdetails' call.

If everything goes well with this 'faction' -> 'inventory', I'll be open to reducing the cache TTL even before site wide inventory refactor is complete. 

Important deprecation warning!

The 'torn' -> 'itemdetails' selection will stop returning TornItemDetails schema response on January 1st, 2027. Instead, it will return an array of  TornItemDetails schemas.

 

Other deprecation warning reminders!

Important upcoming changes for this Friday, August 21st 2026!

We'll be setting the chain value to zero (0) for all incoming attacks (both stealth and un-stealth attacks) in 'user' -> 'attacks' & 'faction' -> 'attacks' both in API v1 & API v2. 
This change will also affect all existing records retroactively.

 

[API-v2] 'faction' -> 'warfare' is now deprecated. It is replaced by other warfare selections and will be removed on 1st of January 2027.

 

As always, let me know if you experience any issues with any of these changes.

Thanks!

 

--


The Swagger schema is now bumped to the version 6.12.0 (if you're not seeing changes make sure to hard-refresh the openapi.json file).

Please let me know if you encountered any bugs by creating a new thread in the Bugs & Issues forum.

 

If you would like to have something improved or just share your thoughts, please write so in this discussion thread, otherwise feel free to try this in the API v2 playground.

Mentions: API Suggestions, improvements & discussion

splent [2088243] Admin Staff

Hey everyone, 


Today's changes include:

  • [API] set chain value to 0 in 'user' -> 'attacks' & 'faction' -> 'attacks' in both API v1 & v2 if the attacker is not the user or from the faction
  • [Swagger] Added 'torn' -> 'rockpaperscissors' - no changes to this response in API v2
  • [API-v1] Set the 'first_owner' & 'first_faction_owner' to 0 for all items  
  • [API-v2] Refactored 'torn' -> 'itemstats' - this selection now also accepts multiple uids (up to 25 uids). This selection doesn't contain information about "First Owner' & "First Faction Owner". This information is now completely removed from the API, to further reduce the impact of mug bots. 
  • [API-v2] Removed non weapons & non armour from 'torn' -> 'itemdetails' & 'torn' -> 'itemstats'
  • [API-v2] Refactored 'torn' -> 'stats' - city stats now have improved format, reflecting the data in the City Hall. This selection will also return new error with the code '31' and the message "Cron failed, no city stats for this date" if there were no city stats updates for a specific date (API v1 will return data for one day before or after)
  • [API-v2] Fixed snapshot selections headers being set as application/json instead of text/csv
  • [API-v2] Disabled 'user' -> 'publicStatus'

 

 

Important deprecation warning!

The 'user' -> 'attacks' & 'faction' -> 'attacks' selections will be returning null instead of 0 value for 'chain' field, starting January 1st, 2027. The Swagger schema was updated to allow for 'null' values already.

 

Other deprecation warning reminders!

[API-v2] The 'faction' -> 'warfare' is now deprecated. It is replaced by other warfare selections and will be removed on 1st of January 2027.

 

[API-v2] The 'torn' -> 'itemdetails' selection will stop returning TornItemDetails schema response on January 1st, 2027. Instead, it will return an array of  TornItemDetails schemas.

 

Important note!

Please note that the upcoming API work will likely much slower in the upcoming several weeks. I'll be vacating and mostly focused on the upcoming Travel changes, so apologies if I end up being slow with replies or bugs.

 

Thanks! 

 

--


The Swagger schema is now bumped to the version 6.13.0 (if you're not seeing changes make sure to hard-refresh the openapi.json file).

Please let me know if you encountered any bugs by creating a new thread in the Bugs & Issues forum.

 

If you would like to have something improved or just share your thoughts, please write so in this discussion thread, otherwise feel free to try this in the API v2 playground.

Mentions: API Suggestions, improvements & discussion