Driving Traffic and Sales with an API

10 years ago there were two reasons I would use an API (Advanced Programmable Interface).
1. To talk to hardware from a software interface.
2. To leverage third party software inside of an application.

Now I see Google, Amazon and Facebook as leaders in their respective industries. They all have API’s that allow developers to send them traffic and information as well as advertise their site. Lets take a look at the three companies and what they’re doing to expand their business with API’s.


Google has a lot of API’s as well as a full blown SDK (Software Developers Kit) on the android. I’ll focus on their web based feeds and services for this article and skip the Android SDK. A quick look at the google code page shows something like 50 to 70 projects, most of which can be considered an API.

Google makes most of it’s money on advertising and they’re able to successfully advertise based on content and data they have mined about you combined with data mined from others.

They have 8 Advertising API’s that allows developers to make use of AdSense in their software.

There are 5 or 6 around geolocating and maps. When you build apps using these api’s and combine them with AdSense, you have location based  marketing tools.

There’s a YouTube api which should ultimately drive traffic to a site they own.

There’s commerce and product search API’s you can use to search your own products and implement their checkout system at a cost. Not only can you read the commerce feed but you can submit your companies product data to it.

There are API’s for GMail and Google Docs which google hopes to compete with Microsoft in those spaces.

I’ll admit there’s some API’s that I have no clue how their making money with but they’re getting developers to use their brand and display their data from their data feeds so there has to be some value in that.


We’ve all seen the Facebook like buttons all over the web. That’s an example of an API being implemented. It gets facebooks logo on your webpage and gives your users a way to share your content on facebook. It’s win/win for both Facebook and the company implementing it.

A look at the Facebook developers page gives you api’s for building facebooks apps and games as well as integrating facebook into a mobile device. They’re giving developers tools to build up the facebook brand and they provide the tools for doing so.

They have a link to a showcase page showing how businesses are leveraging facebook. There are people both building widgets in their website that integrate into facebook as well as full blown applications running inside of facebook.


Amazon has a bunch of API’s for their affiliates, both advertisers and suppliers. There are tools for building lists of products to display on your site, tools for adding products to amazon and tools for building an entire commerce system in your site that are all built on Amazon API’s. Because of these API’s Amazon has sites all over the internet linking to products on their site and complete checkout systems that might not say amazon on them but Amazon is under the covers.

Compare Amazon to Walmart. Walmart has some datafeeds with product info for their advertising programs but that’s about it. They’re not building an API that allows developers to build a business. So they’re raking in the doe with their brick and mortar sites, but Amazon is king of the internet.

My Overall Thought

If you’re an internet based company or a company trying to build it’s internet presence maybe it’s not enough to focus on SEO and online advertising programs because the kings of the internet are building API’s that allow developers to drive traffic and sales to them.

Internal linking with a C# HttpModule

I’m still not sure all this relative vs absolute path internal linking stuff I’m reading about in SEO ins’t due to the fact there’s confusion between what an absolute link is vs a link with a fully qualified domain but here’s a http module that will include the fully qualified domain with protocol for all of your internal links.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;
using System.Text;

namespace MvcApplication1
     public class AbsolutePathRewriter : IHttpModule
        HttpApplication application;
        #region IHttpModule Members
        public void Dispose()

        public void Init(HttpApplication context)
            context.BeginRequest += new EventHandler(OnBeginRequest);
            application = context;

        void OnBeginRequest(object sender, EventArgs e)
            if (application.Request.AppRelativeCurrentExecutionFilePath.Contains(".aspx"))
                application.Response.Filter = new AbsolutePathRewriterStream(application.Response.Filter);

    public class AbsolutePathRewriterStream : MemoryStream
        private Stream outputStream = null;

        public AbsolutePathRewriterStream(Stream output)
            outputStream = output;

        public override void Write(byte[] buffer, int offset, int count)
            string bufferContent = UTF8Encoding.UTF8.GetString(buffer);
            string absolutePath = HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Authority;
            bufferContent = bufferContent.Replace("href=\"/", "href=\"" + absolutePath + "/");
            bufferContent = bufferContent.Replace("href='/", "href='/" + absolutePath + "/");
            outputStream.Write(UTF8Encoding.UTF8.GetBytes(bufferContent), offset, UTF8Encoding.UTF8.GetByteCount(bufferContent));
            base.Write(buffer, offset, count);

MVC Routes and SEO

I’ve been looking at Micrsofts MVC engine lately and I can’t help but think why isn’t the default route more SEO friendly.

When I create a new project this code is placed inside of my global.asax.cs file.

public static void RegisterRoutes(RouteCollection routes)

 "Default", // Route name
 "{controller}/{action}/{id}", // URL with parameters
 new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults


That will give me a product url like this :


But I’d rather have a friendly name in there somewhere like this :


So I think if you go with defualt routing you’re making a mistake.

Microsoft WebsiteSpark

Found this link https://www.microsoft.com/web/websitespark/

Get the visual studio 2010 tools for 3 years and only pay $100 upon exit of the program. Sound good since I’d rather not pay for the full version for something I’m just playing around with at home and not making money with but the sign up sheet failed 😦

I’ll post an update if I ever get it to work.