Documentation

GET audience

Returns the list of audience meta data for the Canada Business website.

Resource URL

http://api.canadabusiness.ca/audience

Parameters

ParameterTypeDescriptionUse withNot with
idnumberSpecify the audience ID to retrieve. E.g. id=1234 or id=1234,2345 for multiple.All*keyword
keywordtextKeywords to search for audience. E.g. keyword=youthAll* (require locale parameter)id
not_keywordtextKeywords to exclude from search for audience. E.g. not_keyword=youthAll* (require locale parameter)id
localeen, frThe language of the data to retrieve. Default is both languages. E.g. locale=en.All
formatxml, jsonFormat of the data returned from the server. Default is XML. E.g. format=json.Tout
* All except 'Use with' or 'Not with' parameters

Example Request

URL

http://api.canadabusiness.ca/audience?id=1234

cURL (PHP)

// path to API resource
    $url="http://api.canadabusiness.ca/audience";

    // open connection
    $ch = curl_init();

    // pass in parameters
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
      'Accept: application/json'
    ));

    // return as string
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_URL, $url);

    // execute
    $data = curl_exec($ch);

    // close connection
    curl_close($ch);
    

Example Response

XML

<audiences total="10">
      <audience id="1234">
        <audience_display_title_en>...</audience_display_title_en>
        <audience_display_title_fr>...</audience_display_title_fr>
        <audience_caption_en>...</audience_caption_en>
        <audience_caption_fr>...</audience_caption_fr>
      </audience>
      ...
    </audiences>
    

JSON

{
      "data": [
        {
          "audience_id": "1234",
          "audience_display_title_en": "...",
          "audience_display_title_fr": "...",
          "audience_caption_en": "...",
          "audience_caption_fr": "..."
        },
        ...
      ],
      "total": 10
    }
    

GET blog

Returns the list of blogs published on the Canada Business website.

Resource URL

http://api.canadabusiness.ca/blog

Parameters

ParameterTypeDescriptionUse withNot with
idnumberSpecify the blog ID to retrieve. E.g. id=1234 or id=1234,2345 for multiple.All*region, naics, audience, keyword, tag
regionnumber (sgc)Blog entry region applicability. Default is all region. E.g. region=35 or region=10,24,35 for multiple.All*id
naicsnumber (naics code)Blog entry industry applicability. Default is all industries. E.g. naics=1234 or naics=1234,2345 for multiple.All*id
audiencenumber (audience id)Blog entry audience applicability. Default is all audience. E.g. audience=12 or audience=12,23,34 for multiple.All*id
not_audiencenumber (audience id)Blog entry audience not applicability. Default is all audience. E.g. not_audience=12 or audience=12,23,34 for multiple.All*id
keywordtextKeywords to search for blog entry. E.g. keyword=businessAll* (require locale parameter)id
not_keywordtextKeywords to exclude from search for blog entry. E.g. not_keyword=businessAll* (require locale parameter)id
tagnumber (tag id)Tag to search for blog entry. E.g. tag=12 or tag=12,23,34 for multiple.All*id
not_tagnumber (tag id)Tag to exclude from search for blog entry. E.g. not_tag=12 or not_tag=12,23,34 for multiple.All*id
sincedatetime (yyyymmdd[hhmmss])Return only blog entries modified (edited) since date. Also returns closed blog entries. E.g. since=20110801 or since=20110909134530.All
limitnumberSet how many records to return. Use in conjunction with page to retrieve large sets of records or provide pagination. Default is to return all. E.g. limit=25.All
pagenumberUse in conjunction (usually a multiplier of) limit to retrieve large sets of records or provide pagination. E.g. limit=25&page=2 returns records from 26 to 50. Default page is 1.All
localeen, frThe language of the data to retrieve. Default is both languages. E.g. locale=en.All
formatxml, jsonFormat of the data returned from the server. Default is XML. E.g. format=json.Tout
* All except 'Use with' or 'Not with' parameters

Example Request

URL

http://api.canadabusiness.ca/blog?id=1234&limit=10

cURL (PHP)

// path to API resource
    $url="http://api.canadabusiness.ca/blog";

    // open connection
    $ch = curl_init();

    // pass in parameters
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
      'Accept: application/json'
    ));

    // return as string
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_URL, $url);

    // execute
    $data = curl_exec($ch);

    // close connection
    curl_close($ch);
    

Example Response

XML

