### User Calendar API
Source: https://www.torn.com/swagger/openapi
Retrieves the start time for your competitions' events. This endpoint requires a minimal access key and is only accessible by the user themselves. It is marked as stable.
```APIDOC
GET /user/calendar
summary: Get your competition's event start time
description: Requires minimal access key. Only available to yourself.
operationId: 4cc4cc6fa3764f9732db9589e91d7739
parameters:
- $ref: "#/components/parameters/ApiTimestamp"
- $ref: "#/components/parameters/ApiComment"
- $ref: "#/components/parameters/ApiKeyMinimal"
responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/UserCalendarResponse"
security:
- api_key: []
x-stability: Stable
```
--------------------------------
### Torn API: Get Car Upgrades
Source: https://www.torn.com/swagger/openapi
Retrieves details about all possible car upgrades. Requires a public access key and supports timestamp and comment parameters.
```APIDOC
GET /racing/carupgrades
Summary: Get all possible car upgrades
Description: Requires public access key. Returns the details about all possible car upgrades.
OperationId: c9e76cf48aa3c4bac4c8b33f1c0c9a17
Parameters:
- $ref: "#/components/parameters/ApiTimestamp"
- $ref: "#/components/parameters/ApiComment"
- $ref: "#/components/parameters/ApiKeyPublic"
Responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/RacingCarUpgradesResponse"
Security:
- api_key: []
x-stability: Stable
```
--------------------------------
### Torn API: Get User Job Ranks
Source: https://www.torn.com/swagger/openapi
Retrieves the user's starter job positions. Requires a minimal access key. Returns a successful operation status with user job ranks data.
```APIDOC
"user/jobranks": {
"get": {
"tags": [
"User"
],
"summary": "Get your starter job positions",
"description": "Requires minimal access key.
",
"operationId": "facf1ddeef80a440229941f49aec6ccc",
"parameters": [
{
"$ref": "#/components/parameters/ApiTimestamp"
},
{
"$ref": "#/components/parameters/ApiComment"
},
{
"$ref": "#/components/parameters/ApiKeyMinimal"
}
],
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserJobRanksResponse"
}
}
}
}
},
"security": [
{
"api_key": []
}
],
"x-stability": "Stable"
}
}
```
--------------------------------
### Torn API: Get Forum Lookup
Source: https://www.torn.com/swagger/openapi
Fetches all available forum selections. Requires a public access key. Supports filtering by timestamp, comments, and public access key.
```APIDOC
GET /forum/lookup
Tags:
- Forum
Summary:
Get all available forum selections
Description:
Requires public access key.
OperationId:
f0805d0b7ad26c62ddd2fa8d0d332ba4
Parameters:
- $ref: "#/components/parameters/ApiTimestamp"
- $ref: "#/components/parameters/ApiComment"
- $ref: "#/components/parameters/ApiKeyPublic"
Responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/ForumLookupResponse"
Security:
- api_key: []
x-stability: Stable
```
--------------------------------
### Torn Calendar Activity Schema
Source: https://www.torn.com/swagger/openapi
Defines the structure for a calendar activity, including title, description, start, and end times.
```APIDOC
TornCalendarActivity:
required: [title, description, start, end]
properties:
title: { type: string }
description: { type: string }
start: { type: integer, format: int32 }
end: { type: integer, format: int32 }
type: object
```
--------------------------------
### Torn API: Get Faction Upgrades
Source: https://www.torn.com/swagger/openapi
Retrieves the upgrades for a faction. Requires a minimal access key with faction API access permissions. The response contains information about the faction's current upgrades.
```APIDOC
GET /faction/upgrades
Summary: Get your faction's upgrades
Description: Requires minimal access key with faction API access permissions.
Parameters:
- ApiTimestamp: Timestamp for the request.
- ApiComment: Optional comment for the request.
- ApiKeyMinimal: Minimal access key with faction API access permissions.
Responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/FactionUpgradesResponse"
Security:
- api_key: []
x-stability: Unstable
```
--------------------------------
### Get Forum Posts by Thread
Source: https://www.torn.com/swagger/openapi
Retrieves posts for a specific thread, supporting pagination with 'offset' or filtering by 'from' and 'to' parameters. Requires a public access key.
```APIDOC
GET /forum/{threadId}/posts
Parameters:
- threadId (path, required): The ID of the thread.
- ApiStripTagsTrue (query): Whether to strip HTML tags from content.
- ApiOffsetNoDefault (query): The number of posts to skip (pagination).
- ApiSort (query): The sorting order for posts.
- ApiFrom (query): Filter posts from a specific timestamp.
- ApiTo (query): Filter posts up to a specific timestamp.
- ApiTimestamp (query): The timestamp for the request.
- ApiComment (query): A comment for the request.
- ApiKeyPublic (query): Your public API key.
Responses:
- 200: Successful operation. Returns a list of forum posts.
Security:
- api_key: Requires a public API key.
```
--------------------------------
### Torn API: Get User Simplified Revives
Source: https://www.torn.com/swagger/openapi
Retrieves simplified user revives with filters, limits, sorting, and timestamps. Requires an API key with limited access. Returns a RevivesFullResponse schema.
```APIDOC
GET /user/revivesFull
Tags: User
Summary: Get your simplified revives
Description: Requires limited access key.
OperationId: 8820cd889afde899353037ca5a0f9a07
Parameters:
- $ref: "#/components/parameters/ApiFiltersIncomingOutgoing"
- $ref: "#/components/parameters/ApiLimit1000Default20"
- $ref: "#/components/parameters/ApiSort"
- $ref: "#/components/parameters/ApiTo"
- $ref: "#/components/parameters/ApiFrom"
- $ref: "#/components/parameters/ApiStripTagsTrue"
- $ref: "#/components/parameters/ApiTimestamp"
- $ref: "#/components/parameters/ApiComment"
- $ref: "#/components/parameters/ApiKeyLimited"
Responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/RevivesFullResponse"
Security:
- api_key: []
```
--------------------------------
### Torn API: Get Faction Wars and Pacts
Source: https://www.torn.com/swagger/openapi
Retrieves details about a faction's wars and pacts. Requires a public access key. The response provides information on ongoing and past conflicts and alliances.
```APIDOC
GET /faction/wars
Summary: Get your faction's wars & pacts details
Description: Requires public access key.
Parameters:
- ApiTimestamp: Timestamp for the request.
- ApiComment: Optional comment for the request.
- ApiKeyPublic: Public access key.
Responses:
200:
description: Successful operation
Security:
- api_key: []
```
--------------------------------
### Torn API: Get Races
Source: https://www.torn.com/swagger/openapi
Retrieves a list of races, ordered by start timestamp. Supports filtering by category and requires a public access key.
```APIDOC
GET /racing/races
Summary: Get races
Description: Requires public access key. Returns a list of races, ordered by race start timestamp.
OperationId: 4be921a67d32b5e82c68835ef56175d0
Parameters:
- $ref: "#/components/parameters/ApiLimit100"
- $ref: "#/components/parameters/ApiSortDesc"
- $ref: "#/components/parameters/ApiTo"
- $ref: "#/components/parameters/ApiFrom"
- name: cat
in: query
description: Category of races returned
required: false
schema:
$ref: "#/components/schemas/RacingRaceTypeEnum"
- $ref: "#/components/parameters/ApiTimestamp"
- $ref: "#/components/parameters/ApiComment"
- $ref: "#/components/parameters/ApiKeyPublic"
Responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/RacingRacesResponse"
Security:
- api_key: []
x-stability: Stable
```
--------------------------------
### Torn API: Faction Applications
Source: https://www.torn.com/swagger/openapi
Retrieves a list of applications for your faction. Requires a minimal access key with faction API access permissions. Supports filtering and sorting.
```APIDOC
GET /faction/applications
summary: Get your faction's applications
description: Requires minimal access key with faction API access permissions.
operationId: 9f7dccb023d81a8da7f5f6a359658a64
parameters:
- $ref: "#/components/parameters/ApiTimestamp"
- $ref: "#/components/parameters/ApiComment"
- $ref: "#/components/parameters/ApiKeyMinimal"
responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/FactionApplicationsResponse"
security:
- api_key: []
x-stability: Stable
```
--------------------------------
### Market Rentals API
Source: https://www.torn.com/swagger/openapi
Retrieves market rental data. Requires a public access key. Supports pagination and sorting.
```APIDOC
GET /market/rentals
Tags: Market
OperationId: 22a00095ad734485b6dacdc12c1f62ff
Security: api_key
x-stability: Unstable
Parameters:
- $ref: #/components/parameters/ApiOffset
- $ref: #/components/parameters/ApiLimit100Default20
- $ref: #/components/parameters/ApiSort
- $ref: #/components/parameters/ApiTimestamp
- $ref: #/components/parameters/ApiComment
- $ref: #/components/parameters/ApiKeyPublic
Responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: #/components/schemas/MarketRentalsResponse
```
--------------------------------
### Get User Races
Source: https://www.torn.com/swagger/openapi
Retrieves a list of user races, ordered by their start timestamp. Requires a minimal access key. Supports filtering by race category and pagination.
```APIDOC
GET /user/races
Summary: Get user races
Description: Requires minimal access key. Returns a list of user races, ordered by race start timestamp.
Parameters:
- ApiLimit100Default20: Limit for the number of results.
- ApiSort: Specifies the sorting order.
- ApiFrom: The starting timestamp for the query.
- ApiTo: The ending timestamp for the query.
- cat (query, optional): Category of races returned. Schema: RacingRaceTypeEnum.
- ApiTimestamp: Timestamp for the query.
- ApiComment: Adds a comment to the request.
- ApiKeyMinimal: Minimal access key required.
Responses:
- 200: Successful operation. Schema: UserRacesResponse.
Security:
- api_key: Requires an API key.
```
--------------------------------
### Faction Wars Overview Schema
Source: https://www.torn.com/swagger/openapi
Provides an overview of all faction wars, including ranked wars, raids, and territory wars.
```APIDOC
FactionWars:
required:
- ranked
- raids
- territory
properties:
ranked:
oneOf:
- $ref: "#/components/schemas/FactionRankedWar"
- type: null
raids:
type: array
items:
$ref: "#/components/schemas/FactionRaidWar"
territory:
type: array
items:
$ref: "#/components/schemas/FactionTerritoryWar"
type: object
```
--------------------------------
### Torn Attack Structure
Source: https://www.torn.com/swagger/openapi
Represents the core structure of an attack, including its ID, a code, and the start time.
```APIDOC
Attack:
required:
- id
- code
- started
```
--------------------------------
### Torn API: Get Server Time
Source: https://www.torn.com/swagger/openapi
Retrieves the current server time. This endpoint is part of the Forum API.
```APIDOC
GET /forum/timestamp
Tags:
- Forum
Summary:
Get current server time
```
--------------------------------
### Revives API
Source: https://www.torn.com/swagger/openapi
Provides information related to revives, likely for game-related operations. Requires a limited API key.
```APIDOC
Responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/RevivesFullResponse"
Security:
- api_key: []
x-stability: Stable
Parameters:
- $ref: "#/components/parameters/ApiFrom"
- $ref: "#/components/parameters/ApiStripTagsTrue"
- $ref: "#/components/parameters/ApiTimestamp"
- $ref: "#/components/parameters/ApiComment"
- $ref: "#/components/parameters/ApiKeyLimited"
```
--------------------------------
### Torn API Faction Revives Endpoints
Source: https://www.torn.com/swagger/openapi
Provides endpoints to retrieve faction revive data. The 'revives' endpoint offers detailed information, while 'revivesFull' provides a simplified view. Both require specific API key permissions and support filtering, pagination, and sorting.
```APIDOC
/faction/revives
get:
tags:
- Faction
summary: Get your faction's detailed revives
description: Requires limited access key with faction API access permissions.
operationId: 486fcda26ed1aa6aba8ec7091080723b
parameters:
- $ref: "#/components/parameters/ApiFiltersIncomingOutgoing"
- $ref: "#/components/parameters/ApiLimit100"
- $ref: "#/components/parameters/ApiSortDesc"
- $ref: "#/components/parameters/ApiTo"
- $ref: "#/components/parameters/ApiFrom"
- $ref: "#/components/parameters/ApiStripTagsTrue"
- $ref: "#/components/parameters/ApiTimestamp"
- $ref: "#/components/parameters/ApiComment"
- $ref: "#/components/parameters/ApiKeyLimited"
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/RevivesResponse"
security:
- api_key: []
x-stability: Stable
/faction/revivesFull
get:
tags:
- Faction
summary: Get your faction's simplified revives
description: Requires limited access key with faction API access permissions.
operationId: f17a4064779e8de5200238816c233c02
parameters:
- $ref: "#/components/parameters/ApiFiltersIncomingOutgoing"
- $ref: "#/components/parameters/ApiLimit1000"
- $ref: "#/components/parameters/ApiSortDesc"
- $ref: "#/components/parameters/ApiTo"
- $ref: "#/components/parameters/ApiFrom"
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/RevivesResponse"
security:
- api_key: []
```
--------------------------------
### Torn API: Get Faction Chain
Source: https://www.torn.com/swagger/openapi
Retrieves the current ongoing chain for a specific faction. This endpoint requires a public access key.
```APIDOC
GET /faction/{id}/chain
Tags: Faction
Summary: Get a faction's current chain
Description: Requires public access key.
Parameters:
- id (path, required): Faction id (FactionId)
- ApiTimestamp (query): Timestamp for the request
- ApiComment (query): Comment for the request
- ApiKeyPublic (query): Public access key
Responses:
- 200: Successful operation (FactionOngoingChainResponse)
```
--------------------------------
### Torn API Endpoints
Source: https://www.torn.com/swagger/openapi
Lists available endpoints for accessing various game data in Torn. These include sections like battlestats, bounties, crimes, personal stats, item market, and user profiles.
```APIDOC
Available Endpoints:
- battlestats
- bounties
- calendar
- crimes
- enlistedcars
- factionbalance
- forumfeed
- forumfriends
- forumposts
- forumsubscribedthreads
- forumthreads
- hof
- itemmarket
- jobpoints
- jobranks
- list
- lookup
- money
- organizedcrime
- personalstats
- properties
- property
- races
- racingrecords
- reports
- revives
- revivesfull
- skills
- timestamp
- workstats
- ammo
- bars
- bazaar
- cooldowns
- criminalrecord
- discord
- display
- education
- equipment
- events
- gym
- honors
- icons
- inventory
- log
- medals
- merits
- messages
- missions
- networth
- newevents
- newmessages
- notifications
- perks
- profile
- refills
- stocks
- travel
- weaponexp
```
--------------------------------
### Torn API: Get Racing Cars
Source: https://www.torn.com/swagger/openapi
Retrieves details about racing cars. Requires a public access key and includes parameters for timestamp and comments.
```APIDOC
GET /racing/cars
Summary: Get racing cars
Description: Requires public access key. Returns the details about racing cars.
OperationId: c9e76cf48aa3c4bac4c8b33f1c0c9a17
Parameters:
- $ref: "#/components/parameters/ApiTimestamp"
- $ref: "#/components/parameters/ApiComment"
- $ref: "#/components/parameters/ApiKeyPublic"
Responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/RacingCarsResponse"
Security:
- api_key: []
x-stability: Stable
```
--------------------------------
### Market Lookup API
Source: https://www.torn.com/swagger/openapi
Retrieves all available market selections. Requires a public access key.
```APIDOC
GET /market/lookup
Tags: Market
OperationId: 22a00095ad734485b6dacdc12c1f62ff
Security: api_key
x-stability: Stable
Description: Requires public access key.
Parameters:
- $ref: #/components/parameters/ApiTimestamp
- $ref: #/components/parameters/ApiComment
- $ref: #/components/parameters/ApiKeyPublic
Responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: #/components/schemas/MarketLookupResponse
```
--------------------------------
### Get Race Tracks - Torn API
Source: https://www.torn.com/swagger/openapi
Retrieves a list of all available racing tracks and their descriptions. This endpoint requires a public access key for access.
```APIDOC
GET /racing/tracks
---
**Description:** Requires public access key. Returns the details about racing tracks.
**Operation ID:** 6e4507cc442d6f099d0170b78a35bf8d
**Parameters:**
- `ApiTimestamp` (parameter): Timestamp parameter.
- `ApiComment` (parameter): Comment parameter.
- `ApiKeyPublic` (parameter): Public access key parameter.
**Responses:**
- `200` (Successful operation): Content type `application/json`. Schema: `#/components/schemas/RacingTracksResponse`
**Security:**
- `api_key`: Requires API key.
```
--------------------------------
### Torn API: Get Specific Race Details
Source: https://www.torn.com/swagger/openapi
Retrieves detailed information for a specific race identified by its ID. This endpoint is part of the Racing tag.
```APIDOC
GET /racing/{raceId}/race
Summary: Get specific race details
Tags:
- Racing
```
--------------------------------
### Torn API: Faction Balance
Source: https://www.torn.com/swagger/openapi
Retrieves balance details for a faction and its members. Requires a limited access key with faction API access permissions. Includes timestamp and comment parameters.
```APIDOC
GET /faction/balance
Summary: Get your faction's & member's balance details
Description: Requires limited access key with faction API access permissions.
Parameters:
- $ref: "#/components/parameters/ApiTimestamp"
- $ref: "#/components/parameters/ApiComment"
- $ref: "#/components/parameters/ApiKeyLimited"
Responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/FactionBalanceResponse"
Security:
- api_key: []
x-stability: Stable
```
--------------------------------
### Torn API: Get Item Specialized Bazaar Directory
Source: https://www.torn.com/swagger/openapi
Retrieves the specialized bazaar directory for a specific item. Requires a public access key.
```APIDOC
GET /market/{id}/bazaar
Tags: Market
Summary: Get item specialized bazaar directory
Description: Requires public access key.
Parameters:
- id (path, required): Item id. Schema: #/components/schemas/ItemId
- ApiTimestamp (query, optional): Reference to ApiTimestamp parameter.
- ApiComment (query, optional): Reference to ApiComment parameter.
- ApiKeyPublic (query, optional): Reference to ApiKeyPublic parameter.
Responses:
- 200: Successful operation. Content: application/json. Schema: #/components/schemas/BazaarResponseSpecialized
Security:
- api_key: []
x-stability: Unstable
```
--------------------------------
### Torn API Schemas: Item Properties and Market Listings
Source: https://www.torn.com/swagger/openapi
Defines common schemas for items and market listings, including basic properties like ID, title, description, and value, as well as market-specific details like price and amount.
```APIDOC
ItemMarketListingItem:
properties:
id:
type: integer
format: int32
title:
type: string
description:
type: string
value:
type: integer
format: int32
type: object
ItemMarketListingStackable:
required:
- price
- amount
properties:
price:
type: integer
format: int64
amount:
type: integer
format: int32
type: object
ItemMarketItem:
required:
- id
- name
- type
- average_price
properties:
id:
$ref: "#/components/schemas/ItemId"
name:
type: string
type:
type: string
average_price:
type: integer
format: int64
type: object
ItemMarketListingNonstackable:
required:
- price
- amount
- item_details
```
--------------------------------
### Get User Properties
Source: https://www.torn.com/swagger/openapi
Retrieves properties for the authenticated user. Extended responses are available with higher access keys. Supports filtering, pagination, and timestamp.
```APIDOC
GET /user/properties
Summary: Get your own properties
Description: Requires public access key. Extended responses are available when requesting the data with Limited or higher access keys.
Parameters:
- ApiFiltersUserProperties (ref): Reference to user properties filters.
- ApiOffset (ref): Reference to API offset parameter.
- ApiLimit100Default20 (ref): Reference to API limit parameter (max 100, default 20).
- ApiTimestamp (ref): Reference to API timestamp parameter.
- ApiComment (ref): Reference to API comment parameter.
- ApiKeyPublic (ref): Reference to public API key parameter.
Responses:
200: Successful operation. Returns UserPropertiesResponse.
Security:
api_key: Requires an API key.
x-stability: Unstable
```
--------------------------------
### Torn API: Faction Attacks
Source: https://www.torn.com/swagger/openapi
Retrieves detailed information about your faction's attacks, both incoming and outgoing. Requires a limited access key with faction API access permissions. Supports filtering, sorting, and pagination.
```APIDOC
GET /faction/attacks
summary: Get your faction's detailed attacks
description: Requires limited access key with faction API access permissions.
operationId: cb5b38ba64c389e706526df8bc8af9b6
parameters:
- $ref: "#/components/parameters/ApiFiltersIncomingOutgoing"
- $ref: "#/components/parameters/ApiLimit100"
- $ref: "#/components/parameters/ApiSortDesc"
- $ref: "#/components/parameters/ApiTo"
- $ref: "#/components/parameters/ApiFrom"
- $ref: "#/components/parameters/ApiTimestamp"
- $ref: "#/components/parameters/ApiComment"
- $ref: "#/components/parameters/ApiKeyLimited"
responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/FactionAttacksResponse"
security:
- api_key: []
x-stability: Stable
```
--------------------------------
### Torn API - Get Selection
Source: https://www.torn.com/swagger/openapi
Retrieves data for Torn selections. Requires a public access key. Supports filtering by selections, IDs, categories, and pagination.
```APIDOC
GET /torn
Summary: Get any Torn selection
Description: Requires public access key.
Choose one or more selections (comma separated).
OperationId: 1846c4cf1e6878553e36571dc9cac29f
Parameters:
- name: selections
in: query
description: Selection names
required: false
schema:
type: array
items:
$ref: "#/components/schemas/TornSelectionName"
- name: id
in: query
description: selection id
required: false
schema:
oneOf:
- $ref: "#/components/schemas/LogCategoryId"
- $ref: "#/components/schemas/TornCrimeId"
- type: array
items:
$ref: "#/components/schemas/ItemId"
- type: array
items:
$ref: "#/components/schemas/FactionTerritoryEnum"
- $ref: "#/components/parameters/ApiStripTags"
- $ref: "#/components/parameters/ApiLimit"
- $ref: "#/components/parameters/ApiTo"
- $ref: "#/components/parameters/ApiFrom"
- $ref: "#/components/parameters/ApiSort"
- name: cat
in: query
description: Selection category
required: false
schema:
oneOf:
- $ref: "#/components/schemas/TornFactionHofCategory"
- $ref: "#/components/schemas/TornHofCategory"
- $ref: "#/components/schemas/TornItemCategory"
- $ref: "#/components/parameters/ApiOffsetNoDefault"
- $ref: "#/components/parameters/ApiTimestamp"
- $ref: "#/components/parameters/ApiComment"
- $ref: "#/components/parameters/ApiKeyPublic"
Responses:
200:
description: Successful operation
content:
application/json:
schema:
anyOf:
- $ref: "#/components/schemas/TornSubcrimesResponse"
- $ref: "#/components/schemas/TornCrimesResponse"
- $ref: "#/components/schemas/TornCalendarResponse"
```
--------------------------------
### User Skills API
Source: https://www.torn.com/swagger/openapi
Retrieves the user's skills. Requires a minimal access key. Returns a UserSkillsResponse.
```APIDOC
GET /user/skills
summary: Get your skills
description: Requires minimal access key.
operationId: 242cd6844d92aec0223d9c5c88e66403
parameters:
- $ref: "#/components/parameters/ApiTimestamp"
- $ref: "#/components/parameters/ApiComment"
- $ref: "#/components/parameters/ApiKeyPublic"
responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/UserSkillsResponse"
security:
- api_key: []
x-stability: Unstable
```
--------------------------------
### API Query Parameters: Pagination and HTML Stripping
Source: https://www.torn.com/swagger/openapi
Details query parameters for API pagination using an offset and for controlling the inclusion of HTML tags in response fields. Supports default offset and explicit true/false values for tag stripping.
```APIDOC
ApiTarget:
name: target
in: query
required: false
schema:
type: integer
format: int32
minimum: 1
ApiOffset:
name: offset
in: query
required: false
schema:
type: integer
format: int32
default: 0
minimum: 0
ApiOffsetNoDefault:
name: offset
in: query
required: false
schema:
type: integer
format: int32
minimum: 0
ApiStripTagsTrue:
name: striptags
in: query
description: Determines if fields include HTML or not ('Hospitalized by user' vs 'Hospitalized by user').
required: false
schema:
type: string
default: "true"
enum:
- "true"
- "false"
ApiStripTagsFalse:
name: striptags
in: query
description: Determines if fields include HTML or not ('Hospitalized by user' vs 'Hospitalized by user').
required: false
schema:
type: string
default: "false"
enum:
- "true"
- "false"
ApiStripTags:
name: striptags
in: query
description: Determines if fields include HTML or not ('Hospitalized by user' vs 'Hospitalized by user').
required: false
schema:
type: string
enum:
- "true"
- "false"
```
--------------------------------
### Torn API: Get Bazaar Directory
Source: https://www.torn.com/swagger/openapi
Retrieves the bazaar directory. The response type depends on the 'cat' query parameter. Requires a public access key.
```APIDOC
GET /market/bazaar
Tags: Market
Summary: Get bazaar directory
Description: Requires public access key. The default response is of type 'BazaarWeekly', but if a category is chosen, the response will be of type 'BazaarSpecialized'.
Parameters:
- cat (query, optional): Category of specialized bazaars returned. Schema: #/components/schemas/MarketSpecializedBazaarCategoryEnum
- ApiTimestamp (query, optional): Reference to ApiTimestamp parameter.
- ApiComment (query, optional): Reference to ApiComment parameter.
- ApiKeyPublic (query, optional): Reference to ApiKeyPublic parameter.
Responses:
- 200: Successful operation. Content: application/json. Schema: #/components/schemas/BazaarResponse
Security:
- api_key: []
x-stability: Unstable
```
--------------------------------
### Torn API Schemas
Source: https://www.torn.com/swagger/openapi
Defines the structure for various API responses including attack logs, bounties, and item details. Includes schemas for user IDs, item IDs, and metadata.
```APIDOC
AttackLog:
log: Array[AttackLog]
summary: Array[AttackLogSummary]
AttackLogSummary:
# Schema details for AttackLogSummary
RequestMetadataWithLinks:
# Schema details for RequestMetadataWithLinks
AttackLogResponse:
attacklog:
log: Array[AttackLog]
summary: Array[AttackLogSummary]
_metadata: RequestMetadataWithLinks
TornBountiesResponse:
bounties: Array[Bounty]
_metadata: RequestMetadataWithLinks
Bounty:
# Schema details for Bounty
TornItemAmmo:
id: AmmoId
name: String
price: Integer (int64)
types: Array[TornItemAmmoTypeEnum] # Types of ammo
AmmoId:
# Schema details for AmmoId
TornItemAmmoTypeEnum:
# Schema details for TornItemAmmoTypeEnum
UserId:
# Schema details for UserId
ItemId:
# Schema details for ItemId
AttackLog:
attacker:
id: UserId
name: String
defender:
id: UserId
name: String
attacker_item:
id: ItemId
name: String
# Other properties for AttackLog...
```
--------------------------------
### Get Forum Threads
Source: https://www.torn.com/swagger/openapi
Retrieves a list of threads across all forum categories. Supports filtering by date range and sorting. Requires a public access key.
```APIDOC
GET /forum/threads
Parameters:
- ApiLimit100 (query): The maximum number of threads to return (default 100).
- ApiSort (query): The sorting order for threads.
- ApiFrom (query): Filter threads from a specific timestamp.
- ApiTo (query): Filter threads up to a specific timestamp.
- ApiTimestamp (query): The timestamp for the request.
Responses:
- 200: Successful operation. Returns a list of forum threads.
Security:
- api_key: Requires a public API key.
```
--------------------------------
### Torn API: Get Your Faction Chain
Source: https://www.torn.com/swagger/openapi
Retrieves the current ongoing chain for the authenticated user's faction. This endpoint requires a public access key.
```APIDOC
GET /faction/chain
Tags: Faction
Summary: Get your faction's current chain
Description: Requires public access key.
Parameters:
- ApiTimestamp (query): Timestamp for the request
- ApiComment (query): Comment for the request
- ApiKeyPublic (query): Public access key
Responses:
- 200: Successful operation (FactionOngoingChainResponse)
```
--------------------------------
### Faction Raid War Schemas
Source: https://www.torn.com/swagger/openapi
Defines the structure for Faction Raid Wars, including war ID, start and end times, and participating factions with their raid-specific details.
```APIDOC
FactionRaidWar:
required:
- war_id
- start
- end
- factions
properties:
war_id:
type: integer
format: int32
start:
type: integer
format: int32
end:
oneOf:
- type: integer
format: int32
- type: null
factions:
description: The factions involved in the raid war.
type: array
items:
$ref: "#/components/schemas/FactionRaidWarParticipant"
```
--------------------------------
### Torn API: Faction Basic Details
Source: https://www.torn.com/swagger/openapi
Retrieves basic details for a faction. Requires a public access key. The 'is_enlisted' field is populated if faction API permissions are available, otherwise it's null.
```APIDOC
GET /faction/basic
Summary: Get your faction's basic details
Description: Requires public access key.
The 'is_enlisted' value will be populated if you have API faction permissions (with custom, limited or full access keys), otherwise it will be set as null.
Parameters:
- $ref: "#/components/parameters/ApiTimestamp"
- $ref: "#/components/parameters/ApiComment"
- $ref: "#/components/parameters/ApiKeyPublic"
Responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/FactionBasicResponse"
Security:
- api_key: []
```
--------------------------------
### Faction Territory War Schema
Source: https://www.torn.com/swagger/openapi
Defines the structure for a faction's participation in a territory war, including start and end times, score targets, and involved factions.
```APIDOC
FactionTerritoryWar:
properties:
start:
type: integer
format: int32
end:
oneOf:
- type: integer
format: int32
- type: null
target:
description: The score target of the war.
type: integer
format: int32
winner:
oneOf:
- $ref: "#/components/schemas/FactionId"
- type: null
factions:
description: The factions involved in the territory war.
type: array
items:
$ref: "#/components/schemas/FactionTerritoryWarParticipant"
type: object
```
--------------------------------
### Torn Items API
Source: https://www.torn.com/swagger/openapi
Fetches general information about items. Supports filtering by category and sorting. Requires a public key. Details are not provided for the 'All' category.
```APIDOC
GET /torn/items
Summary: Get information about items
Description: Requires public key.
Default category is 'All'.
Details are not populated when requesting the category 'All'.
Parameters:
- name: cat
in: query
description: Item category type
required: false
schema:
$ref: "#/components/schemas/TornItemCategory"
- $ref: #/components/parameters/ApiSortAsc
- $ref: #/components/parameters/ApiTimestamp
- $ref: #/components/parameters/ApiComment
- $ref: #/components/parameters/ApiKeyPublic
Responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/TornItemsResponse"
```
--------------------------------
### Faction Ranked War Schemas
Source: https://www.torn.com/swagger/openapi
Defines the structure for Faction Ranked Wars, including war ID, start and end times, target score, and participating factions.
```APIDOC
FactionRankedWar:
required:
- war_id
- start
- end
- factions
properties:
war_id:
type: integer
format: int32
start:
type: integer
format: int32
end:
oneOf:
- type: integer
format: int32
- type: null
factions:
description: The factions involved in the ranked war.
type: array
items:
$ref: "#/components/schemas/FactionRankedWarParticipant"
```
--------------------------------
### Torn API Schemas: User Item Market and Faction Balance
Source: https://www.torn.com/swagger/openapi
Defines the structure for user item market listings and faction balance information, including money and points. It also includes response structures for these endpoints.
```APIDOC
UserItemMarketResponse:
required:
- itemmarket
- _metadata
properties:
itemmarket:
type: array
items:
$ref: "#/components/schemas/UserItemMarketListing"
_metadata:
$ref: "#/components/schemas/RequestMetadataWithLinks"
type: object
UserFactionBalance:
required:
- money
- points
properties:
money:
type: integer
format: int64
points:
type: integer
format: int64
type: object
UserFactionBalanceResponse:
required:
- factionBalance
properties:
factionBalance:
oneOf:
- $ref: "#/components/schemas/UserFactionBalance"
- type: null
type: object
```
--------------------------------
### Torn API: Get Items
Source: https://www.torn.com/swagger/openapi
Retrieves item data from the Torn API. Requires a public API key for authentication. Returns a JSON object with item details.
```APIDOC
GET /torn/items
Tags:
- Torn
Summary:
Get available items
Description:
Requires public key.
OperationId:
2f68d7e04d218e26005be3eeca6de583
Parameters:
- $ref: "#/components/parameters/ApiTimestamp"
- $ref: "#/components/parameters/ApiComment"
- $ref: "#/components/parameters/ApiKeyPublic"
Responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/TornItemsResponse"
Security:
- api_key: []
x-stability: Stable
```
--------------------------------
### Torn API Schemas
Source: https://www.torn.com/swagger/openapi
Defines various data structures used in the Torn API, including Challenge, FactionTree, and SelectionName.
```APIDOC
Challenge:
oneOf:
- required:
- description
- amount_required
- stat
properties:
description:
type: string
amount_required:
type: integer
format: int64
stat:
$ref: "#/components/schemas/FactionStatEnum"
type: object
- type: null
TornFactionTree:
required:
- name
- branches
properties:
name:
type: string
branches:
type: array
items:
$ref: "#/components/schemas/TornFactionTreeBranch"
type: object
TornFactionTreeResponse:
required:
- factionTree
properties:
factionTree:
type: array
items:
$ref: "#/components/schemas/TornFactionTree"
type: object
TornSelectionName:
oneOf:
- description: "The following selections will fallback to API v1 and may change at any time: 'bank','cards','cityshops','companies','competition','gyms','honors','itemdetails','itemstats','medals','organisedcrimes','pawnshop','pokertables','rockpaperscissors','searchforcash','shoplifting','stats','stocks'. * The following selections are not available in API v2: 'dirtybombs','raidreport','raids', 'chainreport', 'rackets', 'rankedwarreport', 'rankedwars', 'territorynames', 'territorywarreport', 'territorywars'."
type: string
enum:
- attacklog
- bounties
- calendar
- crimes
- education
- factionhof
- factiontree
- hof
- itemammo
- itemmods
- items
- logcategories
- logtypes
- lookup
- organizedcrimes
- properties
- subcrimes
- territory
- timestamp
- bank
- cards
- cityshops
- companies
- competition
- gyms
- honors
- itemdetails
- itemstats
- medals
- organisedcrimes
- pawnshop
- pokertables
- rockpaperscissors
- searchforcash
- shoplifting
- stats
- stocks
```
--------------------------------
### Get Specific Forum Thread Details
Source: https://www.torn.com/swagger/openapi
Retrieves detailed information about a specific forum thread, including its content and any associated poll. Requires a public access key.
```APIDOC
GET /forum/{threadId}/thread
Parameters:
- threadId (path, required): The ID of the thread.
- ApiTimestamp (query): The timestamp for the request.
- ApiComment (query): A comment for the request.
- ApiKeyPublic (query): Your public API key.
Responses:
- 200: Successful operation. Returns the forum thread details.
Security:
- api_key: Requires a public API key.
```
--------------------------------
### Torn API Authentication
Source: https://www.torn.com/swagger/openapi
Details on how to authenticate with the Torn API using an API key. The API key should be passed in the Authorization header.
```APIDOC
Authorization: ApiKey
Description: Pass your API key as the value. The 'ApiKey' prefix is automatically added in Swagger.
```