Skip to content

List machines

GET
/api/v2/machine/
const url = 'https://pokeapi.co/api/v2/machine/';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}

Machines are the representation of items that teach moves to Pokémon. They vary from version to version, so it is not certain that one specific TM or HM corresponds to a single Machine.

limit
integer

Number of results to return per page.

offset
integer

The initial index from which to return the results.

Media typeapplication/json
object
count
required

The total number of resources available from this API.

integer
next

The URL for the next page in the list, or null if there is no next page.

string | null format: uri
previous

The URL for the previous page in the list, or null if there is no previous page.

string | null format: uri
results
required

A list of API resources on this page.

Array<object>
object
url
required

The URL of the referenced resource.

string format: uri

Example

Terminal window
{
"count": 2508,
"next": "https://pokeapi.co/api/v2/machine/?offset=2&limit=2",
"previous": null,
"results": [
{
"url": "https://pokeapi.co/api/v2/machine/1/"
},
{
"url": "https://pokeapi.co/api/v2/machine/2/"
}
]
}