<blog total="100" count="10" page="1" of_page="10">
      <entry id="1234" createDate="2012-02-27T08:30:37-05:00" editDate="2012-03-06T15:30:38-05:00" status="open">
        <blog_source_url_en>http://...</blog_source_url_en>
        <blog_source_url_fr>http://...</blog_source_url_fr>
        <blog_display_title_en>...</blog_display_title_en>
        <blog_display_title_fr>...</blog_display_title_fr>
        <blog_caption_en>...</blog_caption_en>
        <blog_caption_fr>...</blog_caption_fr>
        <blog_body_en>...</blog_body_en>
        <blog_body_fr>...</blog_body_fr>
        <blog_regions>
          <sgc>10</sgc>
          <sgc>11</sgc>
          <sgc>12</sgc>
          ...
        </blog_regions>
        <blog_industries>
          <naics>1234</naics>
          <naics>2345</naics>
          ...
        </blog_industries>
        <blog_audiences>
          <audience id="6789">
            <audience_display_title_en>...</audience_display_title_en>
            <audience_display_title_fr>...</audience_display_title_fr>
          </audience>
          ...
        </blog_audiences>
        <blog_keywords_en>...</blog_keywords_en>
        <blog_keywords_fr>...</blog_keywords_fr>
        <blog_search_terms_en>...</blog_search_terms_en>
        <blog_search_terms_fr>...</blog_search_terms_fr>
        <blog_tags>
          <tag id="7890">
            <tag_en>...</tag_en>
            <tag_fr>...</tag_fr>
          </tag>
          ...
        </blog_tags>
      </entry>
      ...
    </blog>
    

JSON

{
      "data": [
        {
          "id": "1234",
          "create_date": "2012-02-27T08:30:37-05:00",
          "edit_date": "2012-03-06T15:30:38-05:00",
          "expiry_date": "none",
          "status": "open",
          "blog_source_url_en": "http://...",
          "blog_source_url_fr": "http://...",
          "blog_display_title_en": "...",
          "blog_display_title_fr": "...",
          "blog_caption_en": "...",
          "blog_caption_fr": "...",
          "blog_body_en": "...",
          "blog_body_fr": "...",
          "blog_regions": ["10", "11", "12"],
          "blog_industries": ["1234", "2345"],
          "blog_audiences": [
            {
              "audience_id": 6789,
              "audience_display_title_en": "...",
              "audience_display_title_fr": "...",
            },
            ...
          ],
          "blog_keywords_en": "...",
          "blog_keywords_fr": "...",
          "blog_search_terms_en": "...",
          "blog_search_terms_fr": "...",
          "blog_tags": [
            {
              "tag_id": 7890,
              "tag_en": "...",
              "tag_fr": "...",
            },
            ...
          ]
        },
        ...
      ],
      "total": 100,
      "count": 10,
      "page": 1,
      "of_page": 10
    }
    

GET finpur

Returns the list of financing purposes category for the Canada Business website.

Resource URL

http://api.canadabusiness.ca/finpur

Parameters

ParameterTypeDescriptionUse withNot with
idnumberSpecify the financing purposes category ID to retrieve. E.g. id=1234 or id=1234,2345 for multiple.All*keyword
keywordtextKeywords to search for financing purposes category. E.g. keyword=businessAll* (require locale parameter)id
not_keywordtextKeywords to exclude from search for financing purposes category. E.g. not_keyword=businessAll* (require locale parameter)id
localeen, frThe language of the data to retrieve. Default is both languages. E.g. locale=en.All
formatxml, jsonFormat of the data returned from the server. Default is XML. E.g. format=json.Tout
* All except 'Use with' or 'Not with' parameters

Example Request

URL

http://api.canadabusiness.ca/finpur?id=1234

cURL (PHP)

// path to API resource
    $url="http://api.canadabusiness.ca/finpur";

    // open connection
    $ch = curl_init();

    // pass in parameters
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
      'Accept: application/json'
    ));

    // return as string
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_URL, $url);

    // execute
    $data = curl_exec($ch);

    // close connection
    curl_close($ch);
    

Example Response

XML

<categories total="10">
      <category id="1234">
        <category_name_en>...</category_name_en>
        <category_name_fr>...</category_name_fr>
      </category>
      ...
    </categories>
    

JSON

{
      "data": [
        {
          "category_id": "1234",
          "category_name_en": "...",
          "category_name_fr": "..."
        },
        ...
      ],
      "total": 10
    }
    

GET fintype

Returns the list of financing types category for the Canada Business website.

Resource URL

http://api.canadabusiness.ca/fintype

Parameters

ParameterTypeDescriptionUse withNot with
idnumberSpecify the financing types category ID to retrieve. E.g. id=1234 or id=1234,2345 for multiple.All*keyword
keywordtextKeywords to search for financing types category. E.g. keyword=businessAll* (require locale parameter)id
not_keywordtextKeywords to exclude from search for financing types category. E.g. not_keyword=businessAll* (require locale parameter)id
localeen, frThe language of the data to retrieve. Default is both languages. E.g. locale=en.All
formatxml, jsonFormat of the data returned from the server. Default is XML. E.g. format=json.Tout
* All except 'Use with' or 'Not with' parameters

Example Request

URL

http://api.canadabusiness.ca/fintype?id=1234

cURL (PHP)

// path to API resource
    $url="http://api.canadabusiness.ca/fintype";

    // open connection
    $ch = curl_init();

    // pass in parameters
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
      'Accept: application/json'
    ));

    // return as string
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_URL, $url);

    // execute
    $data = curl_exec($ch);

    // close connection
    curl_close($ch);
    

