Authentication
The Baseline API requires the apikey variable with each request followed by your personal account API key. If the key is not provided or is invalid you will receive a 401 Response. Authentication to the API occurs via HTTP Basic Auth. You do not need to provide a password. You must authenticate for all requests.
Where do I get a key?
API keys come in different access levels and pricing options. View our Access Levels page to learn more about the different options available. For information about obtaining an API Key, please contact sales@baselinesyndication.com.
How do I use my key?
Sample Request with API Key: '72Agh048-25FD-4A08-BghB-0FBA05346545'
GET /api/ProjectSearch/Argo?apikey=72Agh048-25FD-4A08-BghB-0FBA05346545 HTTP/1.1
Host: baselineapi.com
Generates Response
HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Content-Length: 434
[{"PROJECT_ID":4826826,"PROJECT_NAME":"Argo","RELEASE_DATE":"10/12/2012","DIRECTOR":"Ben Affleck","ACTOR":"Ben Affleck|Bryan Cranston|Alan Arkin","TYPE_ID":0}]
Usage Examples
cURL
curl http://baselineapi.com/api/ProjectSearch/Argo?apikey=key
PHP
// using standard curl extension
$url = "http://baselineapi.com/api/ProjectSearch/Argo?apikey=key";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $url);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
echo curl_exec($c);
Perl
use strict;
use warnings;
use WWW::Curl::Easy;
my $url = "http://baselineapi.com/api/ProjectSearch/Argo?apikey=key";
my $response;
my $result;
my $curl = new WWW::Curl::Easy;
$curl->setopt(CURLOPT_URL, $url);
open (my $fileb, ">", \$response);
$curl->setopt(CURLOPT_WRITEDATA, $fileb);
$result = $curl->perform();
print($response);
Ruby
require 'net/http'
require 'uri'
url = "http://baselineapi.com/api/ProjectSearch/Argo?apikey=key"
puts Net::HTTP.get(URI.parse(url))
Python
import urllib2
url = "http://baselineapi.com/api/ProjectSearch/Argo?apikey=key"
request = urllib2.Request(url)
response = urllib2.urlopen(request)
print response.read()