sw_get
Gets one Star Wars entity by numeric record id and returns it as a JSON object. Take the id from the end of an entity's url field (from sw_search, sw_list or a relation URL). Ids are record ids, not episode numbers: FILMS id 1 is A New Hope (Episode IV). An unknown id returns a tool error, e.g. 'No films found with id 99'. Pass expand to get related records in the same call, e.g. ["homeworld", "species"]; name only the relations you need; * on a film can pass 50 KB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Numeric record id: the last segment of the entity's url field (1 in .../api/people/1). | |
| expand | No | Optional. Relations to embed, one level deep, under a final "expanded" key: PEOPLE homeworld, films, species, vehicles, starships; FILMS characters, planets, starships, vehicles, species; PLANETS residents, films; SPECIES homeworld, people, films; STARSHIPS and VEHICLES pilots, films; or ["*"] alone for all. Up to 8 names; an unknown name returns a tool error. | |
| resource | Yes | Resource type: PEOPLE, FILMS, PLANETS, SPECIES, STARSHIPS or VEHICLES. Any other value returns a tool error. |