Example Response

XML

<categories total="10">
      <category id="1234">
        <category_name_en>...</category_name_en>
        <category_name_fr>...</category_name_fr>
      </category>
      ...
    </categories>
    

JSON

{
      "data": [
        {
          "category_id": "1234",
          "category_name_en": "...",
          "category_name_fr": "..."
        },
        ...
      ],
      "total": 10
    }
    

GET industry

Returns the list of industry sectors along with common keywords.

Resource URL

http://api.canadabusiness.ca/industry

Parameters

ParameterTypeDescriptionUse withNot with
naicsnumberThe industry sector code (NAICS) to retrieve the industry from. E.g. naics=345678.All*q
keywordcharactersThe keywords to search for (requires locale parameter to be set). E.g. keyword=rest&locale=en.locale**All*
localeen, frThe language of the data to retrieve. Default is both languages. E.g. locale=en.All
formatxml, jsonFormat of the data returned from the server. Default is XML. E.g. format=json.Tout
* All except 'Use with' or 'Not with' parameters
** Required

Example Request

URL

http://api.canadabusiness.ca/industry?id=1234

cURL (PHP)

// path to API resource
    $url="http://api.canadabusiness.ca/industry";

    // open connection
    $ch = curl_init();

    // pass in parameters
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
      'Accept: application/json'
    ));

    // return as string
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_URL, $url);

    // execute
    $data = curl_exec($ch);

    // close connection
    curl_close($ch);
    

Example Response

XML

<?xml version="1.0" encoding="UTF-8"?>
    <industries count="10">
      <industry naics="...">
        <industry_name_en>...</industry_name_en>
        <industry_name_fr>...</industry_name_fr>
        <industry_keywords_en>...</industry_keywords_en>
        <industry_keywords_fr>...</industry_keywords_fr>
      </industry>
      ...
    </industries>
    

JSON

{
      "data": [
        {
          "industry_naics": "123456",
          "industry_name_en": "...",
          "industry_name_fr": "...",
          "industry_keywords_en": "...",
          "industry_keywords_fr": "..."
        },
        ...
      ],
      "count": 10
    }
    

GET links

Returns the list of links to organizations and to external resources that Canada Business maintains.

Resource URL

http://api.canadabusiness.ca/links

Parameters

ParameterTypeDescriptionUse withNot with
idnumberSpecify the link ID to retrieve. E.g. id=1234 or id=1234,2345 for multiple.All*region, naics, audience, keyword, tag
regionnumber (sgc)Links region applicability. Default is all region. E.g. region=35 or region=10,24,35 for multiple.All*id
naicsnumber (naics code)Links industry applicability. Default is all industries. E.g. id=1234 or id=1234,2345 for multiple.All*id
audiencenumber (audience id)Links audience applicability. Default is all audience. E.g. audience=12 or audience=12,23,34 for multiple.All*id
not_audiencenumber (audience id)Links audience not applicability. Default is all audience. E.g. not_audience=12 or not_audience=12,23,34 for multiple.All*id
keywordtextKeywords to search for links. E.g. keyword=businessAll* (require locale parameter)id
not_keywordtextKeywords to exclude from search for links. E.g. not_keyword=businessAll* (require locale parameter)id
tagnumber (tag id)Tag to search for links. E.g. tag=12 or tag=12,23,34 for multiple.All*id
not_tagnumber (tag id)Tag to exclude from search for links. E.g. not_tag=12 or not_tag=12,23,34 for multiple.All*id
sincedatetime (yyyymmdd[hhmmss])Return only links modified (edited) since date. Also returns closed links. E.g. since=20110801 or since=20110909134530.All
limitnumberSet how many records to return. Use in conjunction with page to retrieve large sets of records or provide pagination. Default is to return all. E.g. limit=25.All
pagenumberUse in conjunction (usually a multiplier of) limit to retrieve large sets of records or provide pagination. E.g. limit=25&page=2 returns records from 26 to 50. Default page is 1.All
localeen, frThe language of the data to retrieve. Default is both languages. E.g. locale=en.All
formatxml, jsonFormat of the data returned from the server. Default is XML. E.g. format=json.Tout
* All except 'Use with' or 'Not with' parameters

Example Request

URL

http://api.canadabusiness.ca/links?id=1234&limit=10

cURL (PHP)

// path to API resource
    $url="http://api.canadabusiness.ca/links";

    // open connection
    $ch = curl_init();

    // pass in parameters
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
      'Accept: application/json'
    ));

    // return as string
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_URL, $url);

    // execute
    $data = curl_exec($ch);

    // close connection
    curl_close($ch);
    

Example Response

XML

