> For the complete documentation index, see [llms.txt](https://genomehubs.gitbook.io/genomehubs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://genomehubs.gitbook.io/genomehubs/next-steps/perl-api.md).

# Connect using Perl API

The EasyImport container can be used to run [Ensembl API](http://www.ensembl.org/info/docs/api/index.html) scripts to query databases programmatically. To do this, mount a directory containing your API script onto an EasyImport container and run the script by passing a perl command after the container image name:

Create a hub.txt file with a description of the data available in the track hub:

{% tabs %}
{% tab title="e85" %}

```
$ docker run --rm \
             -u $UID:$GROUPS \
             --name perl-api-exampl \
             --link genomehubs-mysql \
             -v /pat/to/api/srcipt/dir:/import/api/scripts \
             genomehubs/easy-import:17.03 \
             perl /import/api/scripts/example-api-script.pl
```

{% endtab %}

{% tab title="e89" %}

```
$ docker run --rm \
             -u $UID:$GROUPS \
             --name perl-api-exampl \
             --link genomehubs-mysql \
             -v /pat/to/api/srcipt/dir:/import/api/scripts \
             genomehubs/easy-import:17.06 \
             perl /import/api/scripts/example-api-script.pl
```

{% endtab %}
{% endtabs %}
