We encourage developers to link to our site. You can do this by either copying the URL from the Address Bar or constructing your own API/URL (see below). We do request that you create links directly to our site and do not frame the Bank's page with your own site banner.
We now have a new and improved way of linking to document profiles and results. See documentation and examples below.
Documents & Reports (D&R) Invariant API
Documents & Reports (D&R) will support simplified URLs for two kinds of pages: results pages and document profile pages. We will make sure we support the invariant API even if D & R moves to a new platform in the future, so users don't need to change their URLs linking to our documents.
URLs for these pages have three parts. These parts together determine (1) which application to handle the request, (2) the type of page to be returned, and (3) the document or set of documents to be presented on that page.
These three parts together take the following form.
In technical terms, the first part of the URL names the host. The host name will be “documents.worldbank.org”.
Type of request
The page is to be returned, the second part of the URL, is determined by the type of request. The request type will be either “record” or “query”. A “record” request will return the profile (or data record) belonging to an individual document. A “query” request will return a set of documents that match that query.
The third and last part of the URL consists of one or more parameters and their values. These parameters and values specify the document or set of documents presented on the page. The list of parameters and their values is separated from the request type that precedes it by the “?” character.
”Record” requests have a single, required, parameter, “docid”, whose value is the ImageBank or D&R identifier for the profile document to be displayed on the page. The parameter name, “docid”, is separated from its value by the “=” sign.
In addition to the docid parameter, record requests also support an optional parameter, pageLanguage. This parameter determines the language of the page displaying the record and can be used by non-English sites to present ImageBank documents in the language of the site. At present, requests for French, Spanish, Chinese, Arabic and Russian are supported.
Here is an example:
“Query” requests are requests for a set of documents presented as a list on the page returned. Query requests may have one or more parameters. Each additional parameter more tightly specifies or restricts what is to be returned. These parameters correspond to an attribute in a document’s record or profile. Each parameter name is separated from its value by an “=” sign. When more than one parameter / value pair is used, each new pair is separated from the previous by the “&” character. No “&” character is placed before the first pair. To query on more than one value for an attribute, either include additional parameter / value pairs for that attribute (each having a single value), or use the parameter name once and list the values, separating the values by a space. Querying on multiple values for an attribute increases the number of documents returned since documents for each value passed can be included in results.