<links total="100" count="10" page="1" of_page="10">
      <link id="1234">
        <link_display_title_en>...</link_display_title_en>
        <link_display_title_fr>...</link_display_title_fr>
        <link_caption_en>...</link_caption_en>
        <link_caption_fr>...</link_caption_fr>
        <link_url_en>http://...</link_url_en>
        <link_url_fr>http://...</link_url_fr>
        <link_regions>
          <sgc>10</sgc>
          <sgc>11</sgc>
          <sgc>12</sgc>
          ...
        </link_regions>
        <link_industries>
          <naics>1234</naics>
          <naics>2345</naics>
          ...
        </link_industries>
        <link_audiences>
          <audience id="6789">
            <audience_display_title_en>...</audience_display_title_en>
            <audience_display_title_fr>...</audience_display_title_fr>
          </audience>
          ...
        </link_audiences>
        <link_keywords_en>...</link_keywords_en>
        <link_keywords_fr>...</link_keywords_fr>
        <link_tags>
          <tag id="7890">
            <tag_en>...</tag_en>
            <tag_fr>...</tag_fr>
          </tag>
          ...
        </link_tags>
      </link>
      ...
    </links>
    

JSON

{
      "data": [
        {
          "id": "1234",
          "link_display_title_en": "...",
          "link_display_title_fr": "...",
          "link_caption_en": "...",
          "link_caption_fr": "...",
          "link_url_en": "http://...",
          "link_url_fr": "http://...",
          "link_regions": ["10", "11", "12"],
          "link_industries": ["1234", "2345"],
          "link_audiences": [
            {
              "audience_id": 6789,
              "audience_display_title_en": "...",
              "audience_display_title_fr": "...",
            },
            ...
          ],
          "link_keywords_en": "...",
          "link_keywords_fr": "...",
          "link_tags": [
            {
              "tag_id": 7890,
              "tag_en": "...",
              "tag_fr": "...",
            },
            ...
          ]
        },
        ...
      ],
      "total": 100,
      "count": 10,
      "page": "1",
      "of_page": "10"
    }
    

GET location

Returns the list of jurisdictions from Statistics Canada Standard Geographical Classification (SGC). It also contains location coordinates.

Resource URL

http://api.canadabusiness.ca/location

Parameters

ParameterTypeDescriptionUse withNot with
sgcnumberSGC code for the jurisdiction. E.g. sgc=2345677. Appending an * will return all jurisdiction under the specified SGC. E.g. sgc=35* will return all jurisdictions under Ontario. Can be use with q to narrow the keyword search to a province.All
keywordcharactersThe keywords to search for (requires locale parameter). E.g. keyword=ott&locale=en. Can be use with sgc to narrow the keyword search to a province.sgc, locale**All*
localeen, frThe language of the data to retrieve. Default is both languages. E.g. locale=en.All
formatxml, jsonFormat of the data returned from the server. Default is XML. E.g. format=json.Tout
* All except 'Use with' or 'Not with' parameters
** Required

Example Request

URL

http://api.canadabusiness.ca/location?id=1234

cURL (PHP)

// path to API resource
    $url="http://api.canadabusiness.ca/location";

    // open connection
    $ch = curl_init();

    // pass in parameters
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
      'Accept: application/json'
    ));

    // return as string
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_URL, $url);

    // execute
    $data = curl_exec($ch);

    // close connection,

    curl_close($ch);
    

Example Response

XML

<?xml version="1.0" encoding="UTF-8"?>
    <locations total="140" count="125">
      <province sgc="...">
        <province_name_en>...</province_name_en>
        <province_name_fr>...</province_name_fr>
        <regionals total="...">
          <regional sgc="...">
            <regional_name_en>...</regional_name_en>
            <regional_name_fr>...</regional_name_fr>
            <regional_municipalities total="...">
              <regional_municipality sgc="..." latitude="..." longitude="...">
                <regional_municipality_name_en>...</regional_municipality_name_en>
                <regional_municipality_name_fr>...</regional_municipality_name_en>
              </regional_municipality>
              ...
            </regional_municipalities>
          </regional>
          ...
        </regionals>
        ...
        <municipalities total="...">
          <municipality sgc="..." latitude="..." longitude="...">
            <municipality_name_en>...</municipality_name_en>
            <municipality_name_fr>...</municipality_name_fr>
          </municipality>
          ...
        </municipalities>
      </province>
      ...
    </locations>
    

JSON

{
      "data": [
        {
          "province_sgc": "10",
          "province_name_en": "...",
          "province_name_fr": "...",
          "regionals": [
            {
              "regional_sgc": "1234",
              "regional_name_en": "...",
              "regional_name_fr": "...",
              "regional_municipalities": [
                {
                  "municipality_sgc": "123456",
                  "municipality_name_en": "...",
                  "municipality_name_fr": "...",
                  "municipality_latitude": "...",
                  "municipality_longitude": "..."
                },
                ...
              ]
            },
            ...
          ],
          "municipalities": [
            {
              "municipality_sgc": "234567",
              "municipality_name_en": "...",
              "municipality_name_fr": "...",
              "municipality_latitude": "...",
              "municipality_longitude": "..."
            },
            ...
          ]
        },
        ...
      ],
      "total": 140,
      "count": 125
    }
    

