One way to get a list of characters in Game of Thrones is by utilizing the GoT API (https://anapioficeandfire.com/). The API provides a list of all the characters from the book series.
To access the API, you can use an HTTP client library like HttpClient from .NET:
main.cs654 chars23 lines
You can then deserialize the response JSON into a list of characters:
main.cs802 chars35 lines
You can then call GetCharactersAsync()
method to get a list of characters:
main.cs173 chars7 lines
Note that the API can only return up to 50 characters per page. You can adjust the page
and pageSize
parameters to retrieve more characters.
gistlibby LogSnag