![](images/soa_no_bg.png)
Get started
The Sons of Anarchy API provides free access to endpoints for retrieving information about characters, seasons, and episodes of the Sons of Anarchy TV show.
You can explore and utilize these endpoints without any restrictions or the need for an API key. Start exploring the fascinating world of Sons of Anarchy today!
get characters
To get all (or a range of) characters you need to make a GET call to the following url :
https://sons-of-anrachy-api.onrender.com/api/v1/characters
QUERY PARAMETERS
Field | Type | Description | offset | Integer | (optional) specifies the starting point of a collection of results. Defautls to
0 .
|
---|---|---|
limit | Integer | (optional) determines the maximum number of results to be returned. |
Example:
curl -X GET "https://sons-of-anrachy-api.onrender.com/api/v1/characters?limit=2"
Output:
[
{
"aliases": [
"J.T.",
"John Teller"
],
"club": "Sons of Anarchy Motorcycle Club, Redwood Original (SAMCRO)",
"firstName": "Jax",
"fullName": "Jackson Nathaniel \"Jax\" Teller",
"gender": "Male",
"id": 1,
"image": "https://sons-of-anrachy-api.onrender.com/api/v1/images/jax.jpg",
"lastName": "Teller",
"middleName": "Nathaniel",
"occupation": "Outlaw biker",
"playedBy": [
"Charlie Hunnam"
],
"titles": [
"Vice President",
"President"
]
},
{
"aliases": [],
"club": "Sons of Anarchy Motorcycle Club, Redwood Original (SAMCRO)",
"firstName": "Gemma",
"fullName": "Gemma Teller Morrow",
"gender": "Female",
"id": 2,
"image": "https://sons-of-anrachy-api.onrender.com/api/v1/images/gemma.jpg",
"lastName": "Teller Morrow",
"middleName": "",
"occupation": "Family Matriarch",
"playedBy": [
"Katey Sagal"
],
"titles": [
"Queen"
]
}
]
get a single character
To get a character you need to make a GET call to the following url with `id` as the character
ID:
https://sons-of-anrachy-api.onrender.com/api/v1/characters/{int:id}
QUERY PARAMETERS
No query params for this endpoint.
Example:
curl -X GET "https://sons-of-anrachy-api.onrender.com/api/v1/characters/10"
Output:
{
"aliases": [
"Piney"
],
"club": "Sons of Anarchy Motorcycle Club, Redwood Original (SAMCRO)",
"firstName": "Piermont",
"fullName": "Piermont \"Piney\" Winston",
"gender": "Male",
"id": 10,
"image": "https://sons-of-anrachy-api.onrender.com/api/v1/images/piney.jpg",
"lastName": "Winston",
"middleName": "",
"occupation": "Outlaw biker",
"playedBy": [
"William Lucking"
],
"titles": []
}
Get seasons
To get all (or a range of) seasons, you need to make a GET call to the following URL:
https://sons-of-anrachy-api.onrender.com/api/v1/seasons
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
offset | Integer | (optional) Specifies the starting point of a collection of results. Defaults to
0 .
|
limit | Integer | (optional) Determines the maximum number of results to be returned. |
Example:
curl -X GET "https://sons-of-anrachy-api.onrender.com/api/v1/seasons?offset=4&limit=2"
Output:
[
{
"endDate": "2012-12-04",
"episodes": [
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/54",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/55",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/56",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/57",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/58",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/59",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/60",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/61",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/62",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/63",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/64",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/65",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/66"
],
"id": 5,
"numberOfEpisodes": 13,
"premierDate": "2012-09-11",
"seasonOrder": "S05",
"synopsis": "The fifth season finds SAMCRO in a precarious position as they face external threats and internal divisions. With the fallout from past actions haunting them, the Sons of Anarchy must confront their own demons while battling against rival gangs, law enforcement, and the ever-present dangers of their outlaw lifestyle. Loyalties are tested, alliances are shattered, and the fate of the club hangs in the balance as they fight to protect their own and preserve the legacy of the Sons of Anarchy.",
"viewership": 4.37
},
{
"endDate": "2013-12-10",
"episodes": [
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/67",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/68",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/69",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/70",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/71",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/72",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/73",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/74",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/75",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/76",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/77",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/78",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/79"
],
"id": 6,
"numberOfEpisodes": 13,
"premierDate": "2013-09-10",
"seasonOrder": "S06",
"synopsis": "In the sixth season, SAMCRO faces its most formidable challenges yet. As tensions rise within the club and with rival gangs, Jax is forced to make difficult decisions that will have far-reaching consequences. With outside pressures mounting and personal loyalties tested, the Sons of Anarchy must navigate a dangerous path to protect their club's future and the well-being of their loved ones. Loyalties will be shattered, alliances will be forged, and the line between right and wrong will blur as the Sons ride into uncharted territory.",
"viewership": 7.48
}
]
Get a single season
To get a season, you need to make a GET call to the following URL with `id` as the season ID:
https://sons-of-anrachy-api.onrender.com/api/v1/seasons/{int:id}
QUERY PARAMETERS
No query params for this endpoint.
Example:
curl -X GET "https://sons-of-anrachy-api.onrender.com/api/v1/seasons/7"
Output:
{
"endDate": "2014-12-09",
"episodes": [
"https://sons-of-anrachy-api.onrender.com/episodes/80",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/81",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/82",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/83",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/84",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/85",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/86",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/87",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/88",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/89",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/90",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/91",
"https://sons-of-anrachy-api.onrender.com/api/v1/episodes/92"
],
"id": 7,
"numberOfEpisodes": 13,
"premierDate": "2014-09-09",
"seasonOrder": "S07",
"synopsis": "The final season of Sons of Anarchy brings the epic saga to a gripping conclusion. As SAMCRO deals with the fallout from past actions and confronts the consequences of their choices, they find themselves facing their most dangerous adversaries yet. Old alliances are tested, new alliances are forged, and secrets are revealed that will rock the very foundation of the club. With the weight of their past bearing down on them, the Sons of Anarchy must confront their demons, face their ultimate truths, and make sacrifices in order to secure their legacy and the future of those they love.",
"viewership": 4.6
}
Get episodes
To get all (or a range of) episodes, you need to make a GET call to the following URL:
https://sons-of-anrachy-api.onrender.com/api/v1/episodes
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
offset | Integer | (optional) Specifies the starting point of a collection of results. Defaults to
0 .
|
limit | Integer | (optional) Determines the maximum number of results to be returned. |
Example:
curl -X GET "https://sons-of-anrachy-api.onrender.com/api/v1/episodes?offset=90"
Output:
[
{
"airDate": "2014-12-02",
"directedBy": [
"Paris Barclay"
],
"episodeNumber": 12,
"id": 91,
"season": "https://sons-of-anrachy-api.onrender.com/api/v1/seasons/7",
"seasonNumber": "S07",
"synopsis": "In the explosive penultimate episode, SAMCRO faces the consequences of their actions as alliances crumble, friendships are tested, and loyalties are questioned. Jax must make the ultimate sacrifice to protect his family and secure the future of the club. Charming will never be the same again.",
"title": "Red Rose",
"writtenBy": [
"Kurt Sutter",
"Charles Murray"
]
},
{
"airDate": "2014-12-09",
"directedBy": [
"Kurt Sutter"
],
"episodeNumber": 13,
"id": 92,
"season": "https://sons-of-anrachy-api.onrender.com/api/v1/seasons/7",
"seasonNumber": "S07",
"synopsis": "In the gripping series finale, SAMCRO confronts the sins of the past as Jax seeks closure and redemption. The Sons of Anarchy face their ultimate fate as alliances are shattered, enemies close in, and the truth about Jax's father is finally revealed. Charming will never be the same again.",
"title": "Papa's Goods",
"writtenBy": [
"Kurt Sutter"
]
}
]
Get a single episode
To get an episode, you need to make a GET call to the following URL with `id` as the episode ID:
https://sons-of-anrachy-api.onrender.com/api/v1/episodes/{int:id}
QUERY PARAMETERS
No query params for this endpoint.
Example:
curl -X GET "https://sons-of-anrachy-api.onrender.com/api/v1/episodes/1"
Output:
{
"airDate": "2008-09-03",
"directedBy": [
"Allen Coulter",
"Michael Dinner"
],
"episodeNumber": 1,
"id": 1,
"season": "https://sons-of-anrachy-api.onrender.com/api/v1/seasons/1",
"seasonNumber": "S01",
"synopsis": "In the small town of Charming, the Sons of Anarchy Motorcycle Club Redwood Original (SAMCRO) is led by President Clay Morrow. Jax Teller, the vice president of the club and son of the founder, struggles with his loyalty to the club and his growing disillusionment with its illegal activities. When a rival gang threatens SAMCRO's gun-running operation, tensions rise, and Jax finds himself torn between his family's legacy and his desire for a better life.",
"title": "Pilot",
"writtenBy": [
"Kurt Sutter"
]
}
Get Episodes Of A Season
To get all episodes of a specific season, you need to make a GET call to the following URL:
https://sons-of-anrachy-api.onrender.com/api/v1/seasons/{int:season_id}/episodes
Replace {int:season_id}
with the desired season ID.
QUERY PARAMETERS
No query params for this endpoint.
Example:
curl -X GET "https://sons-of-anrachy-api.onrender.com/api/v1/seasons/3/episodes"
Output:
[
{
"airDate": "2011-09-06",
"directedBy": [
"Paris Barclay"
],
"episodeNumber": 1,
"id": 40,
"season": "https://sons-of-anrachy-api.onrender.com/api/v1/seasons/4",
"seasonNumber": "S04",
"synopsis": "Following the events of the previous season, SAMCRO faces the fallout of their actions as they try to rebuild their club and establish new alliances. Jax takes on a leadership role with the club, while Clay struggles to maintain his influence. The tension between the members escalates as they navigate a world filled with danger and uncertainty.",
"title": "Out",
"writtenBy": [
"Kurt Sutter"
]
},
{
"airDate": "2011-09-13",
"directedBy": [
"Guy Ferland"
],
"episodeNumber": 2,
"id": 41,
"season": "https://sons-of-anrachy-api.onrender.com/api/v1/seasons/4",
"seasonNumber": "S04",
"synopsis": "SAMCRO continues to face challenges as they work to solidify their position in the criminal underworld. Jax grapples with the direction of the club, while Clay takes desperate measures to protect his legacy. Loyalties are tested, alliances are formed, and the club must navigate treacherous waters to survive.",
"title": "Booster",
"writtenBy": [
"Dave Erickson",
"Chris Collins"
]
},
... # All episodes of season 3
]
Get a single season Episode
To get an episode from a specific season, you need to make a GET call to the following URL:
https://sons-of-anrachy-api.onrender.com/api/v1/seasons/{int:season_id}/episodes/{int:episode_id}
Replace {int:season_id}
with the desired season ID and {int:episode_id}
with the desired episode ID.
QUERY PARAMETERS
No query params for this endpoint.
Example:
curl -X GET "https://sons-of-anrachy-api.onrender.com/api/v1/seasons/3/episodes/27"
Output:
{
"airDate": "2010-09-07",
"directedBy": [
"Stephen Kay"
],
"episodeNumber": 1,
"id": 27,
"season": "https://sons-of-anrachy-api.onrender.com/api/v1/seasons/3",
"seasonNumber": "S03",
"synopsis": "After the events of the season finale, SAMCRO finds themselves in a new environment as they relocate to a different town. Jax grapples with the consequences of his actions, while Clay tries to maintain control of the club. Tensions rise as the club clashes with a powerful new adversary.",
"title": "SO",
"writtenBy": [
"Kurt Sutter"
]
}
Filter Resources
To filter resources based on specific criteria, you need to make a POST call to the following
endpoint:
https://sons-of-anrachy-api.onrender.com/api/v1/filter
QUERY PARAMETERS
No query params for this endpoint.
Request Body:
{
"type": "type of resource to filter",
"filters": {
"attribute1": "value1",
"attribute2": "value2",
...
}
}
The request body should contain the following fields:
Field | Type | Description |
---|---|---|
type | String | Specifies the resource type to filter. Valid options: "characters", "episodes", "seasons". |
filters | Object | Contains the attribute-value pairs for filtering the resources based on specific criteria. |
Example:
curl -X POST "https://sons-of-anrachy-api.onrender.com/api/v1/filter" -H "Content-Type: application/json" -d '{"type": "characters", "filters": {"firstName": "Jax"}}'
Response:
[
{
"aliases": [
"J.T.",
"John Teller"
],
"club": "Sons of Anarchy Motorcycle Club, Redwood Original (SAMCRO)",
"firstName": "Jax",
"fullName": "Jackson Nathaniel \"Jax\" Teller",
"gender": "Male",
"id": 1,
"image": "https://sons-of-anrachy-api.onrender.com/api/v1/images/jax.jpg",
"lastName": "Teller",
"middleName": "Nathaniel",
"occupation": "Outlaw biker",
"playedBy": [
"Charlie Hunnam"
],
"titles": [
"Vice President",
"President"
]
}
]
Filtering List Columns
When querying list columns, such as those defined with a list of strings, the filtering behavior differs depending on how the value is specified:
-
If you specify a key-value pair, it will return the object if the key contains the specified
value within the
list. For example, if an object has
writtenBy=["Kurt Sutter", "Jack LoGiudice"]
, filtering by"writtenBy": "Kurt Sutter"
will return the object. -
However, if you specify the value as a list, it will be compared literally. Using the same
example, filtering by
"writtenBy": ["Kurt Sutter"]
will not return the object because the comparison is performed on the entire list.
Filtering By Images
When filtering by images, you ONLY need to specify the image name. For example, filtering by
"image": "jax.jpg"
will return the object. However, filtering by
"image": "https://sons-of-anrachy-api.onrender.com/api/v1/images/jax.jpg"
will not return the object.
Errors
The Sons Of Anarchy API uses the following error codes:
Error Code | Error Message | Meaning |
---|---|---|
400 | Depends on the request. | Bad request. |
401 | Depends on the request. | Unauthorized (lacks valid JWT authentication). |
404 | {'error': 'Not found'} | The requested resource doesn't exist. |
405 | {'error': 'Method not allowed'} | The requested method is not allowed. |
500 | {'error': 'Internal Server Error'} | An error occurred on the server side. |