iNeedArticles API

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

  1. Create an order (submit an article request)
  2. Retrieve the status of all articles in a request
  3. Retrieve the individual articles in a request
  4. Retrive current balance

The API url is: https://portal.ineedarticles.com/api.php

Accessing the API

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:


Request Articles (requestArticles)

Submits an article request to the system. Note: an * indicates required parameter.

ParameterValue
action *requestArticles
apikey *(your API key)
keywords *(article keywords, separated by a newline character)
wordcount *(the minimum number of words for the article: 100, 200, 300, ..2000)
count *(number of articles to create for each keyword)
instructions(provide background and context for the writer for this assignment)
exactkeys(1 = must use exact keywords in the article, 0 = exact keywords not required [default])
english(us = US English [default], uk = UK English)
expedite(1 = 24 hour guranatee, 0 = no time guarantee [default])
bestwriters(1 = 4/5 star writers only, 0 = open to all writers [default])
extraresearch(1 = add additional research fee, 0 = no additional research [default])
stylefee(1 = add if making article style requests, 0 = no specific style requests [default])
style_pointofviewonly if stylefee is 1. ('first' = First person, 'third' = Third person [default])
style_toneonly if stylefee is 1. ('positive' = Positive tone, 'balanced' = Balanced tone [default], 'formal' = Formal tone)
style_writingstyleonly if stylefee is 1. ('formal' = Formal, 'informal' = Informal [default]
style_headingsonly if stylefee is 1. ('no_headings' = No headings will be added to article [default], 'add_headings' = Writer will include topical headings in article
postbackurl(OPTIONAL URL to post article data to upon article completion. Data will be in POST variables rather than a JSON encoded object. All variables from a batchArticle call will be posted, as shown below. Your API key will be posted to the apikey variable as well, for verification purposes.)
calculate_only(1 = only perform validation and provide cost without charging account, 0 = perform the complete article request transaction [default])

If successful, output will contain the following information:

ParameterValue
batch(The batch id of the request. You must store this value for use in batch related calls.)
costThe amount charged for this request.

Request Rewrites (requestRewrites)

Submits an article rewrite request to the system. Note: an * indicates required parameter.

ParameterValue
action *requestRewrites
apikey *(your API key)
count *(number of articles/sentence to create)
otitle(required only for requestRewrites) The title of the article to be rewritten
obody *(required) The body of the article or sentence to be rewritten
instructions(provide background and context for the writer for this assignment)
english(us = US English [default], uk = UK English)
expedite(1 = 24 hour guranatee, 0 = no time guarantee [default])
bestwriters(1 = 4/5 star writers only, 0 = open to all writers [default])
extraresearch(1 = add additional research fee, 0 = no additional research [default])
stylefee(1 = add if making article style requests, 0 = no specific style requests [default])
postbackurl(OPTIONAL URL to post article data to upon article completion. Data will be in POST variables rather than a JSON encoded object. All variables from a batchArticle call will be posted, as shown below. Your API key will be posted to the apikey variable as well, for verification purposes.)
calculate_only(1 = only perform validation and provide cost without charging account, 0 = perform the complete article request transaction [default])

If successful, output will contain the following information:

ParameterValue
batch(The batch id of the request. You must store this value for use in batch related calls.)
costThe amount charged for this request.

Request Product Reviews (requestProductReviews)

Submits a product reviews request to the system.

ParameterValue
action*requestProductReviews
apikey*(your API key)
keywords*(product names to be reviewed, separated by a newline character)
wordcount*(the minimum number of words for the article: 100,200,300..2000)
count*(number of articles to create for each keyword)
exactkeys(1 = must use exact keywords in the article, 0 = exact keywords not required [default])
english(us = US English [default], uk = UK English)
expedite(1 = 24 hour guranatee, 0 = no time guarantee [default])
bestwriters(1 = 4/5 star writers only, 0 = open to all writers [default])
stylefee(1 = add if making article style requests, 0 = no specific style requests [default])
instructions(OPTIONAL Describe the angle or slant you want the article to have and give any additional article style and format requirements. Requires the style fee.)
slant(OPTIONAL For product reviews only, specify a slant of the review (possible values: "All Positive", "Balanced", and "Amazon Style"). Requires the style fee.)
postbackurl(OPTIONAL URL to post article data to upon article completion. Data will be in POST variables rather than a JSON encoded object. All variables from a batchArticle call will be posted, as shown below. Your API key will be posted to the apikey variable as well, for verification purposes.)
calculate_only(1 = only perform validation and provide cost without charging account, 0 = perform the complete article request transaction [default])

If successful, output will contain the following information:

ParameterValue
batch(The batch id of the request. You must store this value for use in batch related calls.)
costThe amount charged for this request.

Get Batch Articles (batchArticles)

Returns information on all of the articles in a request.

ParameterValue
actionbatchArticles
apikey(your API key)
batch(the batch id returned by the requestArticles command)

If successful, output will contain an array of objects, each containing the following information:

ParameterValue
article(the article id)
keywords(the article keywords)
instructions(the article instructions)
status(the article status: 0 = unassigned, 1.5 = being written, 2 = completed)


Get Article (batchArticle)

Returns an individual article from a batch.

ParameterValue
actionbatchArticle
apikey(your API key)
article(the article id returned by the batchArticles command)

If successful, output will contain an array with the following information:

ParameterValue
article(the article id)
batch(the batch id of the request)
keywords(the article keywords)
instructions(the article instructions)
status(the article status: 0 = unassigned, 1.5 = being written, 2 = completed)
title(if status = 2, the article title, otherwise blank)
body(if status = 2, the article body, otherwise blank)
spunarticle(if status = 2, the spun version of the article)


Get Current Balance (balance

Returns current balance of your account.

ParameterValue
actionbalance
apikey(your API key)

If successful, output will contain an array with the following information:

ParameterValue
balance(current balance)

PHP Example

This example is in PHP, but accessing the API could be done in any language that supports making HTTP requests

$data = array(
    "action" => "batchArticles",
    "apikey" => "00000000-0000-0000-0000-000000000000", # Replace with your API key
    "batch" => "0"
);
$post_options = array(
    "http" => array(
        "method" => "POST",
        "header" => array("Accept: application/json",
        "Content-Type: application/x-www-form-urlencoded"),
        "content" => http_build_query($data)
    )
);

$url = "' . INA_BASE . 'api.php";
$context = stream_context_create($post_options);
$post_result = file_get_contents($url, false, $context);

echo "<pre>";
print_r(json_decode($post_result));
echo "</pre>";

If successful, output will contain an array with the following information:

{
  "success": 1,
  "output": [
    {
      "article": "0",
      "keywords": "test",
      "instructions": "Should be written using: <b>US English</b>. <br /><br />",
      "status": "2"
    },
    {
      "article": "1",
      "keywords": "testing",
      "instructions": "Should be written using: <b>US English</b>. <br /><br />",
      "status": "0"
    }
  ]
}