GET organization

Returns the list of organizations on the Canada Business website.

Resource URL

http://api.canadabusiness.ca/organization

Parameters

ParameterTypeDescriptionUse withNot with
idnumberSpecify the organization ID to retrieve. E.g. id=1234 or id=1234,2345 for multiple.All*region, keyword
regionnumber (sgc)Organization region applicability. Default is all region. E.g. region=35 or region=10,24,35 for multiple.All*id
keywordtextKeywords to search for organization. E.g. keyword=businessAll* (require locale parameter)id
not_keywordtextKeywords to exclude from search for organization. E.g. not_keyword=businessAll* (require locale parameter)id
sincedatetime (yyyymmdd[hhmmss])Return only organizations modified (edited) since date. Also returns closed organizations. E.g. since=20110801 or since=20110909134530.All
limitnumberSet how many records to return. Use in conjunction with page to retrieve large sets of records or provide pagination. Default is to return all. E.g. limit=25.All
pagenumberUse in conjunction (usually a multiplier of) limit to retrieve large sets of records or provide pagination. E.g. limit=25&page=2 returns records from 26 to 50. Default page is 1.All
localeen, frThe language of the data to retrieve. Default is both languages. E.g. locale=en.All
formatxml, jsonFormat of the data returned from the server. Default is XML. E.g. format=json.Tout
* All except 'Use with' or 'Not with' parameters

Example Request

URL

http://api.canadabusiness.ca/organization?id=1234

cURL (PHP)

// path to API resource
    $url="http://api.canadabusiness.ca/organization";

    // open connection
    $ch = curl_init();

    // pass in parameters
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
      'Accept: application/json'
    ));

    // return as string
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_URL, $url);

    // execute
    $data = curl_exec($ch);

    // close connection
    curl_close($ch);
    

Example Response

XML

<organizations total="100" count="10" page="1" of_page="10">
      <organization id="1234">
        <org_display_title_en>...</org_display_title_en>
        <org_display_title_fr>...</org_display_title_fr>
        <org_description_en>...</org_description_en>
        <org_description_fr>...</org_description_fr>
        <org_url_en>http://...</org_url_en>
        <org_url_fr>http://...</org_url_fr>
        <org_regions>
          <sgc>...</sgc>
          ...
        </org_regions>
        <org_keywords_en>...</org_keywords_en>
        <org_keywords_fr>...</org_keywords_fr>
      </organization>
      ...
    </organizations>
    

JSON

{
      "data": [
        {
          "org_id": "1234",
          "org_display_title_en": "...",
          "org_display_title_fr": "...",
          "org_description_en": "...",
          "org_description_fr": "...",
          "org_url_en": "http://...",
          "org_url_fr": "http://...",
          "org_regions": ["10", ...],
          "org_keywords_en": "...",
          "org_keywords_fr": "..."
        },
        ...
      ],
      "total": 100,
      "count": 10,
      "page": 1,
      "of_page": 10
    }
    

GET page

Returns the list of page summaries published on the Canada Business website.

Resource URL

http://api.canadabusiness.ca/page

Parameters

ParameterTypeDescriptionUse withNot with
idnumberSpecify the page ID to retrieve. E.g. id=1234 or id=1234,2345 for multiple.All*region, naics, audience, keyword, tag
regionnumber (sgc)Page region applicability. Default is all region. E.g. region=35 or region=10,24,35 for multiple.All*id
naicsnumber (naics code)Page industry applicability. Default is all industries. E.g. naics=1234 or naics=1234,2345 for multiple.All*id
keywordtextKeywords to search for page. E.g. keyword=businessAll* (require locale parameter)id
not_keywordtextKeywords to search for page. E.g. not_keyword=businessAll* (require locale parameter)id
tagnumber (tag id)Tag keyword to search for page. E.g. tag=12 or tag=12,23,34 for multiple.All*id
not_tagnumber (tag id)Tag keyword to search for page. E.g. not_tag=12 or not_tag=12,23,34 for multiple.All*id
sincedatetime (yyyymmdd[hhmmss])Return only pages modified (edited) since date. Also returns closed pages. E.g. since=20110801 or since=20110909134530.All
limitnumberSet how many records to return. Use in conjunction with page to retrieve large sets of records or provide pagination. Default is to return all. E.g. limit=25.All
pagenumberUse in conjunction (usually a multiplier of) limit to retrieve large sets of records or provide pagination. E.g. limit=25&page=2 returns records from 26 to 50. Default page is 1.All
localeen, frThe language of the data to retrieve. Default is both languages. E.g. locale=en.All
formatxml, jsonFormat of the data returned from the server. Default is XML. E.g. format=json.Tout
* All except 'Use with' or 'Not with' parameters

Example Request

URL

http://api.canadabusiness.ca/page?id=1234

