API Documentation - EpicKitten/PUBG-Resources GitHub Wiki
Getting Started
All request to the API are formed as Get requests and require 2 headers:
- Authorization - The word "Bearer", a space, and then your API key
(i.e "Bearer gu7yp34etgh7982tbiuogbi83.ty778o234fg4r3f342.y78923rbyu8f24yu79")
NOTE: This is a example key and will not work
- Accept - What the server should return to you (i.e "application/vnd.api+json" or "application/json")
/matches/
Endpoint
Getting data from the The /matches/
endpoint gives you the ability to look up single matches in a Platform-Region shard
The match we want to look up has the MatchID ce7c2730-928d-45c3-a8da-76f2ada8a7d0
Request:
https://api.playbattlegrounds.com/shards/pc-na/matches/ce7c2730-928d-45c3-a8da-76f2ada8a7d0
Response:
The response is quite large so here's a link to it
/players/
Endpoint
Getting data from the The /players/
endpoint gives you the ability to look up a single player or multiple players in a Platform-Region shard
Example of requests and response for a single player
The player we're searching for is named epickitten
The AccountID of epickitten is account.3654e255b77b409e87b10dcb086ab00d
Epickitten usually plays matches in the pc-na Platform-Region
Request:
https://api.playbattlegrounds.com/shards/pc-na/players?filter[playerNames]=epickitten
or
https://api.playbattlegrounds.com/shards/pc-na/players?filter[playerIds]=account.3654e255b77b409e87b10dcb086ab00d
or
https://api.playbattlegrounds.com/shards/pc-na/players/account.3654e255b77b409e87b10dcb086ab00d
Response:
{
"data": [
{
"type": "player",
"id": "account.3654e255b77b409e87b10dcb086ab00d",
"attributes": {
"createdAt": "2018-04-01T08:18:32Z",
"name": "epickitten",
"patchVersion": "",
"shardId": "pc-na",
"stats": null,
"titleId": "bluehole-pubg",
"updatedAt": "2018-04-03T07:25:20Z"
},
"relationships": {
"assets": {
"data": []
},
"matches": {
"data": [
{
"type": "match",
"id": "a77b79af-8481-4fcb-927a-971acdf411b6"
},
{
"type": "match",
"id": "96a071c7-46bf-452b-8f92-eed22039c4a1"
},
{
"type": "match",
"id": "6be84a2d-ece1-4afc-9080-77352a543d14"
},
{
"type": "match",
"id": "bd6aae34-be05-4094-981c-083285c7e861"
},
{
"type": "match",
"id": "276f5bcb-a831-4e8c-a610-d2073692069e"
},
{
"type": "match",
"id": "f7c6791d-279f-4e60-8f70-b73b3f3b210e"
},
{
"type": "match",
"id": "35a12729-a76c-4612-97cb-d9813879514d"
},
{
"type": "match",
"id": "7c232704-e4ef-469f-ae09-608106f868aa"
},
{
"type": "match",
"id": "48ce1f08-e9cb-4a17-871f-6c5a7203ac35"
},
{
"type": "match",
"id": "5bee078e-6d11-44e4-9df9-d5e8c2fee9fa"
},
{
"type": "match",
"id": "0ef63415-7a46-4abe-a251-eadbb4d5579f"
},
{
"type": "match",
"id": "c1e079ed-4d9d-4b78-9b9c-a838760ebbca"
}
]
}
},
"links": {
"schema": "",
"self": "https://api.playbattlegrounds.com/shards/pc-na/players/account.3654e255b77b409e87b10dcb086ab00d"
}
}
],
"links": {
"self": "https://api.playbattlegrounds.com/shards/pc-na/players?filter[playerNames]=epickitten"
},
"meta": {}
}
Example of requests and response for multipe players
The players were searching for are named epickitten and Porkchop_theBoar
The players AccountId's are account.3654e255b77b409e87b10dcb086ab00d and account.0d2c7194367f4737985f80c6e90ea359 respectfully
Epickitten and Porkchop_theBoar usually play matches in the pc-na Platform-Region
Request:
https://api.playbattlegrounds.com/shards/pc-na/players?filter[playerNames]=epickitten,Porkchop_theBoar
or
https://api.playbattlegrounds.com/shards/pc-na/players?filter[playerIds]=account.3654e255b77b409e87b10dcb086ab00d,account.0d2c7194367f4737985f80c6e90ea359
Response:
{
"data": [
{
"type": "player",
"id": "account.0d2c7194367f4737985f80c6e90ea359",
"attributes": {
"createdAt": "2018-04-02T07:40:50Z",
"name": "Porkchop_theBoar",
"patchVersion": "",
"shardId": "pc-na",
"stats": null,
"titleId": "bluehole-pubg",
"updatedAt": "2018-04-04T08:29:21Z"
},
"relationships": {
"assets": {
"data": []
},
"matches": {
"data": [
{
"type": "match",
"id": "ce7c2730-928d-45c3-a8da-76f2ada8a7d0"
},
{
"type": "match",
"id": "015e34d2-9186-43dd-9d9d-fb1a767bc315"
},
{
"type": "match",
"id": "045769fc-61b6-4ae9-a17c-83ca90fa2033"
},
{
"type": "match",
"id": "e23ed38b-64ef-4ff4-b9da-1bd22c7901d1"
},
{
"type": "match",
"id": "cb3b125a-cedf-402c-970f-bce05669e7a8"
},
{
"type": "match",
"id": "539cc879-5080-4005-952f-3b652b76d165"
},
{
"type": "match",
"id": "10b83f5b-807b-4034-b010-0985f01f753c"
},
{
"type": "match",
"id": "09725c8c-43bd-4f00-a0fa-17ee3b2af216"
},
{
"type": "match",
"id": "9375c72c-84c2-48f8-bdfb-a91984ce67f6"
},
{
"type": "match",
"id": "8e9b316f-cd98-4c35-b008-a45cb4b38ff0"
},
{
"type": "match",
"id": "a01803ce-3ff1-489a-8dc1-14a5d9aba5ce"
},
{
"type": "match",
"id": "fa00ed34-b7f5-422d-b9e2-84ba8f933772"
},
{
"type": "match",
"id": "0fb7f2e8-793e-443b-a428-0b340ad136db"
},
{
"type": "match",
"id": "b03693ee-e32c-4032-8c57-7e85cb2b90ca"
}
]
}
},
"links": {
"schema": "",
"self": "https://api.playbattlegrounds.com/shards/pc-na/players/account.0d2c7194367f4737985f80c6e90ea359"
}
},
{
"type": "player",
"id": "account.3654e255b77b409e87b10dcb086ab00d",
"attributes": {
"createdAt": "2018-04-01T08:18:32Z",
"name": "epickitten",
"patchVersion": "",
"shardId": "pc-na",
"stats": null,
"titleId": "bluehole-pubg",
"updatedAt": "2018-04-04T08:29:21Z"
},
"relationships": {
"assets": {
"data": []
},
"matches": {
"data": [
{
"type": "match",
"id": "ce7c2730-928d-45c3-a8da-76f2ada8a7d0"
},
{
"type": "match",
"id": "015e34d2-9186-43dd-9d9d-fb1a767bc315"
},
{
"type": "match",
"id": "a77b79af-8481-4fcb-927a-971acdf411b6"
},
{
"type": "match",
"id": "96a071c7-46bf-452b-8f92-eed22039c4a1"
},
{
"type": "match",
"id": "6be84a2d-ece1-4afc-9080-77352a543d14"
},
{
"type": "match",
"id": "bd6aae34-be05-4094-981c-083285c7e861"
},
{
"type": "match",
"id": "276f5bcb-a831-4e8c-a610-d2073692069e"
},
{
"type": "match",
"id": "f7c6791d-279f-4e60-8f70-b73b3f3b210e"
},
{
"type": "match",
"id": "35a12729-a76c-4612-97cb-d9813879514d"
},
{
"type": "match",
"id": "7c232704-e4ef-469f-ae09-608106f868aa"
},
{
"type": "match",
"id": "48ce1f08-e9cb-4a17-871f-6c5a7203ac35"
},
{
"type": "match",
"id": "5bee078e-6d11-44e4-9df9-d5e8c2fee9fa"
},
{
"type": "match",
"id": "0ef63415-7a46-4abe-a251-eadbb4d5579f"
},
{
"type": "match",
"id": "c1e079ed-4d9d-4b78-9b9c-a838760ebbca"
}
]
}
},
"links": {
"schema": "",
"self": "https://api.playbattlegrounds.com/shards/pc-na/players/account.3654e255b77b409e87b10dcb086ab00d"
}
}
],
"links": {
"self": "https://api.playbattlegrounds.com/shards/pc-na/players?filter[playerIds]=account.3654e255b77b409e87b10dcb086ab00d,account.0d2c7194367f4737985f80c6e90ea359"
},
"meta": {}
}
/status/
Endpoint
Getting data from the The /status/
endpoint doesn't require a API key
Request:
https://api.playbattlegrounds.com/status
Response:
{
"data": {
"type": "status",
"id": "pubg-api",
"attributes": {
"releasedAt": "2018-04-01T18:00:20Z",
"version": "v8.1.2"
}
}
}