Skip to main content
The client.galaxy resource provides read access to the physical map of the Star Wars Combine galaxy. Every sub-resource — systems, planets, sectors, stations, and cities — returns a Page<T> and supports the standard start_index / item_count pagination parameters and for await...of auto-pagination. These endpoints are useful for building interactive maps, location lookups, and spatial analytics.
Some galaxy sub-resources (notably sectors) return a 404 if you omit pagination parameters entirely. Always pass explicit start_index and item_count values when calling these endpoints.

Star systems

galaxy.systems.list()

Returns a paginated list of all star systems in the galaxy.
start_index
number
default:"1"
1-based index of the first system to return.
item_count
number
default:"50"
Number of systems per page.
const systems = await client.galaxy.systems.list({
  start_index: 1,
  item_count: 50,
});

console.log(systems.total); // Total number of systems

for await (const system of systems) {
  console.log(system.name, system.uid);
}

Planets

galaxy.planets.list()

Returns a paginated list of all planets across all star systems.
start_index
number
default:"1"
1-based index of the first planet to return.
item_count
number
default:"50"
Number of planets per page.
const planets = await client.galaxy.planets.list({
  start_index: 1,
  item_count: 100,
});

for await (const planet of planets) {
  console.log(planet.name, planet.system);
}

Sectors

galaxy.sectors.list()

Returns a paginated list of all sectors. Sectors group star systems into named regions of space.
start_index
number
default:"1"
1-based index of the first sector to return.
item_count
number
default:"50"
Number of sectors per page.
The sectors endpoint returns a 404 if you call it without pagination parameters. Always provide start_index and item_count explicitly.
const sectors = await client.galaxy.sectors.list({
  start_index: 1,
  item_count: 50,
});

for await (const sector of sectors) {
  console.log(sector.name);
}

Stations

galaxy.stations.list()

Returns a paginated list of space stations across the galaxy.
start_index
number
default:"1"
1-based index of the first station to return.
item_count
number
default:"50"
Number of stations per page.
const stations = await client.galaxy.stations.list({
  start_index: 1,
  item_count: 50,
});

for await (const station of stations) {
  console.log(station.name, station.type);
}

Cities

galaxy.cities.list()

Returns a paginated list of all cities on planets across the galaxy.
start_index
number
default:"1"
1-based index of the first city to return.
item_count
number
default:"50"
Number of cities per page.
const cities = await client.galaxy.cities.list({
  start_index: 1,
  item_count: 50,
});

for await (const city of cities) {
  console.log(city.name, city.planet);
}

Iterating the full galaxy

Because all five sub-resources support for await...of, you can combine them to build a complete picture of the galaxy in a single script:
import { SWCombine } from 'swcombine-sdk';

const client = new SWCombine({ token: process.env.SWC_ACCESS_TOKEN! });

// Count all systems and planets
const systems = await client.galaxy.systems.list({ start_index: 1, item_count: 50 });
const planets = await client.galaxy.planets.list({ start_index: 1, item_count: 50 });

console.log(`Galaxy contains ${systems.total} systems and ${planets.total} planets`);

// Iterate every sector
for await (const sector of await client.galaxy.sectors.list({ start_index: 1, item_count: 50 })) {
  console.log(sector.name);
}
Auto-pagination with for await...of makes one API request per page. For resources with thousands of entries, use a larger item_count (up to the endpoint maximum) to reduce request count and stay within the 600 requests/hour rate limit.

Location

Look up the current location of any entity in the galaxy.

Inventory

List ships, vehicles, and other entities owned by a character.

Pagination

Learn how Page<T> works and how to auto-paginate large datasets.

Rate limits

Understand the 600 req/hour quota before iterating large galaxy datasets.