Introduction
This documentation aims to provide all the information you need to work with our API.
<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>
Authenticating requests
This API is not authenticated.
Cards
/sets/{code}/cards
Get a paginated list of all cards in a set.
Returns a paginated list of card objects for a specific set.
Example request:
curl --request GET \
--get "https://tcgpdex.com/api/v1/sets/a1/cards?limit=20&offset=0" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://tcgpdex.com/api/v1/sets/a1/cards"
);
const params = {
"limit": "20",
"offset": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://tcgpdex.com/api/v1/sets/a1/cards';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'limit' => '20',
'offset' => '0',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://tcgpdex.com/api/v1/sets/a1/cards'
params = {
'limit': '20',
'offset': '0',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()Example response (200):
{
"data": [
{
"id": 1,
"name": "Pikachu",
"set_number": "001",
"url": "http://example.com/api/sets/a1/cards/001",
"last_updated": "2024-01-01 12:00:00"
}
],
"pagination": {
"total": 60,
"limit": 20,
"offset": 0,
"has_more": true
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
/sets/{code}/cards/{setNumber}
Display a specific card by set code and set number
Example request:
curl --request GET \
--get "https://tcgpdex.com/api/v1/sets/a1/cards/001" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://tcgpdex.com/api/v1/sets/a1/cards/001"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://tcgpdex.com/api/v1/sets/a1/cards/001';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://tcgpdex.com/api/v1/sets/a1/cards/001'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"id": 1,
"set": {
"id": 1,
"name": "Genetic Apex",
"code": "a1",
"url": "https://tcgpdex.com/api/v1/sets/a1"
},
"packs": [
{
"id": 1,
"name": "Mewtwo",
"code": "mewtwo",
"url": "https://tcgpdex.com/api/v1/sets/a1/packs/mewtwo"
}
],
"set_number": "001",
"name": "Bulbasaur",
"names": {
"en": "Bulbasaur",
"fr": "Bulbizarre"
},
"category": "Pokémon",
"sub_category": "Basic",
"illustrator": "Narumi Sato",
"rarity": {
"id": 1,
"name": "Common",
"symbol": "◊"
},
"updated_at": "2026-01-12 17:01:28",
"description": "There is a plant seed on its back right from the day this Pokémon is born. The seed slowly grows larger.",
"descriptions": {
"en": "There is a plant seed on its back right from the day this Pokémon is born. The seed slowly grows larger.",
"fr": "Il y a une graine sur son dos depuis sa naissance.\nElle grossit un peu chaque jour."
},
"hp": 70,
"classification": "Seed Pokémon",
"retreat_cost": 1,
"type": {
"id": 1,
"name": "Grass",
"url": "https://tcgpdex.com/api/types/1"
},
"weakness": {
"id": 2,
"name": "Fire",
"url": "https://tcgpdex.com/api/types/2"
},
"moves": [
{
"name": "Vine Whip",
"description": null,
"url": "https://tcgpdex.com/api/v1/sets/a1/cards/001/moves",
"damage": "40",
"costs": [
{
"id": 1,
"amount": 1,
"url": "https://tcgpdex.com/api/v1/types/1"
},
{
"id": 10,
"amount": 1,
"url": "https://tcgpdex.com/api/v1/types/10"
}
]
}
],
"ability": null,
"weight_lbs": "15.20",
"height": {
"ft": 2,
"in": 4
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
/sets/{code}/cards/{setNumber}/ability
Get the ability details of a specific card by set code and set number
Example request:
curl --request GET \
--get "https://tcgpdex.com/api/v1/sets/a1/cards/001/ability" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://tcgpdex.com/api/v1/sets/a1/cards/001/ability"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://tcgpdex.com/api/v1/sets/a1/cards/001/ability';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://tcgpdex.com/api/v1/sets/a1/cards/001/ability'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"data": {
"name": "Static",
"names": {
"en": "Static"
},
"description": "Paralyzes attacking Pokémon on contact.",
"descriptions": {
"en": "Paralyzes attacking Pokémon on contact."
}
}
}
Example response (404):
{
"message": "Ability not found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
/sets/{code}/cards/{setNumber}/moves
Get the move details of a specific card by set code and set number
Example request:
curl --request GET \
--get "https://tcgpdex.com/api/v1/sets/a1/cards/001/moves" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://tcgpdex.com/api/v1/sets/a1/cards/001/moves"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://tcgpdex.com/api/v1/sets/a1/cards/001/moves';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://tcgpdex.com/api/v1/sets/a1/cards/001/moves'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"data": [
{
"name": "Thunder Shock",
"names": {
"en": "Thunder Shock"
},
"description": "May paralyze opponent.",
"descriptions": {
"en": "May paralyze opponent."
},
"damage": "30",
"costs": [
{
"id": 1,
"amount": 1,
"url": "http://example.com/api/types/1"
},
{
"id": 3,
"amount": 2,
"url": "http://example.com/api/types/3"
}
]
}
]
}
Example response (404):
{
"message": "Moves not found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Categories
/categories
Get a list of all categories.
Returns a list of category objects.
Example request:
curl --request GET \
--get "https://tcgpdex.com/api/v1/categories" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://tcgpdex.com/api/v1/categories"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://tcgpdex.com/api/v1/categories';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://tcgpdex.com/api/v1/categories'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"data": [
{
"id": 1,
"name": "Pokémon"
},
{
"id": 2,
"name": "Trainer"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Pokedex
/pokedex/{id}
Get a list of cards by pokedex number
Example request:
curl --request GET \
--get "https://tcgpdex.com/api/v1/pokedex/25/cards?limit=20&offset=0" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://tcgpdex.com/api/v1/pokedex/25/cards"
);
const params = {
"limit": "20",
"offset": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://tcgpdex.com/api/v1/pokedex/25/cards';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'limit' => '20',
'offset' => '0',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://tcgpdex.com/api/v1/pokedex/25/cards'
params = {
'limit': '20',
'offset': '0',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()Example response (200):
{
"data": [
{
"id": 94,
"name": "Pikachu",
"set_number": "094",
"url": "https://tcgpdex.com/api/v1/sets/a1/cards/094",
"last_updated": "2026-01-12 17:01:33"
}
],
"pagination": {
"total": 16,
"limit": 50,
"offset": 0,
"has_more": false,
"previous_url": null,
"next_url": null
}
}
Example response (404):
{
"message": "Pokedex number not found."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Sets
/sets
Returns a list of TCG Pocket Sets.
Example request:
curl --request GET \
--get "https://tcgpdex.com/api/v1/sets?limit=20&offset=0" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://tcgpdex.com/api/v1/sets"
);
const params = {
"limit": "20",
"offset": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://tcgpdex.com/api/v1/sets';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'limit' => '20',
'offset' => '0',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://tcgpdex.com/api/v1/sets'
params = {
'limit': '20',
'offset': '0',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"data": [
{
"id": 1,
"name": "Genetic Apex",
"code": "a1",
"total_cards": 286,
"total_set_cards": 226,
"url": "https://tcgpdex.com/api/v1/sets/a1",
"release_date": "2024-10-30 07:00:00",
"last_updated": "2025-02-14 17:48:56"
},
{
"id": 2,
"name": "Promo-A",
"code": "p-a",
"total_cards": 117,
"total_set_cards": 117,
"url": "https://tcgpdex.com/api/v1/sets/p-a",
"release_date": "2024-10-30 07:00:00",
"last_updated": "2025-02-09 21:41:28"
},
{
"id": 3,
"name": "Mythical Island",
"code": "a1a",
"total_cards": 86,
"total_set_cards": 68,
"url": "https://tcgpdex.com/api/v1/sets/a1a",
"release_date": "2024-12-17 07:00:00",
"last_updated": "2025-02-14 17:49:20"
},
{
"id": 4,
"name": "Space-Time Smackdown",
"code": "a2",
"total_cards": 207,
"total_set_cards": 155,
"url": "https://tcgpdex.com/api/v1/sets/a2",
"release_date": "2025-01-30 07:00:00",
"last_updated": "2025-02-14 17:50:03"
},
{
"id": 5,
"name": "Triumphant Light",
"code": "a2a",
"total_cards": 96,
"total_set_cards": 75,
"url": "https://tcgpdex.com/api/v1/sets/a2a",
"release_date": "2025-02-28 06:00:00",
"last_updated": "2025-02-28 09:41:15"
},
{
"id": 6,
"name": "Shining Revelry",
"code": "a2b",
"total_cards": 111,
"total_set_cards": 72,
"url": "https://tcgpdex.com/api/v1/sets/a2b",
"release_date": "2025-03-27 06:00:00",
"last_updated": "2025-03-27 06:32:08"
},
{
"id": 7,
"name": "Celestial Guardians",
"code": "a3",
"total_cards": 239,
"total_set_cards": 155,
"url": "https://tcgpdex.com/api/v1/sets/a3",
"release_date": "2025-04-30 07:00:00",
"last_updated": "2025-04-30 11:23:25"
},
{
"id": 8,
"name": "Extradimensional Crisis",
"code": "a3a",
"total_cards": 103,
"total_set_cards": 69,
"url": "https://tcgpdex.com/api/v1/sets/a3a",
"release_date": "2025-05-29 07:00:00",
"last_updated": "2025-05-29 13:39:31"
},
{
"id": 9,
"name": "Eevee Grove",
"code": "a3b",
"total_cards": 107,
"total_set_cards": 69,
"url": "https://tcgpdex.com/api/v1/sets/a3b",
"release_date": "2025-06-26 07:00:00",
"last_updated": "2025-06-26 18:07:28"
},
{
"id": 10,
"name": "Wisdom of Sea and Sky",
"code": "a4",
"total_cards": 241,
"total_set_cards": 161,
"url": "https://tcgpdex.com/api/v1/sets/a4",
"release_date": "2025-07-30 07:00:00",
"last_updated": "2025-07-30 07:00:00"
},
{
"id": 11,
"name": "Secluded Spring",
"code": "a4a",
"total_cards": 105,
"total_set_cards": 71,
"url": "https://tcgpdex.com/api/v1/sets/a4a",
"release_date": "2025-08-28 07:00:00",
"last_updated": "2025-08-26 15:57:01"
},
{
"id": 12,
"name": "Deluxe Pack: ex",
"code": "a4b",
"total_cards": 379,
"total_set_cards": 353,
"url": "https://tcgpdex.com/api/v1/sets/a4b",
"release_date": "2025-09-30 07:00:00",
"last_updated": "2025-09-30 10:29:31"
},
{
"id": 13,
"name": "Mega Rising",
"code": "b1",
"total_cards": 331,
"total_set_cards": 226,
"url": "https://tcgpdex.com/api/v1/sets/b1",
"release_date": "2025-09-30 07:00:00",
"last_updated": "2025-11-02 13:08:11"
},
{
"id": 14,
"name": "Promo-B",
"code": "p-b",
"total_cards": 24,
"total_set_cards": 0,
"url": "https://tcgpdex.com/api/v1/sets/p-b",
"release_date": "2025-09-30 07:00:00",
"last_updated": "2025-11-02 13:08:11"
},
{
"id": 15,
"name": "Crimson Blaze",
"code": "b1a",
"total_cards": 103,
"total_set_cards": 69,
"url": "https://tcgpdex.com/api/v1/sets/b1a",
"release_date": "2025-12-17 00:00:00",
"last_updated": "2025-12-22 11:55:32"
}
],
"pagination": {
"total": 15,
"limit": 20,
"offset": 0,
"has_more": false,
"previous_url": null,
"next_url": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
/sets/{code}
Get details of a specific set
Example request:
curl --request GET \
--get "https://tcgpdex.com/api/v1/sets/a1, a1a" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://tcgpdex.com/api/v1/sets/a1, a1a"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://tcgpdex.com/api/v1/sets/a1, a1a';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://tcgpdex.com/api/v1/sets/a1, a1a'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (404):
{
"message": "Set not found"
}
Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Set not found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
/sets/{code}/packs
Get packs in a specific set
Example request:
curl --request GET \
--get "https://tcgpdex.com/api/v1/sets/a1/packs" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://tcgpdex.com/api/v1/sets/a1/packs"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://tcgpdex.com/api/v1/sets/a1/packs';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://tcgpdex.com/api/v1/sets/a1/packs'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"data": [
{
"id": 1,
"name": "Pikachu",
"code": "pikachu",
"total_cards": 10,
"last_updated": "2024-01-01 12:00:00"
}
]
}
Example response (404):
{
"message": "Set not found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
/sets/{code}/packs/{packCode}
Get details of a specific pack in a set
Example request:
curl --request GET \
--get "https://tcgpdex.com/api/v1/sets/a1/packs/pikachu" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://tcgpdex.com/api/v1/sets/a1/packs/pikachu"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://tcgpdex.com/api/v1/sets/a1/packs/pikachu';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://tcgpdex.com/api/v1/sets/a1/packs/pikachu'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"data": {
"id": 1,
"name": "Pikachu Pack",
"code": "pikachu",
"total_cards": 10,
"last_updated": "2024-01-01 12:00:00"
}
}
Example response (404):
{
"message": "Set not found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Types
/types
Get a paginated list of all types.
Returns a paginated list of type objects.
Example request:
curl --request GET \
--get "https://tcgpdex.com/api/v1/types?limit=20&offset=0" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://tcgpdex.com/api/v1/types"
);
const params = {
"limit": "20",
"offset": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://tcgpdex.com/api/v1/types';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'limit' => '20',
'offset' => '0',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://tcgpdex.com/api/v1/types'
params = {
'limit': '20',
'offset': '0',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()Example response (200):
{
"data": [
{
"id": 1,
"name": "Fire"
},
{
"id": 2,
"name": "Water"
}
],
"pagination": {
"total": 11,
"limit": 20,
"offset": 0,
"has_more": true
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
/types/{id}
Get details of a specific type
Example request:
curl --request GET \
--get "https://tcgpdex.com/api/v1/types/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://tcgpdex.com/api/v1/types/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://tcgpdex.com/api/v1/types/1';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://tcgpdex.com/api/v1/types/1'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"data": {
"id": 1,
"name": "Fire",
"code": "fire"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.