It’s definitely possible.
- Create a schema Mockaroo - Random Data Generator and API Mocking Tool | JSON / CSV / SQL / Excel
- Then create an API. The Handler Script can be as simple as this:
schema "GET State"
set("state",states:params['states'])
generate 10
- Call your API
https://my.api.mockaroo.com/get_state.json?key=xxxxxxx&states=Texas
This should give you an idea of how you can accomplish your request.