Recommended Sites API

1. Summary

The Recommended Sites data set includes links to federal, state and local websites that are boosted to the top of organic search results for “long-tail” queries to improve the relevancy of web search results. Recommend Sites are editorially reviewed by humans on the SBA.gov team, and represent the best resources when an individual is seeking information on a particular keyword.

The API is RESTful and output formats are available in XML and JSON. There is a DTD for the XML output available.

2. Request Methods

All Recommended Sites

URL template:
http://api.sba.gov/rec_sites/all_sites/keywords.FORMAT
Example URL:
http://api.sba.gov/rec_sites/all_sites/keywords.xml
Parameters:
FORMAT
Either xml or json, case sensitive.

Recommended Sites by Keyword

URL template:
http://api.sba.gov/rec_sites/keywords/KEYWORD.FORMAT
Example URL:
http://api.sba.gov/rec_sites/keywords/contracting.xml
Parameters:
KEYWORD
A search keyword (case insensitive, URL-encoded).
FORMAT
Either xml or json, case sensitive.

Recommended Sites by Category

URL template:
http://api.sba.gov/rec_sites/category/CATEGORY.FORMAT
Example URL:
http://api.sba.gov/rec_sites/category/managing%20a%20business.xml
Parameters:
CATEGORY
A category name (case insensitive, URL-encoded). May be one of the following:
  • managing a business
  • financing a business
  • registering a business
  • starting a business
  • business law
  • other
FORMAT
Either xml or json, case sensitive.

Recommended Sites by Master Term

URL template:
http://api.sba.gov/rec_sites/category/MASTER_TERM.FORMAT
Example URL:
http://api.sba.gov/rec_sites/category/managing%20a%20business.xml
Parameters:
MASTER_TERM
A master search keyword (case insensitive, URL-encoded).
FORMAT
Either xml or json, case sensitive.

Recommended Sites by Domain

URL template:
http://api.sba.gov/rec_sites/keywords/domain/DOMAIN.FORMAT
Example URL:
http://api.sba.gov/rec_sites/keywords/domain/irs.xml
Parameters:
DOMAIN
A second-level domain name, without the .gov, .com, .net, etc. For example, to search IRS.gov, use “irs” as the domain parameter.
FORMAT
Either xml or json, case sensitive.

3. Response Format

XML Format

The XML response is well-documented in the XML DTD for this document type. The document root element's tag-name is <sites>. Each record within the document is contained within a <site> element, containing sub-elements as detailed in the JSON Format documentation below. Each of these sub-elements contains its relevant data as Parsed Character Data.

JSON Format

The JSON response consists of an array of anonymous objects, each of which represents a site. Each of these objects has the following properties:

Field Name Description Type Max.
Length
Possible Values
title The title of the website the url points to. String 550
url The URL of the recommended site. String 500
description A brief description of the recommended site. String 700
keywords A comma-delimited list of keywords in the search for which this recommended site url is returned. The keywords can be a single word or a phrase. The phrase must match the non-geographic search term in order for the recommended site url to be returned. String 8192K
category The name of any of the established categories for pages on SBA.gov. String 45 managing a business
financing a business
registering a business
starting a business
business law
other
orders A numeric field defining the order in which the recommended sites will be displayed. Integer 11
master_term A standard search word or phrase assigned to group of synonyms. String 700