1. There is no such thing as a "pending" ban or Steam admin. Anyone threatening your account is a scammer trying to scare you. Read more.

READ ME SteamRep Web API - beta4 / Legacy (Public)

Discussion in 'SteamRep API Discussion' started by Mattie!, Oct 25, 2015.

Thread Status:
Not open for further replies.
  1. Mattie!

    Mattie! SteamRep Admin

    Messages:
    5,248
    SteamRep Admin:
    STEAM_0:0:5712733
    Important: Our API is undergoing major design changes and this API will be considered "Legacy" once the new ones come out. Note that this API will try to be maintained indefinitely, but that these API queries will be throttled. The next version of our API will use API keys and will allow more API checks per second.

    We are testing a simple and fast way to query reputation tags via a URL. It is similar to Steam's community XML. Feedback is encouraged.

    Requirements:
    • The API is intended to be used on-demand inside of a web application and not for "background" automated purposes.
      • Never use the API in a way that spams SteamRep (e.g. never trigger it on every pageview of your site)
      • Cache results when possible, ideally never repeating a query for someone more than once a half hour.
      • Do not scan through many profiles at once via the API
      • If you abuse this your IPs/accounts could be banned from all SteamRep servers
    Encouraged uses include:
    • Check it once and cache it on a login of a Steam user
    • Check it and cache it when a user profile page is viewed
    • Check it when a major action is initiated by a user (e.g. trade request, "check reputation")
    • Add it to a browser plugin for viewing a Steam profile (As long as it doesn't spam the API for every profile on a forum/comment page, for example-- it must be on-demand by a user action)
    • Any other gentle uses.
    Never screenscrape SteamRep.com. If you do, your IPs will be banned because this hammers our site as well as the Steam Community websites. :( You should cease doing that and use the Web API. :) Remember, we're hosting on small servers funded by donations-- we do not have a million dollar server farm (like Steam).


    API Examples

    Basic XML usage:

    Query: http://steamrep.com/api/beta4/reputation/76561197971691194 (queries also support https)
    Response:
    HTML:
    <?xml version="1.0" encoding="UTF-8"?>
    <steamrep status="exists">
       <steamID32>STEAM_0:0:5712733</steamID32>
       <steamID64>76561197971691194</steamID64>
       <steamrepurl>http://steamrep.com/profiles/76561197971691194</steamrepurl>
       <reputation>
         <full>REDDIT ADMIN,SR ADMIN,SR DONATOR</full>
         <summary>ADMIN</summary>
       </reputation>
    </steamrep>
    

    For JSON output, you can use the following:

    Query: http://steamrep.com/api/beta4/reputation/76561197971691194?json=1
    Response:
    Code:
    {
        "steamrep": {
            "flags": {
                "status": "exists"
            },
            "steamID32": "STEAM_0:0:5712733",
            "steamID64": "76561197971691194",
            "steamrepurl": "http://steamrep.com/profiles/76561197971691194",
            "reputation": {
                "full": "REDDIT ADMIN,SR ADMIN,SR DONATOR",
                "summary": "ADMIN"
            }
        }
    }

    Response will look like this when we haven't seen the trader (or if they don't have any tag at all):

    Query: http://steamrep.com/api/beta4/reputation/765611979716911943?json=1
    Response:
    Code:
    {
        "steamrep": {
            "flags": {
                "status": "notfound"
            },
            "steamID32": "",
            "steamID64": "765611979716911943",
            "steamrepurl": "http://steamrep.com/profiles/765611979716911943",
            "reputation": {
                "full": "",
                "summary": "none"
            }
        }
    }

    Note: As per this example, if the profile has never had any reputation on SteamRep, they'll usually return as status = "notfound" even if the Steam account is a valid one. This is done to make this query a very fast in-memory lookup for accounts that have reputation. If you need other info (including trade bans, etc), see the extended parameter below.

    We also support an optional tagdetails parameter:

    Query: http://steamrep.com/api/beta4/reputation/76561197971691194?tagdetails=1
    Response:
    HTML:
    <?xml version="1.0" encoding="UTF-8"?>
    <steamrep status="exists">
        <steamID32>STEAM_0:0:5712733</steamID32>
        <steamID64>76561197971691194</steamID64>
        <steamrepurl>http://steamrep.com/profiles/76561197971691194</steamrepurl>
        <reputation>
            <full>REDDIT ADMIN,SR ADMIN,SR DONATOR</full>
            <summary>ADMIN</summary>
            <tags>
                <tag>
                    <name>SR ADMIN</name>
                    <timestamp>1327282684</timestamp>
                    <date>2012-01-22 19:38:04</date>
                    <category>trusted</category>
                </tag>
                <tag>
                    <name>REDDIT ADMIN</name>
                    <timestamp>1327282684</timestamp>
                    <date>2012-01-22 19:38:04</date>
                    <category>trusted</category>
                </tag>
                <tag>
                    <name>SR DONATOR</name>
                    <timestamp>1315982652</timestamp>
                    <date>2011-09-14 01:44:12</date>
                    <category>misc</category>
                </tag>
            </tags>
        </reputation>
    </steamrep>
    

    We also support an optional 'extended' parameter. This provides information Steam already provides (which you should use Steam for normally), but it also includes information about their number of banned friends and unconfirmed reports.

    Note: It's highly recommended that you do not ban any users based on banned friends or unconfirmed reports. Unconfirmed reports especially could be abused by someone to get them banned in your community-- please don't reward people for filing false reports.

    Query: http://steamrep.com/api/beta4/reputation/76561197971691194?extended=1
    Response:
    HTML:
    <?xml version="1.0" encoding="UTF-8"?>
    <steamrep status="exists">
        <steamID32>STEAM_0:0:5712733</steamID32>
        <steamID64>76561197971691194</steamID64>
        <steamrepurl>http://steamrep.com/profiles/76561197971691194</steamrepurl>
        <displayname><![CDATA[Mattie!]]></displayname>
        <rawdisplayname><![CDATA[Mattie!]]></rawdisplayname>
        <avatar>https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/34/3436a58c3d1738506daab18df185863db39a8e31_medium.jpg</avatar>
        <membersince>1102729846</membersince>
        <customurl>mattie</customurl>
        <tradeban>1</tradeban>
        <vacban>0</vacban>
        <lastsynctime>1445592149</lastsynctime>
        <reputation>
            <full>REDDIT ADMIN,SR ADMIN,SR DONATOR</full>
            <summary>ADMIN</summary>
        </reputation>
        <stats>
            <bannedfriends>4</bannedfriends>
            <unconfirmedreports>
                <reportcount>1</reportcount>
                <reportlink>http://forums.steamrep.com/search/search/?user_content=thread&amp;keywords=76561197971691194&amp;o=date&amp;nodes[]=3&amp;title_only=1&amp;child_nodes=1</reportlink>
            </unconfirmedreports>
        </stats>
    </steamrep>
    

    Again, spamming the API will get your IP banned quickly. Be responsible and don't wreck our donation-funded servers.
    Last edited: Jan 7, 2016
  2. Mattie!

    Mattie! SteamRep Admin

    Messages:
    5,248
    SteamRep Admin:
    STEAM_0:0:5712733
    New in the beta4 API: The extended parameter now includes the number of bannedfriends, and unconfirmedreports. See the last example above. Please do not ban people purely based on those counts-- it's provided for informational purposes so you can make human-based judgement calls (or for your users to do so).

    If you have feedback/bugs to report for the latest version of the API, please post it in this forum. Thanks.
  3. Mattie!

    Mattie! SteamRep Admin

    Messages:
    5,248
    SteamRep Admin:
    STEAM_0:0:5712733
    FYI-- Reformatted the API examples a little and added a more explicit note about the vanilla reputation query returning "notfound" in cases of no reputation (for optimization purposes). This was a new change in beta3/beta4.
Thread Status:
Not open for further replies.