cURL (PHP)

// path to API resource
    $url="http://api.canadabusiness.ca/page";

    // open connection
    $ch = curl_init();

    // pass in parameters
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
      'Accept: application/json'
    ));

    // return as string
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_URL, $url);

    // execute
    $data = curl_exec($ch);

    // close connection
    curl_close($ch);
    

Example Response

XML

<pages total="10">
      <page id="1234" createDate="2012-02-21T14:52:11-05:00" editDate="2012-03-02T13:44:12-05:00" status="open">
        <page_source_url_en>http://...</page_source_url_en>
        <page_source_url_fr>http://...</page_source_url_fr>
        <page_display_title_en>...</page_display_title_en>
        <page_display_title_fr>...</page_display_title_fr>
        <page_caption_en>...</page_caption_en>
        <page_caption_fr>...</page_caption_fr>
        <page_regions>
          <sgc>10</sgc>
          <sgc>11</sgc>
          <sgc>12</sgc>
          ...
        </page_regions>
        <page_industries>
          <naics>1234</naics>
          <naics>2345</naics>
          ...
        </page_industries>
        <page_keywords_en>...</page_keywords_en>
        <page_keywords_fr>...</page_keywords_fr>
        <page_search_terms_en>...</page_search_terms_en>
        <page_search_terms_fr>...</page_search_terms_fr>
        <page_tags>
          <tag id="6789">
            <tag_en>...</tag_en>
            <tag_fr>...</tag_fr>
          </tag>
          ...
        </page_tags>
      </page>
      ...
    </pages>
    

JSON

{
      "data": [
        {
          "id": "1234",
          "create_date": "2012-02-21T14:52:11-05:00",
          "edit_date": "2012-03-02T13:44:12-05:00",
          "expiry_date": "none",
          "status": "open",
          "page_source_url_en": "http://...",
          "page_source_url_fr": "http://...",
          "page_display_title_en": "...",
          "page_display_title_fr": "...",
          "page_caption_en": "...",
          "page_caption_fr": "...",
          "page_regions": ["10", "11", "12"],
          "page_industries": ["1234", "2345"],
          "page_keywords_en": "...",
          "page_keywords_fr": "...",
          "page_search_terms_en": "...",
          "page_search_terms_fr": "...",
          "page_tags": [
            {
              "tag_id": 7890,
              "tag_en": "...",
              "tag_fr": "...",
            },
            ...
          ]
        },
        ...
      ],
      "total": 10
    }
    

GET program

Returns the list of program summaries on the Canada Business website.

Resource URL

http://api.canadabusiness.ca/program

Parameters

ParameterTypeDescriptionUse withNot with
idnumberSpecify the program ID to retrieve. E.g. id=1234 or id=1234,2345 for multiple.All*region, naics, org, audience, keyword, tag, fpur, ftype
regionnumber (sgc)Program region applicability. Default is all region. E.g. region=35 or region=10,24,35 for multiple.All*id
naicsnumber (naics code)Program industry applicability. Default is all industries. E.g. naics=1234 or naics=1234,2345 for multiple.All*id
orgnumber (organization id)Organization to search program. E.g. org=12 or org=12,23,34 for multiple.All*id
not_orgnumber (organization id)Organization to exclude from search program. E.g. not_org=12 or not_org=12,23,34 for multiple.All*id
audiencenumber (audience id)Program audience applicability. Default is all audience. E.g. audience=12 or audience=12,23,34 for multiple.All*id
not_audiencenumber (audience id)Program audience not applicability. Default is all audience. E.g. not_audience=12 or not_audience=12,23,34 for multiple.All*id
keywordtextKeywords to search for program. E.g. keyword=businessAll* (require locale parameter)id
keywordtextKeywords to exclude from search for program. E.g. not_keyword=businessAll* (require locale parameter)id
tagnumber (tag id)Tag to search for program. E.g. tag=12 or tag=12,23,34 for multiple.All*id
not_tagnumber (tag id)Tag to exclude from search for program. E.g. not_tag=12 or not_tag=12,23,34 for multiple.All*id
fpurnumber (fincancing purpose id)Purpose of financing to search for program. E.g. fpur=12 or fpur=12,23,34 for multiple.All*id
not_fpurnumber (fincancing purpose id)Purpose of financing to exclude from search for program. E.g. not_fpur=12 or not_fpur=12,23,34 for multiple.All*id
ftypenumber (fincancing type id)Types of financing to search for program. E.g. ftype=12 or ftype=12,23,34 for multiple.All*id
not_ftypenumber (fincancing type id)Types of financing to exclude from search for program. E.g. not_ftype=12 or not_ftype=12,23,34 for multiple.All*id
sincedatetime (yyyymmdd[hhmmss])Return only programs modified (edited) since date. Also returns closed programs. E.g. since=20110801 or since=20110909134530.All
limitnumberSet how many records to return. Use in conjunction with page to retrieve large sets of records or provide pagination. Default is to return all. E.g. limit=25.All
pagenumberUse in conjunction (usually a multiplier of) limit to retrieve large sets of records or provide pagination. E.g. limit=25&page=2 returns records from 26 to 50. Default page is 1.All
localeen, frThe language of the data to retrieve. Default is both languages. E.g. locale=en.All
formatxml, jsonFormat of the data returned from the server. Default is XML. E.g. format=json.Tout
* All except 'Use with' or 'Not with' parameters

