# 2 Zones API: How to retrieve a zone

*This is a series of articles dedicated to demonstrating how to get acquainted with Openprovider DNS Zones API methods. If you want to go the beginning of this guide, please navigate to the article "[Zones API: How to create a zone](https://openprovider.help/books/api-integrations/page/1-zones-api-how-to-create-a-zone)".*

*This is a second article in a series in which we are going to cover all the basic operations that can be performed via Openprovider API methods regarding DNS zone management. To get more information about our API in general, please use our [documentation portal](http://docs.openprovider.com) as your reference.*

<span>In the previous [article](https://openprovider.help/books/api-integrations/page/1-zones-api-how-to-create-a-zone) we covered how to create a DNS zone. In this one let's look at how we can retrieve it.</span>

<span>Our API has multiple methods that are responsible for either listing a zone's characteristics or its respective contents(records). First let's look at how to search for a particular zone.</span>

## Searching for a zone

<span>For this purpose we're going to use </span>[List Zones](https://docs.openprovider.com/doc/all#operation/ListZones) method. It returns information about an existing DNS zone object.

<div id="bkmrk-use-endpoint-path-be">![Entering Geo Fence icon](https://openprovider.help/uploads/images/gallery/2026-08/embedded-image-9yf3e19w.png)Use endpoint path below. Base URL is determined by both the target environment and API version.</div><div id="bkmrk-get-%7Bbase_url%7D%2Fdns%2Fz">```
<span><strong>GET</strong> <a href="http://docs.openprovider.com/#operation/UpdateApproverEmailAddress"><strong>{base_url}</strong></a>/dns/zones/</span>
```

</div><div id="bkmrk-request-values-name-"><details><summary>REQUEST VALUES</summary>

<table><tbody><tr><td>**<span>Name</span>**</td><td>**<span>Type</span>**</td><td>**<span>Description</span>**</td></tr><tr><td>limit</td><td>integer</td><td>Optional. default value: 100, maximum value: 1000</td></tr><tr><td>offset</td><td>integer</td><td>Optional.<span>master or slave</span></td></tr><tr><td>name\_pattern</td><td>string</td><td><span>**Required**.</span></td></tr><tr><td>type</td><td>string</td><td>**Required** <span>for master zones</span></td></tr><tr><td>with\_records</td><td>boolean</td><td><span>Optional. default value: 0</span></td></tr><tr><td>with\_history</td><td>boolean</td><td><span>Optional. default value: 0</span></td></tr></tbody></table>

</details>  
<div id="bkmrk-request-examplecurl-"><div><details><summary>REQUEST EXAMPLE</summary>

```
curl -X GET \<br></br> 'https://api.openprovider.eu/v1beta/dns/zones?name_pattern=domain.com' \<br></br> -H 'Authorization: ,Bearer 2831a37fb8*******90b5aac822' \
```

</details></div><details><summary>RESPONSE EXAMPLE</summary>

```
{<br></br>"code": 0,<br></br>"data": {<br></br>"active": 1,<br></br>"creation_date": "1328427448",<br></br>"dnskey": "",<br></br>"id": 1,<br></br>"ip": "127.0.0.1",<br></br>"is_deleted": false,<br></br>"is_shadow": false,<br></br>"is_spamexperts_enabled": false,<br></br>"modification_date": "1543388225",<br></br>"name": "domain.com",<br></br>"reseller_id": 1,<br></br>"type": "master"<br></br>},<br></br>"desc": ""<br></br>}
```

</details><div id="bkmrk-response-values-name"><details><summary>RESPONSE VALUES</summary>

<table><tbody><tr><td>**<span>Name</span>**</td><td>**<span>Type</span>**</td><td>**<span>Description</span>**</td></tr><tr><td>type</td><td>string</td></tr><tr><td>name</td><td>string</td></tr><tr><td>ip</td><td>varchar</td></tr><tr><td>creation\_date</td><td>timestamp</td></tr><tr><td>modification\_date</td><td>timestamp</td></tr><tr><td>records</td><td>Will be returned if with\_records = true</td></tr><tr><td>history</td><td><span>Will be returned if with\_history = true</span></td></tr></tbody></table>

</details>## <span>  
Retrieving a zone</span>

<span>Once you you know that the zone in question actually exists, you can retrieve information about it with the help of [Get Zone](https://docs.openprovider.com/doc/all#operation/GetZone) method. This API method is intended to get data about an existing DNS zone object as well as its records.</span>

 ![Entering Geo Fence icon](https://openprovider.help/uploads/images/gallery/2026-08/embedded-image-poq78mtj.png)<span>Use endpoint path below. Base URL is determined by both the target environment and API version.</span>

<div>```
<span><strong>GET</strong> <a href="http://docs.openprovider.com/#operation/UpdateApproverEmailAddress"><strong>{base_url}</strong></a>/dns/zones/{name}</span>
```

</div><div id="bkmrk-request-values-name--1"><details><summary>REQUEST VALUES</summary>

<table><tbody><tr><td>**<span>Name</span>**</td><td>**<span>Type</span>**</td><td>**<span>Description</span>**</td></tr><tr><td>id</td><td>integer</td><td>Optional. default value: 100, maximum value: 1000</td></tr><tr><td>name</td><td>string</td><td><span>**Required**.</span></td></tr><tr><td>with\_records</td><td>boolean</td><td><span>Optional. default value: 0</span></td></tr><tr><td>with\_history</td><td>boolean</td><td><span>Optional. default value: 0</span></td></tr><tr><td><span>with\_dnskey</span></td><td>boolean</td><td><span>Optional. default value: 0</span></td></tr></tbody></table>

</details>  
<div id="bkmrk-request-examplecurl--1"><div><details><summary>REQUEST EXAMPLE</summary>

```
curl -X GET \<br></br> https://api.openprovider.eu/v1beta/dns/zones/demo-domain.nl \<br></br> -H 'Accept: */*' \<br></br> -H 'Authorization: ,Bearer b3920befa9*******f838a2191a44f' \
```

</details></div><details><summary>RESPONSE EXAMPLE</summary>

```
{<br></br> "data": {<br></br> "id": 9146574,<br></br> "reseller_id": 204661,<br></br> "type": "master",<br></br> "name": "demo-domain.nl",<br></br> "active": 1,<br></br> "creation_date": "2019-06-27 06:22:36",<br></br> "modification_date": "2019-06-27 06:22:36"<br></br> }<br></br>}
```

</details><div id="bkmrk-in-the-following-art"><div>In the [following article](https://openprovider.help/books/api-integrations/page/3-zones-api-how-to-modify-a-zone) we are going to modify some of the records of the zone and see how it can be then deleted. </div></div></div></div></div></div></div>