A stack overflow answer explains how to retrieve a user's public inventory
http://steamcommunity.com/profiles/<PROFILEID>/inventory/json/<APPID>/<CONTEXTID>
I read that context ID must be set as 2 to find items for most games, but this is not always the case. Is there any official API to find a user's inventory contexts? steamapis.com already has a paid API which performs this task:
{
    "steamID": {
        "universe": 1,
        "type": 1,
        "instance": 1,
        "accountid": 78261062
    },
    "name": "PEPZ",
    "onlineState": "online",
    "stateMessage": "Online",
    "privacyState": "public",
    "visibilityState": "3",
    "avatarHash": "5b702b331ddeb928225ad562a3e729aecd191b9a",
    "vacBanned": false,
    "tradeBanState": "None",
    "isLimitedAccount": false,
    "customURL": "pepzwee",
    "memberSince": "2011-02-21T22:00:00.000Z",
    "location": "Estonia",
    "realName": "SteamApis.com Developer",
    "summary": "",
    "groups": [
        {
            "universe": 1,
            "type": 7,
            "instance": 0,
            "accountid": 28077004
        },
        ...
    ],
    "primaryGroup": {
        "universe": 1,
        "type": 7,
        "instance": 0,
        "accountid": 28077004
    },
    "contexts": {
        "440": {
            "appid": 440,
            "name": "Team Fortress 2",
            "icon": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/apps/440/e3f595a92552da3d664ad00277fad2107345f743.jpg",
            "link": "http://steamcommunity.com/app/440",
            "asset_count": 11,
            "inventory_logo": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/apps/440/e613d1d46de26ea755105b898cc8830d305353f3.png",
            "trade_permissions": "FULL",
            "load_failed": 0,
            "rgContexts": {
                "2": {
                    "asset_count": 11,
                    "id": "2",
                    "name": "Backpack"
                }
            }
        },
        ...
    }
}
Where "rgContexts" contains inventory context for each game.