Example Request

URL

http://api.canadabusiness.ca/program?id=1234&limit=10

cURL (PHP)

// path to API resource
    $url="http://api.canadabusiness.ca/program";

    // open connection
    $ch = curl_init();

    // pass in parameters
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
      'Accept: application/json'
    ));

    // return as string
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_URL, $url);

    // execute
    $data = curl_exec($ch);

    // close connection
    curl_close($ch);
    

Example Response

XML

<programs total="100" count="10" page="1" of_page="10">
      <program id="1234" createDate="2038-01-18T22:14:07-05:00" editDate="2012-01-17T10:06:03-05:00" expiryDate="2012-08-19T16:57:28-04:00" status="open">
        <program_source_url_en>http://...</program_source_url_en>
        <program_source_url_fr>http://...</program_source_url_fr>
        <program_display_title_en>...</program_display_title_en>
        <program_display_title_fr>...</program_display_title_fr>
        <program_caption_en>...</program_caption_en>
        <program_caption_fr>..</program_caption_fr>
        <program_body_en>...</program_body_en>
        <program_body_fr>...</program_body_fr>
        <program_url_en>http://...</program_url_en>
        <program_url_fr>http://...</program_url_fr>
        <program_contact_url_en>http://...</program_contact_url_en>
        <program_contact_url_fr>http://...</program_contact_url_fr>
        <program_forms_url_en>http://...</program_forms_url_en>
        <program_forms_url_fr>http://...</program_forms_url_fr>
        <program_source>
          <organization id="11">
            <org_display_title_en>...</org_display_title_en>
            <org_display_title_fr>...</org_display_title_fr>
          </organization>
          ...
        </program_source>
        <program_regions>
          <sgc>10</sgc>
          <sgc>11</sgc>
          <sgc>12</sgc>
          ...
        </program_regions>
        <program_industries>
          <naics>1234</naics>
          <naics>2345</naics>
          ...
        </program_industries>
        <program_audiences>
          <audience id="6789">
            <audience_display_title_en>...</audience_display_title_en>
            <audience_display_title_fr>...</audience_display_title_fr>
          </audience>
          ...
        </program_audiences>
        <program_keywords_en>...</program_keywords_en>
        <program_keywords_fr>...</program_keywords_fr>
        <program_tags>
          <tag id="7890">
            <tag_en>...</tag_en>
            <tag_fr>...</tag_fr>
          </tag>
          ...
        </program_tags>
        <category_financing_purposes>
          <category id="123">
            <category_name_en>...</category_name_en>
            <category_name_fr>...</category_name_fr>
          </category>
          ...
        </category_financing_purposes>
        <category_financing_types>
          <category id="234">
            <category_name_en>...</category_name_en>
            <category_name_fr>...</category_name_fr>
          </category>
          ...
        </category_financing_types>
      </program>
      ...
    </programs>
    

JSON

{
      "data": [
        {
          "id": "1234",
          "create_date": "2038-01-18T22:14:07-05:00",
          "edit_date": "2012-01-17T10:06:03-05:00",
          "expiry_date": "2012-08-19T12:02:17-04:00",
          "status": "open",
          "program_source_url_en": "http://...",
          "program_source_url_fr": "http://...",
          "program_display_title_en": "...",
          "program_display_title_fr": "...",
          "program_caption_en": "...",
          "program_caption_fr": "...",
          "program_body_en": "...",
          "program_body_fr": "...",
          "program_url_en": "http://...",
          "program_url_fr": "http://...",
          "program_contact_url_en": "http://...",
          "program_contact_url_fr": "http://...",
          "program_forms_url_en": "http://...",
          "program_forms_url_fr": "http://...",
          "program_source": [
            {
              "org_id": 11,
              "org_display_title_en": "...",
              "org_display_title_fr": "..."
            },
            ...
          ],
          "program_regions": ["10", "11", "12"],
          "program_industries": ["1234", "2345"],
          "program_audiences": [
            {
              "audience_id": 6789,
              "audience_display_title_en": "...",
              "audience_display_title_fr": "...",
            },
            ...
          ],
          "program_keywords_en": "...",
          "program_keywords_fr": "...",
          "program_tags": [
            {
              "tag_id": 111,
              "tag_en": "...",
              "tag_fr": "..."
            },
            ...
          ],
          "category_financing_purposes": [
            {
              "category_id": "123",
              "category_name_en": "...",
              "category_name_fr": "..."
            },
            ...
          ],
          "category_financing_types": [
            {
              "category_id": "234",
              "category_name_en": "...",
              "category_name_fr": "..."
            },
            ...
          ]
        },
        ...
      ],
      "total": 100,
      "count": 10,
      "page": 1,
      "of_page": 10
    }
    

