About

Routes & Endpoints

  • GET get-anon-api-key

  • Use: This should be the first call to API, that defines a new instance (website) that will use the MatrixSeo engine.
    What it does: It generates a new api-key.This key will be used to all future calls to the MatrixSeo API.
    Response:
    {"ok":true,"apiKey":"a3b75361bc78a3bd3ec3a429401a5fd3"}

  • GET repopulate-settings

  • Use: It should be used if you want to update the list of search engine IPs and REFERRER strings.
    What it does: It asks for a standard version of search engines IPs and REFERRER strings.
    Response:
    {"ok":true,"refs":["*google.com*","*msn.com*","*yahoo.com*","*bing.com*"],"seips":["64.233.160.0-64.233.191.255","66.102.0.0-66.102.15.255","66.249.64.0-66.249.95.255","72.14.192.0-72.14.255.255","74.125.0.0-74.125.255.255","209.85.128.0-209.85.255.255","216.239.32.0-216.239.63.255","64.68.90.1-64.68.90.255","64.233.173.193-64.233.173.255","66.249.64.1-66.249.79.255","216.239.33.96-216.239.59.128","209.85.238.11","209.85.238.4","69.147.79.131","69.147.79.137","69.147.79.173","72.30.124.128","72.30.124.130","72.30.124.134","72.30.142.24","72.30.142.25","72.30.213.101"]}

  • POST sync-data
  • Use: It should be runned as an hourly CRON JOB.
    What it does: It sends the webpages visited by the search engines to the api in “s_files”, sends information about visitors with search engines referrals in “r_files” and sends page HTML content if requested previously in a SYNC-DATA response with an “action = 2” for the md5 of the url.
    Call: – POST parameter
    {“s_files”:{“2017052313.php”:”::1\thttp:\/\/matrixseo.local\/2017\/05\/23\/fractal\/\t2017-05-23 13:34:30\tFractal DEV Environment\tfractal json status complex layer apis trivial author twitter sets subtle complexities alike generally ease large serialization loading relationships nesting embedding include structures work support outputting custom standards pagination philsturgeon posts jasonclewis greydnls bool sturgeon phil created maintained graham lewis jason daniels questions users restful transformation presentation downloads works view common building yaml total score version latest introduction software license quality barrier create goals affect avoid systematic inconsistent pass stuff passable public lead applications mobile foreach"},"r_files":{"2017052313.php":"::1\thttp:\/\/matrixseo.local\/wp-admin\/post.php?post=14&action=edit\thttp:\/\/matrixseo.local\/2017\/05\/23\/fractal\/\t2017-05-23 13:34:29"},"contents":[]}
    Response:
    {"ok":true,"upgrade":false,"actions":{"1b922c108a90c6cbdcdc92d03fdd1f03":{"1":"database barrier passable"}}}
    Details about the response:
    1. ok = true indicates that the call was successfull.
    2. actions = array of md5(url) = array of action id = payload. For example action id = 1 means a change of the title.Action id = 2 means a request to send the HTML content of the current url.
    3. Upgrade = true indicates the need to purchase premium access to MatrixSeo API servers after you have generated a considerable amount of traffic. When you start receiving upgrade = true you will no longer receive the actions for ALL of your urls, only for a few – until you purchase premium. Data received will still be stored and you will receive the actions for those urls that you didn’t received actions when you will upgrade your api-key to premium.
    4. Upgrade = false indicates that you are using a premium key and you no longer need to upgrade your key or that the traffic generated by your instance is still in acceptable limits for our servers and you don’t need to upgrade right away. However, as premium API key user you will always receive the actions for your urls and the processing of your actions will be moved in our queue to the top.

  • GET refresh-stop-words
  • Use: should be called as a weekly CRON JOB
    What it does: sends the fingerprint of the local stop-words. If the API has a different fingerprint it sends you the updated list of stopwords.
    Call: – GET parameter
    {"checksum":"e2c90a2221d5cde567e6f325180e0c9f"}
    Response:
    {"ok":true,"checksum":"e2c90a2221d5cde567e6f325180e0c9f","checksum_validated":true}
    Details about the response:
    1. Ok = true indicated that the call was successfull.
    2. Checksum = returns the current checksum from the API.
    3. Checksum_validated = true if your checksum is equal to API checksum.
    4. Checksum_validated = false if your checksum is different to API checksum. In this case the API will also attach the list of stopwords.

    Requests

    Requests made to the MatrixSeo API are made over HTTP/HTTPS. The POST data is sent as a gzdeflated JSON encoded string. The GET data must contain the following REQUIRED fields:
    'v' => The wordpress version
    's' => $homeURL
    'k' => $this->APIKey,
    'openssl' => true or false depending on the client’s capabilies to use openssl
    'phpv' => phpversion()
    'gzip' => ‘1’ or ‘0’ depending if the POST request is deflated or not
    'r' => a randoom 10 digits number to avoid caching problems

    The call is sent also as a GET parameter called “action”.

    Responses

    All the MatrixSeo API responses are JSON encoded then gzdeflated and afterwards base64 encoded to ensure a safe transmission over the HTTP/HTTPS protocol. A primary characteristic of MatrixSeo API responses is the “ok” field. If it’s value is “true” the call was successfull.

    Reference →

    Submit a Comment

    Your email address will not be published. Required fields are marked *