RankCrew API <small><sup><font color=red>BETA</font></sup></small>

The API allows you to access the primary features of the system via a script or desktop application:

  1. Submit a RankCrew service order
  2. Get a price quote for a service order
  3. Retrieve the status of a service order (including output data if complete)
  4. Retrieve the current user balance

The API url is:

http://rankcrew.com/api.php

To access the API, you perform an HTTP POST to the above url. All calls to the API require you to pass your API key, which can be found on your account details page.

The API returns JSON encoded objects for all commands. All text fields are UTF8 encoded and must be decoded using a function similar to PHP's utf8_decode().

The object will have two keys: success and output. If success is 0 (false), output will contain an array of errors encountered. If success is 1 (true), output will vary based on the command.

The API supports the following commands:

 


 

submit_order

Submits a RankCrew service order.

VariableValue
actionsubmit_order
apikey(your API key)
service(the service being ordered--highlighted in red in the list below)

In addition, all of the fields required for the specified service must be passed (shown below).

NOTICE: The cost is shown as a range rather than a fixed per-item cost. The reason for this is that the cost per item goes down for larger orders. For instance, if you order the maximum qty available for a service, you get the lowest price. If you order 50% of the maximum, you get a price equal to the minimum price plus 50% of the difference between the minimum and maximum price.

If successful, output will contain the following information:

VariableValue
order_id(The order_id of the request, passed to the order_detail command.)

 


 

price_order

Gets a price quote for the stated service and quantity.

VariableValue
actionprice_order
apikey(your API key)
servicethe service to get a quote for (from the list shown under the submit_order command)
url(the URL to perform the service for)
qtythe quantity desired (must be within the ranges shown under the submit_order command)

If successful, output will contain the following information:

VariableValue
order_cost(The price of the service as of the time of the request--subject to change.)

 


 

order_detail

Gets a price quote for the stated service and quantity.

VariableValue
actionorder_detail
apikey(your API key)
order_id(the order_id returned from the submit_order command)

If successful, output will contain the following information:

VariableValue
order_id(the order_id)
cost(the price paid for the order)
created(the php time() value at the time the order was created)
started(the php time() value at the time work on the order began)
finished(the php time() value at the time the order was completed)
status(queued or in progress or complete)
tasks(a json-encoded array with all of the tasks for an order and their details--see below)

task array values

NOTICE: You must decode the json string for each task individually in order to get the task array and its values.

VariableValue
service(the task service)
qty(the quantity ordered)
url(the url given)
created(the php time() value at the time the task was created)
started(the php time() value at the time work on the task began)
finished(the php time() value at the time the task was completed)
status(queued or in progress or complete)
resultdata(if complete, the list of link locations or other result data for the task)

 


 

balance

The remaining balance for the account associated with the passed API key.

VariableValue
actionbalance
apikey(your API key)

If successful, output will contain the following information:

VariableValue
balance(Remaining account balance)