GET tag

Returns the list of tags for the Canada Business website.

Resource URL

http://api.canadabusiness.ca/tag

Parameters

ParameterTypeDescriptionUse withNot with
idnumberSpecify the tag ID to retrieve. E.g. id=1234 or id=1234,2345 for multiple.All*keyword
keywordtextKeywords to search for tags. E.g. keyword=businessAll* (require locale parameter)id
not_keywordtextKeywords to exclude from search for tags. E.g. not_keyword=businessAll* (require locale parameter)id
localeen, frThe language of the data to retrieve. Default is both languages. E.g. locale=en.All
formatxml, jsonFormat of the data returned from the server. Default is XML. E.g. format=json.Tout
* All except 'Use with' or 'Not with' parameters

Example Request

URL

http://api.canadabusiness.ca/tag?id=1234

cURL (PHP)

// path to API resource
    $url="http://api.canadabusiness.ca/tag";

    // open connection
    $ch = curl_init();

    // pass in parameters
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
      'Accept: application/json'
    ));

    // return as string
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_URL, $url);

    // execute
    $data = curl_exec($ch);

    // close connection
    curl_close($ch);
    

Example Response

XML

<tags total="10">
      <tag id="1234">
        <tag_en>...</tag_en>
        <tag_fr>...</tag_fr>
      </tag>
      ...
    </tags>
    

JSON

{
      "data": [
        {
          "tag_id": "1234",
          "tag_en": "...",
          "tag_fr": "... "
        },
        ...
      ],
      "total": 10
    }
    

Annex

Metadata

Audience:

Financing (Purpose of):

Financing (Type of):

Industry:

Location:

Tags:

TagDefinitionExclusion
BuyingRelates to a business owner buying or leasing office space, land, equipment, supplies, goods, or services. Dealing with suppliers. 
CustomersRelates to customers of a business. 
E-businessEverything that is directly related to doing business online: creating/managing a website, B2B, online tools that support business transactions. 
EconomyRelates to the economy: federal budget, economic data. 
EmployersManaging employees: recruiting, hiring, training, managing, paying, firing, etc. 
EntrepreneurshipRelated to non-specific entrepreneurship content, such as "is entrepreneurship for you?" Also for content that don’t go anywhere else, like “Year of the entrepreneur” events.Excludes startup, managing, employers, business planning, market research, export, import, taxation, sales
EnvironmentGreening. Programs to help business save energy, reduce pollution. Regulations that serve to protect the environment, technologies that help the environment 
EventsEvents, such as networking events, contests, government consultations, webinars, courses, things that are held on a specific date. For ongoing training content, also see the tag "Training". 
ExportEverything related to exporting abroad (internationally)Excludes extra-provincial trade. See "sales"
FinancingPrograms or arrangements that give businesses money, whether it must be repaid or not. Grants, contributions, loans, loan guaranties, wage subsidies, equity investments, venture capital, angel investments, tax credits, tax deductions, etc. 
Government procurementBusinesses selling their goods and services to all levels of government. 
ImportEverything relating to importing from another country (international). 
InnovationRelates to the creation of better or more effective products, processes, services, technologies, or ideas. Includes R&D, inventions, productivity improvements. 
Intellectual propertyProtecting your ideas: patents, trade-marks, copyrights, industrial designs, integrated circuit topographies, and trade secrets. Also includes licensing your ideas and products. 
ManagingEverything related to managing a business: operations, security, leadership, supply chains, etc.Excludes managing employees (use tag Employer), business planning, startup, market research, export, import, taxation, sales.
MarketingEverything related to marketing activities such as branding, marketing, promotion, advertising.Excludes market research (see "market research")
Market researchEverything related to market research activities, including research methods, surveys, questionnaires, and analysis.Excludes the sources of statistics/data (see "Research and data")
PlanningBusiness planning, business plans, succession planning, export plans, marketing plans, etc. 
ProductsEverything to do with products 
RegulationsDeals with permits, licences, and regulations. Also includes mandatory and voluntary standards or certification. 
Research and dataStatistics, raw data, databases containing raw data, data analysis reports and studies, etc.Excludes market research activities (see "Market Research")
SalesAll selling, including interprovincial trade.Excludes government procurement
StartupActivities related to starting a business: research, registrations, etc. (excludes hiring employees)Excludes hiring employees (see "employers")
TaxationGST, HST, PST, corporate taxes, special taxes, tax credits.Excludes payroll/employee deductions. (see "Employers")
TechnologyRelates to the development of technologies or to the use of technologies 
TourismEverything related to tourism 
TrainingRelates to training, workshops, courses, coaching and support, or other learning opportunities for business owners and/or their employees. 

Government Activities and Initiatives

loading...