# Getting started with implementing a look-up application

This guide takes you through the process of implementing an identifier look-up web application using the [OS Linked Identifiers API](https://github.com/OrdnanceSurvey/OS-Data-Hub-API-Demos/tree/master/OSLinkedIdentifiersAPI) example available from the [OS-Data-Hub-API-Demos](https://github.com/OrdnanceSurvey/OS-Data-Hub-API-Demos/blob/master/OSLinkedIdentifiersAPI/index.html) GitHub repository.

This is a relatively simple working example that demonstrates how to use the OS Linked Identifiers API. It is a good place to start understanding how to integrate the API into a web application.

These examples use plain HTML, CSS and JavaScript. You can run them by opening the index.html in each folder, or you can serve the examples using a web server, for example [live-server](https://www.npmjs.com/package/live-server).

## What you need

* OS Linked Identifiers API added to an API project in the OS Data Hub with an API Key; see [Getting started with an API project](/os-apis/core-concepts/getting-started-with-an-api-project.md) for more information
* An integrated development environment (IDE) like Visual Studio Code

## Instructions

{% stepper %}
{% step %}
**Download the OSLinkedIdentifiersAPI repository**

* Open to the [OS-Data-Hub-API-Demos](https://github.com/OrdnanceSurvey/OS-Data-Hub-API-Demos) GitHub repository.
* Click the green *Code* button.

<figure><img src="/files/MS5m00A6gL0lgfFvW8vI" alt="OS-Data-Hub-API-Demos GitHub repository"><figcaption></figcaption></figure>

* Click *Download ZIP*.

<figure><img src="/files/nUmpLD5VCTjHbTFBTZcu" alt="OS-Data-Hub-API-Demos GitHub repository showing Code > Download ZIP option"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Install the OSLinkedIdentifiersAPI repository**

* Navigate to your Downloads folder and unzip `OS-Data-Hub-API-Demos-master.zip`. Put the newly unzipped folder in your IDE project folder. When you open your IDE, the new files should appear automatically in your project window.
* In your IDE navigate to the `OSLinkedIdentifiersAPI` folder. The folders you have installed contains all the coding required to call and interact with the code libraries.

<figure><img src="/files/LOUA8DCE0D7vGUk0i2tm" alt="OSLinkedIdentifiersAPI folder in IDE project folder"><figcaption></figcaption></figure>

* To launch the web-based application navigate to and open the `index.html` file in the `OSLinkedIdentifiersAPI` folder. Once you've done this, run the application. Note! The launch method may differ between IDEs. Once you've done this, run the application.

<figure><img src="/files/8GC5H4q1aLfxcP1QKsMq" alt="OSLinkedIdentifiersAPI folder with index.html open"><figcaption></figcaption></figure>

Running the project will launch a window in your browser that looks like this:

<figure><img src="/files/3It1cSbt3TxUTEacmtwF" alt="OS Linked Identifiers API demonstrator in browser window"><figcaption></figcaption></figure>

\_The demo application is running on a temporary local server from your own computer. This server is private to your IP address so it cannot be shared with other users. This server will exist as long as your IDE is open. You will have to run the `index.html` file through your IDE each time you wish to use the demo.
{% endstep %}

{% step %}
**Add your API key**

To use the demo, open up your *My projects* page on the OS Data Hub and copy your *Project API Key*. Paste the key into the Project API Key box on the local server demo

<figure><img src="/files/18Bfo3LggTWpjazSErrA" alt="OS Linked Identifiers API demonstrator with input in Project API Key field"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Run web-based demo**

There are four queries to run within the Linked Identifiers API demo application.

* To run the first query, you need to enter a linked identifier ID into the input box and click *Run query*.

<figure><img src="/files/noAp2qldHF8bPBQeR2iT" alt="OS Linked Identifiers API demonstrator with input in Look up ID field"><figcaption></figcaption></figure>

* To run the second query, you need to select a feature type, enter a linked identifier ID into the input box and click *Run query*.

<figure><img src="/files/MzyElSJn9K8LMfOYwItB" alt="OS Linked Identifiers API demonstrator with input in the Look up feature type field"><figcaption></figcaption></figure>

* To run the third query, you need to select an identifier type, enter a linked identifier ID into the input box and click *Run query*.

<figure><img src="/files/cWKWO6UtD5GSxMo76lIn" alt="OS Linked Identifiers API demonstrator with input in the Look up Id by Identifier field"><figcaption></figcaption></figure>

* To run the fourth query, you need to select a correlation method type and click *Run query*.

<figure><img src="/files/onozB7h3spIIDbB4sl4O" alt="OS Linked Identifiers API demonstrator with input in the Get current product version field"><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.os.uk/os-apis/accessing-os-apis/os-linked-identifiers-api/getting-started-with-implementing-a-look-up-application.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
