How to interface your own server to this Lookup Server

To retrieve data directly from the server without going through the menus, you can construct a URL to instruct the server to do the retrieval.

The simplist thing to to do is to check out the URL Reload anchor that is at the top of each page constructed by the server. Beware though, that URL's have a limit of 256 characters. If you need to do retrievals requiring more that 256 characters to specify, you'll need to use the POST method (instead of GET). Here is a brief rundown of the tags recognized by the server:

URL format:

http://www.census.gov/cdrom/lookup/TAG=VALUE/TAG=VALUE/. . .

Valid Tags:

CMD:
This is the command tag. It instructs the server to perform an action, and it is always required. Recognized values are:
F##:
This is a set of any number of tags: F0, F2, F3, ..., as required. Their values are field names used by the DBUTIL retrieval engine. Please see the examples below for some possible field names.
SEL:
This is a selection tag. It is used to specify a geographic area. Its value has the format VALUE,VALUE,VALUE, ..., where each value in sequence corresonds to the field names described by the F## tags. When RETrieving, you can use any number of SEL tags (to specify any number of geographic areas). When LISTing, you should use only one SEL tag.
DB:
This is the database tag. It specifies what database is to be used for listing and retrieving data. Recognized values are:
LEV:
This is the level tag. It specifies the geographic summary level for retrievals and lists. Only certain summary levels are valid in specific databases. Recognized values are: For a listing of the hierarchy and available levels in each database, select one:
T:
This is a table tag. It is used to specify what tables are to be RETrieved. It is used only when RETrieving data. You can specify any number of T tags. Table names are made up of a P or H, an integer number, and a possible sub-table letter. Eg: "P38"
FMT:
This tag specifies the format of RETrieved data. Recognized values are:

Examples:

OK, so you're all confused. Check out these examples, and if you still need help, drop me a line.

To get a sex breakdown (table P7) of Atlanta city (04000), GA (13), use this URL:
http://www.census.gov/cdrom/lookup/DB=C90STF3A/CMD=RET/LEV=PLACE90/F0=FIPS.STATE/F1=FIPS.PLACE90/SEL=13,04000,Atlanta+City/T=P7

To get the race breakdown (table P9) of Alameda County (001), CA (06), use the following URL:
http://www.census.gov/cdrom/lookup/DB=C90STF3A/CMD=RET/LEV=COUNTY90/F0=FIPS.STATE/F1=FIPS.COUNTY90/SEL=06,001/T=P9

To get a listing of states:
http://www.census.gov/cdrom/lookup/CMD=LIST/DB=C90STF1C/F0=NATION/F0=NATION/F1=STUB.GEO/LEV=STATE/SEL=USA,United+States

To get a map of Washington, DC:
http://www.census.gov/cdrom/lookup/CMD=SHOW_MAP/DB=C90STF1C/F0=FIPS.STATE/F1=STUB.GEO/LEV=STATE/SEL=11,District+of+Columbia

To get the male/female ratio and marital status in Berkeley, CA:
http://www.census.gov/cdrom/lookup/CMD=RET/DB=C90STF3A/F0=FIPS.STATE/F1=FIPS.PLACE90/F2=STUB.GEO/FMT=HTML/LEV=PLACE90/SEL=06,06000,Berkeley+city/T=P7/T=P27/T=P38


Chris.Stuber@Census.GOV