create account

Introducing SteemData WebAPI by furion

View this thread on: hive.blogpeakd.comecency.com
· @furion ·
Introducing SteemData WebAPI
![](https://i.imgur.com/uNyoNRR.jpg)
> SteemData helps developers and researchers build better STEEM applications. We parse the STEEM blockchain for you, and provide the data as a fast and convenient MongoDB service.

SteemData is a very useful tool, however it does require you to have at least some familiarity with MongoDB. Using MongoDB is fairly easy, but it does add a small barrier to entry for some users.

For example:
What if you don't want to include MongoDB driver as a dependency in your project?
What if all you need is just a simple query to enrich your Steem mobile app?

This is where SteemData WebAPI comes into play.

https://vimeo.com/208151012


## Features

### XML and JSON support
The API will return XML or JSON, based on your request headers.
To get json, simply pass `Content-Type: application/json`.

### Simple Querying
We can query for various simple conditions using a `where` field. For example,
we could look up an individual user by username like this:
```
https://webapi.steemdata.com/Accounts?where=name==furion
```

Alternatively, we can also construct more powerful queries by passing in MongoDB
query objects.

For example, lets find all transfers incoming to a specific account (@furion):
```
https://webapi.steemdata.com/Operations?where={"type": "transfer", "to": "furion"}
```

### Sorting
We can sort by using a `sort` field. Prepending field name with `-` changes order from ascending to descending.

For example, we can find latest transfers with this query:
```
https://webapi.steemdata.com/Operations?where=type==transfer&sort=-timestamp
```


### HATEOAS for navigation and pagination
[HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) is a specification for linking to resources. These links can be followed by the client programatically.

For example, `GET https://webapi.steemdata.com/Operations` will contain the following links:
```
{
  "_meta": {
    "page": 1,
    "max_results": 50,
    "total": 34679606
  },
  "_links": {
    "last": {
      "href": "Operations?page=693593",
      "title": "last page"
    },
    "parent": {
      "href": "/",
      "title": "home"
    },
    "next": {
      "href": "Operations?page=2",
      "title": "next page"
    },
    "self": {
      "href": "Operations",
      "title": "Operations"
    }
  },
  "_items": [
    ...
  ]
}
```

We can simply follow the links for pagination, as well as see how many pages there are.

Additionally, each item will also have a link to itself:
```
"_items": [
  {
    "_links": {
        "self": {
          "href": "Operations/e35709a49ee67090905a42cebabf8eee9f0de11d",
          "title": "Operation"
        }
      },
    ...
  }
]
```

## Available Endpoints
WebAPI gives you access to all SteemData MongoDB collections.
https://webapi.steemdata.com/Operations
https://webapi.steemdata.com/AccountOperations
https://webapi.steemdata.com/Accounts
https://webapi.steemdata.com/Posts
https://webapi.steemdata.com/PriceHistory

Feel free to play around with this with `curl` or a GUI tool like `Postman`.



## Need custom functionality for your app?
While WebAPI can work well for most of data fetching related queries, occasionally, a more complex solution is required.

If you need a fast, bandwidth efficient, composite or aggregate query, or custom business logic, feel free to contact me, and I will create you a custom endpoint on Api0.

Api0 is a special API that leverages the power of SteemData and offers custom endpoints for STEEM app developers.

Example Endpoint:
https://api0.steemdata.com/busy.org/furion/with_metadata/followers
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 123 others
👎  , , ,
properties (23)
authorfurion
permlinkintroducing-steemdata-webapi
categorysteemdata
json_metadata{"tags":["steemdata","steem","steemit","steemdev"],"image":["https://i.imgur.com/uNyoNRR.jpg"],"links":["https://player.vimeo.com/video/208151012","https://en.wikipedia.org/wiki/HATEOAS","https://webapi.steemdata.com/Operations","https://webapi.steemdata.com/AccountOperations","https://webapi.steemdata.com/Accounts","https://webapi.steemdata.com/Posts","https://webapi.steemdata.com/PriceHistory","https://api0.steemdata.com/busy.org/furion/with_metadata/followers"],"app":"steemit/0.1","format":"markdown"}
created2017-03-13 17:44:54
last_update2017-03-13 17:44:54
depth0
children12
last_payout2017-04-13 19:13:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,574
author_reputation116,503,940,714,958
root_title"Introducing SteemData WebAPI"
beneficiaries[]
max_accepted_payout0.000 HBD
percent_hbd10,000
post_id2,711,380
net_rshares41,058,778,773,433
author_curate_reward""
vote details (191)
@inertia ·
$0.03
This is really cool, @furion*!!*  Are there any plans to update things like `total_pending_payout_value`?

E.g.:

```
Posts?where={"mode": "first_payout", "total_pending_payout_value.amount": {"$gt": 0}}
```
👍  , , , , , , , ,
properties (23)
authorinertia
permlinkre-furion-introducing-steemdata-webapi-20170313t204214167z
categorysteemdata
json_metadata{"tags":["steemdata"],"users":["furion"],"app":"steemit/0.1"}
created2017-03-13 20:42:15
last_update2017-03-13 20:42:15
depth1
children2
last_payout2017-04-13 19:13:03
cashout_time1969-12-31 23:59:59
total_payout_value0.019 HBD
curator_payout_value0.006 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length207
author_reputation346,568,901,399,561
root_title"Introducing SteemData WebAPI"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,713,074
net_rshares221,138,151,921
author_curate_reward""
vote details (9)
@furion ·
Yes, @good-karma asked me about a similar, but related thing. It will be fixed by 1.3 release.
properties (22)
authorfurion
permlinkre-inertia-re-furion-introducing-steemdata-webapi-20170314t084758273z
categorysteemdata
json_metadata{"tags":["steemdata"],"users":["good-karma"],"app":"steemit/0.1"}
created2017-03-14 08:47:57
last_update2017-03-14 08:47:57
depth2
children1
last_payout2017-04-13 19:13:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length94
author_reputation116,503,940,714,958
root_title"Introducing SteemData WebAPI"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,717,554
net_rshares0
@inertia · (edited)
Also seeing a problem with this:

```javascript
db.getCollection('AccountOperations').find({type: 'transfer', to: 'banjo'})
```

I can see one of the expected transaction by @matrixdweller, but not the one right before it by @thedegensloth.  Here's the transaction that's missing:

https://steemd.com/tx/e1b43edc3eff584a1190a7d9056ae58b72f9d1f6
properties (22)
authorinertia
permlinkre-furion-re-inertia-re-furion-introducing-steemdata-webapi-20170323t225645939z
categorysteemdata
json_metadata{"tags":["steemdata"],"users":["matrixdweller","thedegensloth"],"links":["https://steemd.com/tx/e1b43edc3eff584a1190a7d9056ae58b72f9d1f6"],"app":"steemit/0.1"}
created2017-03-23 22:56:45
last_update2017-03-23 22:57:15
depth3
children0
last_payout2017-04-13 19:13:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length344
author_reputation346,568,901,399,561
root_title"Introducing SteemData WebAPI"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,822,175
net_rshares0
@jillstein2016 ·
https://i.imgur.com/3Iql50J.png
properties (22)
authorjillstein2016
permlinkre-introducing-steemdata-webapi-20170313t174548
categorysteemdata
json_metadata""
created2017-03-13 17:46:00
last_update2017-03-13 17:46:00
depth1
children0
last_payout2017-04-13 19:13:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length31
author_reputation-7,404,135,151,022
root_title"Introducing SteemData WebAPI"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,711,386
net_rshares0
@joele ·
Is there an API to vote? if yes, sample please.
properties (22)
authorjoele
permlinkre-furion-introducing-steemdata-webapi-20170314t034144706z
categorysteemdata
json_metadata{"tags":["steemdata"],"app":"steemit/0.1"}
created2017-03-14 03:41:39
last_update2017-03-14 03:41:39
depth1
children0
last_payout2017-04-13 19:13:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length47
author_reputation2,761,532,307,555
root_title"Introducing SteemData WebAPI"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,716,058
net_rshares0
@nextgen622 ·
Very cool. Great work @furion on all the tools you're building for Steem.
properties (22)
authornextgen622
permlinkre-furion-introducing-steemdata-webapi-2017314t22191158z
categorysteemdata
json_metadata{"tags":"steemdata","app":"esteem/1.3.9","format":"markdown+html"}
created2017-03-14 11:19:21
last_update2017-03-14 11:19:21
depth1
children0
last_payout2017-04-13 19:13:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length73
author_reputation457,147,688,118,588
root_title"Introducing SteemData WebAPI"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,718,544
net_rshares0
@raymonjohnstone ·
Props bro :)
properties (22)
authorraymonjohnstone
permlinkre-furion-introducing-steemdata-webapi-20170313t194201046z
categorysteemdata
json_metadata{"tags":["steemdata"],"app":"steemit/0.1"}
created2017-03-13 19:42:00
last_update2017-03-13 19:42:00
depth1
children0
last_payout2017-04-13 19:13:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length12
author_reputation14,612,042,909,117
root_title"Introducing SteemData WebAPI"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,712,487
net_rshares0
@smooth ·
A downvote was applied to partially counter earlier whale votes as an experiment to reduce whale domination of voting influence. Not intended to express an opinion on the content nor result in a net reduction of rewards or reputation (automated notice)
properties (22)
authorsmooth
permlinkre-furion-introducing-steemdata-webapi-counterbot
categorysteemdata
json_metadata{}
created2017-03-13 17:56:15
last_update2017-03-13 17:56:15
depth1
children0
last_payout2017-04-13 19:13:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length252
author_reputation253,602,537,834,068
root_title"Introducing SteemData WebAPI"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,711,480
net_rshares0
@unipsycho ·
Great work on this furion, nice to see, I hope to dive into it sometime, but havne't had a chance yet!
properties (22)
authorunipsycho
permlinkre-furion-introducing-steemdata-webapi-20170314t174157606z
categorysteemdata
json_metadata{"tags":["steemdata"],"app":"steemit/0.1"}
created2017-03-14 17:41:54
last_update2017-03-14 17:41:54
depth1
children0
last_payout2017-04-13 19:13:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length102
author_reputation204,795,972,600,966
root_title"Introducing SteemData WebAPI"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,721,448
net_rshares0
@xeroc ·
Glad to see you are looking into Flask(API)!
properties (22)
authorxeroc
permlinkre-furion-introducing-steemdata-webapi-20170314t181850335z
categorysteemdata
json_metadata{"tags":["steemdata"],"app":"steemit/0.1"}
created2017-03-14 18:18:51
last_update2017-03-14 18:18:51
depth1
children2
last_payout2017-04-13 19:13:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length44
author_reputation118,819,064,085,695
root_title"Introducing SteemData WebAPI"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,721,709
net_rshares0
@furion ·
After a bumpy ride with JavaScript frameworks, I am Flask-everything :)
properties (22)
authorfurion
permlinkre-xeroc-re-furion-introducing-steemdata-webapi-20170314t183737020z
categorysteemdata
json_metadata{"tags":["steemdata"],"app":"steemit/0.1"}
created2017-03-14 18:37:36
last_update2017-03-14 18:37:36
depth2
children1
last_payout2017-04-13 19:13:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length71
author_reputation116,503,940,714,958
root_title"Introducing SteemData WebAPI"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,721,821
net_rshares0
@xeroc ·
If you ever want to see some of Streemian.com's or BitShares.eu's backend, just let me know. Both are FLASK heavy
properties (22)
authorxeroc
permlinkre-furion-re-xeroc-re-furion-introducing-steemdata-webapi-20170314t183854525z
categorysteemdata
json_metadata{"tags":["steemdata"],"app":"busy/1.0.0"}
created2017-03-14 18:38:54
last_update2017-03-14 18:38:54
depth3
children0
last_payout2017-04-13 19:13:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length113
author_reputation118,819,064,085,695
root_title"Introducing SteemData WebAPI"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,721,827
net_rshares0