API

Content Factory API specification

Content Factory API allows third party software to create tasks in Content Factory for scraping and building articles and getting results back to them when process finish.

Contact Codeamber on Skype for access to a developer copy of Content Factory and your API Key

All content request and response body should be in JSON

If authentication via API key is enabled pass api=API_KEY as GET parameter.

The end user must have Content Factory installed on the same machine as your application.

The users Content Factory must be set up with a minimum of 1 Keyword Phrase present in the Keywords input area. If the request returns few or no results the user should use a broader keyword. For example use “lose weight” rather than “lose weight fast in 10 days”.

The articles produced by Content Factory range between 400 and 600 words, thus the sizeOfArticle parameter of single|double|tripple will return one article, two, three or four merged articles.

Content Factory has many options to customize the articles that are created and all of those options are supported when generating articles via the API provided that they are set prior to API use.

create new task
POST /api/tasks
Request body:

{
    "articleNumber": 10,
    "sizeOfArticle": "single|double|triple|quadruple", // default: single
    "spun": false
}

Response body:

{
    "status": "ACCEPTED|REJECTED",
    "taskId": 1-9999, // actual id of task for future checking
    "message": "reason in case of rejection" // human readable message
}

Get list of all current tasks
GET /api/tasks
Response body:

[
    {
        "taskId": 1
        "status": "IN_QUEUE|PROCESSING|COMPLETED"
    },
    {
        "taskId": 2
        "status": "IN_QUEUE|PROCESSING|COMPLETED"
    },
    ...
]

Get status of one specific task
GET /api/tasks/:taskId
Response body:

{
    "taskId": 1-9999 // same id as :taskId parameter
    "status": "IN_QUEUE|PROCESSING|COMPLETED"
}

Get results of completed task
Only valid for completed tasks
GET /api/tasks/:taskId/result
Response body:

[
    {
        "articleTitle": "title of article",
        "articleBody": "body of article"
    }, ...
]

In case if client asks for result of task which isn’t yet completed return 404 Not Found
Note: After downloading results, task is automatically deleted. If client wants to keep results on server for another call add in GET parameters the following: keepresults=true