> For the complete documentation index, see [llms.txt](https://ballioli1.gitbook.io/runescape3-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ballioli1.gitbook.io/runescape3-api/docs/runemetrics.md).

# Runemetrics

## Usage

```python
from rs3_api import Runemetrics
runemetrics = Runemetrics()
```

### get\_monthly\_experience(username: str, skill\_id)

> Gets a players monthly experience stats for the last 12 months in a particular skill

| Parameters | Type  |
| ---------- | ----- |
| `username` | `str` |
| `skill_id` | `str` |

{% tabs %}
{% tab title="Python" %}

```python
response = runemetrics.get_monthly_experience("Phyrexz", "defence")
print(response)
```

{% endtab %}

{% tab title="Response" %}

```python
{
  'monthlyXpGain': [
    {
      'skillId': 1,
      'totalXp': 56921532,
      'averageXpGain': 4743449,
      'totalGain': 56921389,
      'monthData': [
        {
          'xpGain': 0,
          'timestamp': 1570843627278,
          'rank': 0
        },
        {
          'xpGain': 0,
          'timestamp': 1573525627278,
          'rank': 0
        },
        {
          'xpGain': 0,
          'timestamp': 1576117627278,
          'rank': 0
        },
        {
          'xpGain': 0,
          'timestamp': 1578796027278,
          'rank': 0
        },
        {
          'xpGain': 0,
          'timestamp': 1581474427278,
          'rank': 0
        },
        {
          'xpGain': 0,
          'timestamp': 1583980027278,
          'rank': 0
        },
        {
          'xpGain': 0,
          'timestamp': 1586654827278,
          'rank': 0
        },
        {
          'xpGain': 0,
          'timestamp': 1589246827278,
          'rank': 0
        },
        {
          'xpGain': 747347,
          'timestamp': 1593420305837,
          'rank': 34454
        },
        {
          'xpGain': 32142926,
          'timestamp': 1596131627692,
          'rank': 772
        },
        {
          'xpGain': 24031116,
          'timestamp': 1597936403839,
          'rank': 1952
        },
        {
          'xpGain': 0,
          'timestamp': 1599874027278,
          'rank': 0
        }
      ],
      'skillName': 'defence'
    }
  ],
  'loggedIn': 'false'
}
```

{% endtab %}
{% endtabs %}

### get\_quests(username: str)

> Gets statistics and information on a players quests

| Parameter  | Type  |
| ---------- | ----- |
| `username` | `str` |

{% tabs %}
{% tab title="Python" %}

```python
response = runemetrics.get_quests('Phyrexz')
print(response)
```

{% endtab %}

{% tab title="Response" %}

```python
{
  'quests': [
    {
      'title': 'A Fairy Tale I - Growing Pains',
      'status': 'COMPLETED',
      'difficulty': 2,
      'members': True,
      'questPoints': 2,
      'userEligible': True
    },
    {
      'title': 'A Guild of Our Own (miniquest)',
      'status': 'COMPLETED',
      'difficulty': 3,
      'members': True,
      'questPoints': 0,
      'userEligible': True
    },
    {
      'title': 'A Shadow over Ashdale',
      'status': 'COMPLETED',
      'difficulty': 0,
      'members': False,
      'questPoints': 1,
      'userEligible': True
    },
    # ... 100+ more items
  ]
}
```

{% endtab %}
{% endtabs %}

### get\_profile(username: str, activities: int)

> Gets a player Runemetrics profile

| Parameters   | Type  | Default |
| ------------ | ----- | ------- |
| `username`   | `str` |         |
| `activities` | `int` | `25`    |

{% tabs %}
{% tab title="Python" %}

```python
response = runemetrics.get_profile('Phyrexz', 2)
print(response)
```

{% endtab %}

{% tab title="Response" %}

```python
{
  'magic': 9120570,
  'questsstarted': 2,
  'totalskill': 2282,
  'questscomplete': 106,
  'questsnotstarted': 187,
  'totalxp': 233272699,
  'ranged': 38885437,
  'activities': [
    {
      'date': '20-Aug-2020 22:13',
      'details': 'I killed 9 Helwyrs, limb tearing hunters.',
      'text': 'I killed 9 Helwyrs.'
    },
    {
      'date': '18-Aug-2020 20:50',
      'details': 'I killed 11 Vindictas, all heavily armoured dragon riders.',
      'text': 'I killed 11 Vindictas.'
    }
  ],
  'skillvalues': [
    {
      'level': 99,
      'xp': 569215327,
      'rank': 50032,
      'id': 1,
      'skillname': 'defence'
    },
    {
      'level': 99,
      'xp': 388854371,
      'rank': 101295,
      'id': 3,
      'skillname': 'constitution'
    },
    {
      'level': 99,
      'xp': 172409966,
      'rank': 143945,
      'id': 6,
      'skillname': 'magic'
    },
    {
      'level': 99,
      'xp': 169867476,
      'rank': 144114,
      'id': 4,
      'skillname': 'ranged'
    },
    {
      'level': 99,
      'xp': 138754356,
      'rank': 194189,
      'id': 2,
      'skillname': 'strength'
    },
    {
      'level': 99,
      'xp': 138618257,
      'rank': 180684,
      'id': 0,
      'skillname': 'attack'
    },
    {
      'level': 99,
      'xp': 130519732,
      'rank': 180231,
      'id': 18,
      'skillname': 'slayer'
    },
    {
      'level': 97,
      'xp': 108269379,
      'rank': 189416,
      'id': 23,
      'skillname': 'summoning'
    },
    {
      'level': 72,
      'xp': 98088463,
      'rank': 175689,
      'id': 26,
      'skillname': 'invention'
    },
    {
      'level': 95,
      'xp': 91205708,
      'rank': 237548,
      'id': 5,
      'skillname': 'prayer'
    },
    {
      'level': 94,
      'xp': 84288403,
      'rank': 231315,
      'id': 15,
      'skillname': 'herblore'
    },
    {
      'level': 88,
      'xp': 44762176,
      'rank': 224379,
      'id': 24,
      'skillname': 'dungeoneering'
    },
    {
      'level': 83,
      'xp': 28817207,
      'rank': 212172,
      'id': 19,
      'skillname': 'farming'
    },
    {
      'level': 82,
      'xp': 25693464,
      'rank': 302509,
      'id': 14,
      'skillname': 'mining'
    },
    {
      'level': 81,
      'xp': 22410288,
      'rank': 299745,
      'id': 12,
      'skillname': 'crafting'
    },
    {
      'level': 80,
      'xp': 20217671,
      'rank': 284335,
      'id': 25,
      'skillname': 'divination'
    },
    {
      'level': 80,
      'xp': 19873914,
      'rank': 372361,
      'id': 13,
      'skillname': 'smithing'
    },
    {
      'level': 75,
      'xp': 13253510,
      'rank': 311814,
      'id': 16,
      'skillname': 'agility'
    },
    {
      'level': 75,
      'xp': 12991015,
      'rank': 536652,
      'id': 8,
      'skillname': 'woodcutting'
    },
    {
      'level': 75,
      'xp': 12690143,
      'rank': 315916,
      'id': 22,
      'skillname': 'construction'
    },
    {
      'level': 70,
      'xp': 8025119,
      'rank': 505997,
      'id': 11,
      'skillname': 'firemaking'
    },
    {
      'level': 70,
      'xp': 7710006,
      'rank': 501216,
      'id': 9,
      'skillname': 'fletching'
    },
    {
      'level': 70,
      'xp': 7439479,
      'rank': 521384,
      'id': 7,
      'skillname': 'cooking'
    },
    {
      'level': 67,
      'xp': 5632952,
      'rank': 351383,
      'id': 17,
      'skillname': 'thieving'
    },
    {
      'level': 66,
      'xp': 5334529,
      'rank': 353297,
      'id': 20,
      'skillname': 'runecrafting'
    },
    {
      'level': 66,
      'xp': 5059671,
      'rank': 556010,
      'id': 10,
      'skillname': 'fishing'
    },
    {
      'level': 56,
      'xp': 1926174,
      'rank': 466207,
      'id': 21,
      'skillname': 'hunter'
    },
    {
      'level': 47,
      'xp': 798372,
      'rank': 174165,
      'id': 27,
      'skillname': 'archaeology'
    }
  ],
  'name': 'Phyrexz',
  'rank': '241,747',
  'melee': 145097115,
  'combatlevel': 137,
  'loggedIn': 'false'
}
```

{% endtab %}
{% endtabs %}
