SEO Content Machine API

The SEO Content Machine API allows you to control the program externally by making simple HTTP GET/POST requests.

All responses are sent back in JSON format.

You can test all these commands by pasting the URL into your browser.

You can port forward the API so that it is externally available, which means you can host SCM on a VPS and control it from anywhere in the world.

test

Simple request to see if the scm api server is started and ready.

Sample c# code

WebClient c = new WebClient();

var res = c.DownloadString("http://localhost:8000/test");

Sample JSON result

{ "success": true, "message": null, "result": null }

POST spin

Use the soft spinner over api. Custom syn support is also available.

Sample c#

// Object to pass
dynamic obj = new ExpandoObject();
obj.text = "hello world";
obj.csvprotectedwords = "";

var jsonData = JsonConvert.SerializeObject(obj);

using (WebClient c = new WebClient())
{
var respString = c.UploadString("http://localhost:8008/spin", jsonData);
}

Sample JSON result

{"success": true,"message": null,"result": "{hi|hey world}"}

Sample JSON error

{ "success": false, "message": "You must pass a JSON object. Eg {"text":"hello world", "csvprotectedwords":"word1,word2"}"}

projects

List all the article creator projects currently available.

Sample c# code

WebClient c = new WebClient();

var res = c.DownloadString("http://localhost:8000/projects");

Sample JSON result

{"success":true,"message":null,"result":[{"group":"group","name":"Just a task name","type":"ArticleCreator","id":"007"}]}

project/{id}

Grab all the currently available cached content from the article creator project. You must pass the ID of the project as a url parameter. You can get the ID from the "projects" api call.

Sample c# code

WebClient c = new WebClient();

var str = c.DownloadString("http://localhost:8000/project/007");

Sample JSON result

{ "success": true, "message": null, "result": { "titles": [ "a title" ], "content": [ "hello world" ], "images": [ "sample.jpg" ], "youtubeids": [ "youtubeid" ], "keywords": [ "keyword1" ] } }

Sample JSON error

{ "success": false, "message": "Project with id 3007 not found", "result": null }

project/delete/{id}

Grab all the currently available cached content from the article creator project. You must pass the ID of the project as a url parameter. You can get the ID from the "projects" api call.

Sample c# code

WebClient c = new WebClient();

var str = c.DownloadString("http://localhost:8000/project/007");

Sample JSON result

{ "success": true, "message": null, "result": null}

Sample JSON error

{ "success": false, "message": "Project with id 3007 not found", "result": null }

POST bulkcreate/{id}

Allows you to create new article creator tasks by using an existing task as a template.

For each keyword in the JSON keyword array, it will duplicate the template task & then set the keyword.

Any existing content cache is also duplicated. If you want to scrape new content, clear the cache before using it as a template!

Set the "runnow" value to true if you want to have the task run immediately.

You must pass the ID of the article creator task that is to be used as the "template task" as a url parameter. You can get the ID from the "projects" api call.

After projects are created, you will get a return array with all the Ids and the created keyword so you can track progress of the task.

Sample c# code

// Our data object to pass to API
dynamic obj = new ExpandoObject();
obj.keywords = new string[] { "cats", "dogs",  };
obj.runnow = true;

var jsonData = JsonConvert.SerializeObject(obj);

WebClient c = new WebClient();

var respString = c.UploadString("http://localhost:8008/bulkcreate/007", jsonData);

Sample JSON result

{ "success": true, "message": null, "result": [ { "id": "08128f51d955450ab8c485c68cd31b4b", "keyword": "red alert 3" }, { "id": "4b5952dcb6644e628afbf753f8129236", "keyword": "red alert 4" } ] }

Sample JSON error

{ "success": false, "message": "Project with id 007 not found", "result": null }