> For the complete documentation index, see [llms.txt](https://syticks.gitbook.io/merpi-by-syticks/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://syticks.gitbook.io/merpi-by-syticks/api-reference/bus-ticketing-routes-terminals-schedules-buses-purchase-etc/get-all-states-endpoint.md).

# Get All States Endpoint

## Fetch All States

> This endpoint returns the list of states in Nigeria that Syticks supports.

```json
{"openapi":"3.0.3","info":{"title":"Syticks API","version":"1.0.0"},"paths":{"/api/v1/merpi/transport/states":{"get":{"summary":"Fetch All States","description":"This endpoint returns the list of states in Nigeria that Syticks supports.","parameters":[{"in":"query","name":"search","required":false,"schema":{"type":"string"},"description":"Filter states based on a search parameter. For example, if you pass \"La\" as the search term, it will return all states that contain \"La\".\n"},{"in":"query","name":"page","required":false,"schema":{"type":"string"},"description":"Specifies the next page to fetch. This value is gotten with each request made.\n"},{"in":"query","name":"per_page","required":false,"schema":{"type":"integer","format":"int32"},"description":"Specifies the number of states per page. For example, if `per_page` is set to 10, the response will contain 10 states.\n"}],"responses":{"200":{"description":"Successful retrieval of states.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the request was successful."},"status":{"type":"integer","description":"HTTP status code (200 indicates success)."},"message":{"type":"string","description":"Human-readable description of the response."},"data":{"type":"object","properties":{"states":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the state."},"name":{"type":"string","description":"Name of the state."}}}},"next_page":{"type":"string","nullable":true,"description":"URL for the next page of results (if applicable)."},"count":{"type":"integer","description":"Total number of states available."},"per_page":{"type":"integer","description":"Number of states per page."}}}}}}}},"400":{"description":"Bad Request - Invalid input or query parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the request was successful."},"status":{"type":"integer","description":"HTTP status code."},"message":{"type":"string","description":"Human-readable error message."}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the request was successful."},"status":{"type":"integer","description":"HTTP status code."},"message":{"type":"string","description":"Human-readable error message."}}}}}}}}}}}
```
