Table of Contents
I.Overview
II.Common Nodes
III.Search Types
IV.Terms and Condition Types
V.Login
VI.Query
VII.Error
VIII.Database Details
IX.Search
X.Details
Query Reference

PDquery is used to find a current database or group of databases to search. A query request is formatted as follows.

http://demosrch.publicdata.com/pdquery.php?o=grp_master&dlnumber=DOCS&id=DOCS&disp=XML

Lets take a look at the composition of a PDquery request.

http://demosrch.publicdata.com
- This is the servername. Again we are using demo for this tutorial but you will use one of the searchservers provided to you when you logged in for the day.
pdquery.php
- since we are performing a query from the publicdata system we call pdquery.php
o=grp_master
- o is the parameter name for the group that you wish to preform a query on.
dlnumber=DOCS
- this is same username that you logged in with.
id=DOCS
- This is your accounts daily id number that we obtained when we logged in for the day.
disp=XML
- This is the display format that we wish to recieve. Since we are an API user this will be XML.
Note: We use GET requests in the tutorial but the parameter can be sent using POST. This should be done if the length of the request exceeds the 255 character limit.

Here is the response from that request.


Now Lets break down the XML level by level. The Attributes are in blue.

pddata - see the common nodes section for a description.
pdheaders - see the common nodes section for a description.
pdfooters - see the common nodes section for a description.
querydata
Description:
This node is meant to contain data specific to this query. Stuff that is not part of the group entries tag.
Path:
pddata->querydata
Attributes:
label - This is the name of the group that the query was performed on.
input - This is used to prepopulate fields and is used internally. It should not be very significant for API customers.
title - This is the title for this group. It is human readable and should not be parsed.
type - This is the type of group. ex name. Click here for a description of search types.
fields
Description:
The children of this tag represent the labels for each input field for the form. It is mostly likely not terribly significant for api customers.
Path:
pddata->querydata->fields
diablesearchall
Description:
The presence of this tag means that the group is unsearchable.
Path:
pddata->querydata->disablesearchall
userinput
Description:
This is used to prepopulate fields and is used internally. It should not be very significant for API customers.
Path:
pddata->userinput
user - see the common nodes section for a description.
servers - see the common nodes section for a description.
groupentries
Description:
This node is used to contain all the item nodes in the result.
Path:
pddata->groupentries
item
Description:
This node represents a member of the group that has been queried on. It may have child item nodes. If it does these nodes are what would result from a query on this group.
Path:
pddata->groupentries->item
Attributes:
type - This show what type the item is. It can be either and individual database or a group of databases.
tactype - This attribute signifies what types of terms and conditions are required for accessing and searching the database. If this is not empty an agreement is required. Click here for a description of what agreements are considered valid.
label - This is the name of the item. It is what you will use to perform a query or search on it.