# `GSPath nodeAtIndex:`

*Instance Method*

The node at an index.

## Declaration

```swift
func node(at idx: Int) -> GSNode?
```

```objc
- (GSNode *) nodeAtIndex:(NSInteger) idx;
```

```python
nodeAtIndex_(idx: int) -> GSNode
```

## Discussion

For a closed path, indices wrap around the path. For an open path, returns `nil` when the index is out of bounds.

## See Also

### Node Navigation

- [`GSPath indexOfNode:`](/Core/GlyphsCore/GSPath/indexOfNode:) — The index of a node, or `NSNotFound` when the node is not in the path.
- [`GSPath firstOncurveNodeIndex`](/Core/GlyphsCore/GSPath/firstOncurveNodeIndex) — An index from which every segment can be traversed in node order.
- [`GSPath nextOncurveNodeFromIndex:`](/Core/GlyphsCore/GSPath/nextOncurveNodeFromIndex:) — The next on-curve node after an index.
- [`GSPath previousOncurveNodeFromIndex:`](/Core/GlyphsCore/GSPath/previousOncurveNodeFromIndex:) — The previous on-curve node before an index.
- [`GSPath.startNode`](/Core/GlyphsCore/GSPath/startNode) — For open paths, returns the first node of the path, otherwise `nil`.
- [`GSPath.endNode`](/Core/GlyphsCore/GSPath/endNode) — For open paths, returns the last node of the path, otherwise `nil`.
- [`GSPath findStartNode`](/Core/GlyphsCore/GSPath/findStartNode) — The node used to begin traversing a closed path, or `nil` for an open path.
- [`GSPath findMinNode`](/Core/GlyphsCore/GSPath/findMinNode) — The lowest on-curve node, preferring the leftmost node at equal height.
- [`GSPath fixStartNode`](/Core/GlyphsCore/GSPath/fixStartNode) — Moves trailing off-curve nodes to the beginning of a closed path.
- [`GSPath makeNodeFirst:`](/Core/GlyphsCore/GSPath/makeNodeFirst:) — Makes a node the start node of the path.
- [`GSPath indexOfTTStartNode`](/Core/GlyphsCore/GSPath/indexOfTTStartNode) — The index preceding the first on-curve node for TrueType path traversal.

