Developer Function: Server Script: items.GetSiteByName
## Overview
This is the "GetSiteByName method" of the "[Items Object](/en/manual/server-script-items)". It gets site information based on the specified site name.
## Prerequisites
1. This function searches for the "site name" of a site. Please set the site name in advance. Please note that it is not the "[Title](/en/manual/tenant-logo)" of the site.
![image](https://pleasanter.org/binaries/be2492d00d0c4ee0b48cd62f3356ac73)
## Syntax
```
items.GetSiteByName(name)
```
## Parameters
|Parameter|Type|Required|Description|
|:----------|:----------|:---:|:---------------------------|
|name|object|Yes|Specify the site name|
## Return Value
Return an array of "apiModel" for the corresponding site.
## Usage Example
The following example gets site information for the site named "DepartmentMaster."
```
const sites = Array.from(items.GetSiteByName('DepartmentMaster'));
if (sites.length) {
sites.forEach(site => {
context.Log(site.SiteId);
context.Log(site.Title);
context.Log(site.ReferenceType);
});
}
```
## Related Information
・[Manage Table: Server Script](/manual/table-management-server-script)
・[Execution Timing for Each Object](/manual/server-script-conditions)
・[Items Object](/manual/server-script-items)