> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Moz API reference

> API reference for the Moz plugin in Corsair: every `moz.api.*` operation with its input and output types, taken from the plugin's Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Anchor Text

### list

`anchorText.list`

Use this endpoint to get data about anchor text used to link to a specified site. Costs rows per result returned.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.anchorText.list({ site_query: { query: 'moz.com', scope: 'domain' } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object` | Yes | A SiteQuery provides a target URL along with a scope to define how the query is parsed. |
| `offset` | `object` | No | Defines the input parameters used to retrieve anchor text data for a given target. It allows controlling the pagination, and number of results returned. |

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query: string,
>   scope: domain | subdomain | subfolder | url
> }
> ```

> [accordion] offset full type
>
> ```ts theme={null}
> {
>   token?: string | null,
>   limit?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object \| null` | No | — |
| `offset` | `object \| null` | No | — |
| `anchor_texts` | `object[] \| null` | No | — |

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query?: string | null,
>   scope?: string | null,
>   original_site_query?: {
>     query?: string | null,
>     scope?: string | null
>   } | null,
>   site_query_suggestion?: {
>     query?: string | null,
>     scope?: string | null,
>     explanation?: string | null,
>     issue?: string | null
>   } | null
> } | null
> ```

> [accordion] offset full type
>
> ```ts theme={null}
> {
>   provided_token?: string | null,
>   token?: string | null,
>   limit?: number | null
> } | null
> ```

> [accordion] anchor\_texts full type
>
> ```ts theme={null}
> (
>   {
>     text?: string | null,
>     external_root_domains?: number | null,
>     external_pages?: number | null
>   } | null
> )[] | null
> ```

***

## Competitors

### fetch

`competitors.fetch`

Get the top ranking competitors for a given target site, sorted by rivalry descending. Asynchronous: answers with an async\_call to poll with jobs.lookup. Draws on the mozscape rows quota.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.competitors.fetch({ target_query: { query: 'moz.com', scope: 'domain', locale: 'en-US' } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `target_query` | `object` | Yes | The target site to fetch competitors for. |

`data.site.competitor.fetch` is asynchronous: the answer is an
async\_call receipt, and the competitors arrive through jobs.lookup once
the status is complete. It spends the mozscape quota bucket.

> [accordion] target\_query full type
>
> ```ts theme={null}
> {
>   query: string,
>   scope: domain | subdomain | subfolder,
>   locale: en-US | en-GB | en-CA | en-AU
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `async_call` | `object \| null` | No | — |

> [accordion] async\_call full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   action?: string | null,
>   status?: string | null,
>   ttl?: number | null,
>   result?: {
>     target_query?: {
>       query?: string | null,
>       scope?: string | null,
>       locale?: string | null,
>       original_target_query?: {
>         query?: string | null,
>         scope?: string | null,
>         locale?: string | null
>       } | null,
>       suggestion?: {
>         query?: string | null,
>         scope?: string | null,
>         locale?: string | null,
>         explanation?: string | null,
>         issue?: string | null
>       } | null
>     } | null,
>     competitors?: (
>       {
>         domain?: string | null,
>         domain_authority?: number | null,
>         proximity?: number | null,
>         overlap?: number | null,
>         relevance?: number | null,
>         rivalry?: number | null,
>         keywords?: (string | null)[] | null
>       } | null
>     )[] | null
>   } | null,
>   error?: {
>     message?: string | null,
>     code?: number | null,
>     status?: number | null,
>     data?: {
>       explanation?: string | null,
>       issue?: string | null,
>       key?: string | null,
>       value?: Record<string, any> | null
>     } | null
>   } | null
> } | null
> ```

***

## Global

### topDomains

`global.topDomains`

Get the top ranking domains globally. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.global.topDomains({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `object` | No | Control how much data is returned by providing a specific page number (n) and limit to the number of results in a given page. |

> [accordion] page full type
>
> ```ts theme={null}
> {
>   n?: number,
>   limit?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `object \| null` | No | — |
| `top_domains` | `object[] \| null` | No | — |

> [accordion] page full type
>
> ```ts theme={null}
> {
>   n?: number | null,
>   limit?: number | null
> } | null
> ```

> [accordion] top\_domains full type
>
> ```ts theme={null}
> (
>   {
>     page?: string | null,
>     subdomain?: string | null,
>     root_domain?: string | null,
>     title?: string | null,
>     last_crawled?: string | null,
>     http_code?: number | null,
>     pages_to_page?: number | null,
>     nofollow_pages_to_page?: number | null,
>     redirect_pages_to_page?: number | null,
>     external_pages_to_page?: number | null,
>     external_nofollow_pages_to_page?: number | null,
>     external_redirect_pages_to_page?: number | null,
>     deleted_pages_to_page?: number | null,
>     root_domains_to_page?: number | null,
>     indirect_root_domains_to_page?: number | null,
>     deleted_root_domains_to_page?: number | null,
>     nofollow_root_domains_to_page?: number | null,
>     pages_to_subdomain?: number | null,
>     nofollow_pages_to_subdomain?: number | null,
>     redirect_pages_to_subdomain?: number | null,
>     external_pages_to_subdomain?: number | null,
>     external_nofollow_pages_to_subdomain?: number | null,
>     external_redirect_pages_to_subdomain?: number | null,
>     deleted_pages_to_subdomain?: number | null,
>     root_domains_to_subdomain?: number | null,
>     deleted_root_domains_to_subdomain?: number | null,
>     nofollow_root_domains_to_subdomain?: number | null,
>     pages_to_root_domain?: number | null,
>     nofollow_pages_to_root_domain?: number | null,
>     redirect_pages_to_root_domain?: number | null,
>     external_pages_to_root_domain?: number | null,
>     external_indirect_pages_to_root_domain?: number | null,
>     external_nofollow_pages_to_root_domain?: number | null,
>     external_redirect_pages_to_root_domain?: number | null,
>     deleted_pages_to_root_domain?: number | null,
>     root_domains_to_root_domain?: number | null,
>     indirect_root_domains_to_root_domain?: number | null,
>     deleted_root_domains_to_root_domain?: number | null,
>     nofollow_root_domains_to_root_domain?: number | null,
>     page_authority?: number | null,
>     domain_authority?: number | null,
>     link_propensity?: number | null,
>     spam_score?: number | null,
>     root_domains_from_page?: number | null,
>     nofollow_root_domains_from_page?: number | null,
>     pages_from_page?: number | null,
>     nofollow_pages_from_page?: number | null,
>     root_domains_from_root_domain?: number | null,
>     nofollow_root_domains_from_root_domain?: number | null,
>     pages_from_root_domain?: number | null,
>     nofollow_pages_from_root_domain?: number | null,
>     pages_crawled_from_root_domain?: number | null
>   } | null
> )[] | null
> ```

***

### topPages

`global.topPages`

Get the top ranking pages globally. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.global.topPages({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `object` | No | Control how much data is returned by providing a specific page number (n) and limit to the number of results in a given page. |

> [accordion] page full type
>
> ```ts theme={null}
> {
>   n?: number,
>   limit?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `object \| null` | No | — |
| `top_pages` | `object[] \| null` | No | — |

> [accordion] page full type
>
> ```ts theme={null}
> {
>   n?: number | null,
>   limit?: number | null
> } | null
> ```

> [accordion] top\_pages full type
>
> ```ts theme={null}
> (
>   {
>     page?: string | null,
>     subdomain?: string | null,
>     root_domain?: string | null,
>     title?: string | null,
>     last_crawled?: string | null,
>     http_code?: number | null,
>     pages_to_page?: number | null,
>     nofollow_pages_to_page?: number | null,
>     redirect_pages_to_page?: number | null,
>     external_pages_to_page?: number | null,
>     external_nofollow_pages_to_page?: number | null,
>     external_redirect_pages_to_page?: number | null,
>     deleted_pages_to_page?: number | null,
>     root_domains_to_page?: number | null,
>     indirect_root_domains_to_page?: number | null,
>     deleted_root_domains_to_page?: number | null,
>     nofollow_root_domains_to_page?: number | null,
>     pages_to_subdomain?: number | null,
>     nofollow_pages_to_subdomain?: number | null,
>     redirect_pages_to_subdomain?: number | null,
>     external_pages_to_subdomain?: number | null,
>     external_nofollow_pages_to_subdomain?: number | null,
>     external_redirect_pages_to_subdomain?: number | null,
>     deleted_pages_to_subdomain?: number | null,
>     root_domains_to_subdomain?: number | null,
>     deleted_root_domains_to_subdomain?: number | null,
>     nofollow_root_domains_to_subdomain?: number | null,
>     pages_to_root_domain?: number | null,
>     nofollow_pages_to_root_domain?: number | null,
>     redirect_pages_to_root_domain?: number | null,
>     external_pages_to_root_domain?: number | null,
>     external_indirect_pages_to_root_domain?: number | null,
>     external_nofollow_pages_to_root_domain?: number | null,
>     external_redirect_pages_to_root_domain?: number | null,
>     deleted_pages_to_root_domain?: number | null,
>     root_domains_to_root_domain?: number | null,
>     indirect_root_domains_to_root_domain?: number | null,
>     deleted_root_domains_to_root_domain?: number | null,
>     nofollow_root_domains_to_root_domain?: number | null,
>     page_authority?: number | null,
>     domain_authority?: number | null,
>     link_propensity?: number | null,
>     spam_score?: number | null,
>     root_domains_from_page?: number | null,
>     nofollow_root_domains_from_page?: number | null,
>     pages_from_page?: number | null,
>     nofollow_pages_from_page?: number | null,
>     root_domains_from_root_domain?: number | null,
>     nofollow_root_domains_from_root_domain?: number | null,
>     pages_from_root_domain?: number | null,
>     nofollow_pages_from_root_domain?: number | null,
>     pages_crawled_from_root_domain?: number | null
>   } | null
> )[] | null
> ```

***

## Index

### fetch

`index.fetch`

Use this endpoint to track when the index is updated with new data. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.index.fetch({});
```

**Input:** `Record<string, any>`

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `index_id` | `string \| null` | No | — |

***

## Jobs

### lookup

`jobs.lookup`

Fetch an `async_call` by ID to retrieve the result or error. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.jobs.lookup({ id: (await corsair.moz.api.test.pingAsync({ message: 'hi' })).async_call?.id ?? '' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the `async_call` to lookup. This is the `async_call.id` returned by the asynchronous action that started the request. |

`async.call.lookup` is free and safe to poll every five seconds. Pass
the `async_call.id` from the async method's response (above, a
test.pingAsync call). A
completed call carries exactly one of async\_call.result and
async\_call.error. Poll within the current `ttl`: once a completed call
is first retrieved, Moz keeps it for twenty more seconds, so use the
result or error from that first completed response.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `async_call` | `object \| null` | No | — |

> [accordion] async\_call full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   action?: string | null,
>   status?: string | null,
>   ttl?: number | null,
>   result?: Record<string, any> | null,
>   error?: {
>     message?: string | null,
>     code?: number | null,
>     status?: number | null,
>     data?: {
>       explanation?: string | null,
>       issue?: string | null,
>       key?: string | null,
>       value?: Record<string, any> | null
>     } | null
>   } | null
> } | null
> ```

***

## Keywords

### difficulty

`keywords.difficulty`

Retrieve the most recent difficulty metric for any keyword that exists in our database. Costs 1 row per call.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.keywords.difficulty({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `serp_query` | `object` | Yes | The SERP query object describes a keyword or search phrase in combination with several options to specify how the query is run (i.e. how a SERP should be retrieved for this keyword if necessary). |
| `options` | `object` | No | Options to further refine the keyword metrics that are returned. `include_intent` defaults to `false` if not provided. |

> [accordion] serp\_query full type
>
> ```ts theme={null}
> {
>   keyword: string,
>   locale: string,
>   device: desktop | mobile_android | mobile_ios,
>   engine: google | bing | yahoo,
>   vicinity?: string
> }
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   include_intent?: boolean,
>   max_age?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `keyword_metrics` | `object \| null` | No | — |
| `serp_query` | `object \| null` | No | — |
| `options` | `object \| null` | No | — |

> [accordion] keyword\_metrics full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     collected_at?: string | null
>   } | null,
>   volume?: any,
>   difficulty?: number | null,
>   organic_ctr?: any,
>   priority?: any,
>   intent?: any
> } | null
> ```

> [accordion] serp\_query full type
>
> ```ts theme={null}
> {
>   keyword?: string | null,
>   locale?: string | null,
>   device?: string | null,
>   engine?: string | null,
>   vicinity?: string | null
> } | null
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   include_intent?: boolean | number | null,
>   max_age?: number | null
> } | null
> ```

***

### generateMetrics

`keywords.generateMetrics`

Trigger on-demand collection of a SERP and return the refreshed metrics once collection is complete. Asynchronous: answers with an async\_call to poll with jobs.lookup. Quota cost varies by request. Runs a fresh on-demand SERP collection, billed per call.

**Risk:** `destructive`

```ts theme={null}
await corsair.moz.api.keywords.generateMetrics({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `serp_query` | `object` | Yes | The SERP query object describes a keyword or search phrase in combination with several options to specify how the query is run (i.e. how a SERP should be retrieved for this keyword if necessary). |

> [accordion] serp\_query full type
>
> ```ts theme={null}
> {
>   keyword: string,
>   locale: string,
>   device: desktop | mobile_android | mobile_ios,
>   engine: google | bing | yahoo,
>   vicinity?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `async_call` | `object \| null` | No | — |

> [accordion] async\_call full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   action?: string | null,
>   status?: string | null,
>   ttl?: number | null,
>   result?: {
>     keyword_metrics?: {
>       volume?: number | null,
>       difficulty?: number | null,
>       organic_ctr?: number | null,
>       priority?: number | null,
>       intent?: {
>         primary_intents?: (string | null)[] | null,
>         all_intents?: (
>           {
>             label?: string | null,
>             score?: number | null
>           } | null
>         )[] | null
>       } | null
>     } | null,
>     serp_query?: {
>       keyword?: string | null,
>       locale?: string | null,
>       device?: string | null,
>       engine?: string | null,
>       vicinity?: string | null
>     } | null
>   } | null,
>   error?: {
>     message?: string | null,
>     code?: number | null,
>     status?: number | null,
>     data?: {
>       explanation?: string | null,
>       issue?: string | null,
>       key?: string | null,
>       value?: Record<string, any> | null
>     } | null
>   } | null
> } | null
> ```

***

### generateSerp

`keywords.generateSerp`

Trigger on-demand collection of a SERP, returning it upon completion. Asynchronous: answers with an async\_call to poll with jobs.lookup. Quota cost varies by request. Runs a fresh on-demand SERP collection, billed per call.

**Risk:** `destructive`

```ts theme={null}
await corsair.moz.api.keywords.generateSerp({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `serp_query` | `object` | Yes | The SERP query object describes a keyword or search phrase in combination with several options to specify how the query is run (i.e. how a SERP should be retrieved for this keyword if necessary). |

> [accordion] serp\_query full type
>
> ```ts theme={null}
> {
>   keyword: string,
>   locale: string,
>   device: desktop | mobile_android | mobile_ios,
>   engine: google | bing | yahoo,
>   vicinity?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `async_call` | `object \| null` | No | — |

> [accordion] async\_call full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   action?: string | null,
>   status?: string | null,
>   ttl?: number | null,
>   result?: {
>     serp_query?: {
>       keyword?: string | null,
>       locale?: string | null,
>       device?: string | null,
>       engine?: string | null,
>       vicinity?: string | null
>     } | null,
>     serp?: {
>       metadata?: {
>         collected_at?: string | null
>       } | null,
>       metrics?: {
>         volume?: number | null,
>         difficulty?: number | null,
>         organic_ctr?: number | null,
>         priority?: number | null,
>         intent?: {
>           primary_intents?: (string | null)[] | null,
>           all_intents?: (
>             {
>               label?: string | null,
>               score?: number | null
>             } | null
>           )[] | null
>         } | null
>       } | null,
>       results?: (
>         {
>           type?: string | null,
>           description?: string | null,
>           position?: string | null,
>           title?: string | null,
>           traits?: (string | null)[] | null,
>           url?: string | null,
>           price?: string | null,
>           rating?: string | null,
>           reviews?: string | null,
>           question?: string | null,
>           displayed_path?: string | null,
>           job_title?: string | null,
>           job_employer?: string | null,
>           job_location?: string | null,
>           job_source?: string | null,
>           job_posted_on?: string | null,
>           job_travel_time?: string | null,
>           job_details?: string | null,
>           business_name?: string | null,
>           related_searches?: (string | null)[] | null,
>           results?: (Record<string, any> | null)[] | null,
>           sitelinks?: (Record<string, any> | null)[] | null,
>           one_line_sitelinks?: (Record<string, any> | null)[] | null,
>           position_index?: number | null,
>           rank?: number | null,
>           brand_authority?: number | null,
>           url_metrics?: {
>             page?: string | null,
>             subdomain?: string | null,
>             root_domain?: string | null,
>             title?: string | null,
>             last_crawled?: string | null,
>             http_code?: number | null,
>             pages_to_page?: number | null,
>             nofollow_pages_to_page?: number | null,
>             redirect_pages_to_page?: number | null,
>             external_pages_to_page?: number | null,
>             external_nofollow_pages_to_page?: number | null,
>             external_redirect_pages_to_page?: number | null,
>             deleted_pages_to_page?: number | null,
>             root_domains_to_page?: number | null,
>             indirect_root_domains_to_page?: number | null,
>             deleted_root_domains_to_page?: number | null,
>             nofollow_root_domains_to_page?: number | null,
>             pages_to_subdomain?: number | null,
>             nofollow_pages_to_subdomain?: number | null,
>             redirect_pages_to_subdomain?: number | null,
>             external_pages_to_subdomain?: number | null,
>             external_nofollow_pages_to_subdomain?: number | null,
>             external_redirect_pages_to_subdomain?: number | null,
>             deleted_pages_to_subdomain?: number | null,
>             root_domains_to_subdomain?: number | null,
>             deleted_root_domains_to_subdomain?: number | null,
>             nofollow_root_domains_to_subdomain?: number | null,
>             pages_to_root_domain?: number | null,
>             nofollow_pages_to_root_domain?: number | null,
>             redirect_pages_to_root_domain?: number | null,
>             external_pages_to_root_domain?: number | null,
>             external_indirect_pages_to_root_domain?: number | null,
>             external_nofollow_pages_to_root_domain?: number | null,
>             external_redirect_pages_to_root_domain?: number | null,
>             deleted_pages_to_root_domain?: number | null,
>             root_domains_to_root_domain?: number | null,
>             indirect_root_domains_to_root_domain?: number | null,
>             deleted_root_domains_to_root_domain?: number | null,
>             nofollow_root_domains_to_root_domain?: number | null,
>             page_authority?: number | null,
>             domain_authority?: number | null,
>             link_propensity?: number | null,
>             spam_score?: number | null,
>             root_domains_from_page?: number | null,
>             nofollow_root_domains_from_page?: number | null,
>             pages_from_page?: number | null,
>             nofollow_pages_from_page?: number | null,
>             root_domains_from_root_domain?: number | null,
>             nofollow_root_domains_from_root_domain?: number | null,
>             pages_from_root_domain?: number | null,
>             nofollow_pages_from_root_domain?: number | null,
>             pages_crawled_from_root_domain?: number | null
>           } | null
>         } | null
>       )[] | null
>     } | null
>   } | null,
>   error?: {
>     message?: string | null,
>     code?: number | null,
>     status?: number | null,
>     data?: {
>       explanation?: string | null,
>       issue?: string | null,
>       key?: string | null,
>       value?: Record<string, any> | null
>     } | null
>   } | null
> } | null
> ```

***

### intent

`keywords.intent`

Retrieve the most recent search intent scores (navigational, informational, commercial, and transactional) for any keyword that exists in our database. Costs 1 row per call.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.keywords.intent({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `serp_query` | `object` | Yes | The SERP query object describes a keyword or search phrase in combination with several options to specify how the query is run (i.e. how a SERP should be retrieved for this keyword if necessary). |
| `options` | `object` | No | Options to further refine the keyword metrics that are returned. `include_intent` defaults to `false` if not provided. |

> [accordion] serp\_query full type
>
> ```ts theme={null}
> {
>   keyword: string,
>   locale: string,
>   device: desktop | mobile_android | mobile_ios,
>   engine: google | bing | yahoo,
>   vicinity?: string
> }
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   include_intent?: boolean,
>   max_age?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `keyword_metrics` | `object \| null` | No | — |
| `serp_query` | `object \| null` | No | — |
| `options` | `object \| null` | No | — |

> [accordion] keyword\_metrics full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     collected_at?: string | null
>   } | null,
>   volume?: any,
>   difficulty?: any,
>   organic_ctr?: any,
>   priority?: any,
>   intent?: {
>     primary_intents?: (string | null)[] | null,
>     all_intents?: (
>       {
>         label?: string | null,
>         score?: number | null
>       } | null
>     )[] | null
>   } | null
> } | null
> ```

> [accordion] serp\_query full type
>
> ```ts theme={null}
> {
>   keyword?: string | null,
>   locale?: string | null,
>   device?: string | null,
>   engine?: string | null,
>   vicinity?: string | null
> } | null
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   include_intent?: boolean | number | null,
>   max_age?: number | null
> } | null
> ```

***

### metrics

`keywords.metrics`

Retrieve the most recent difficulty, volume, organic CTR, priority, and/or search intent metrics for any keyword that exists in our database. Costs one row per returned metric value: 4, plus 1 for search intent, which is opt-in with options.include\_intent until 2026-12-01 and returned by default from then.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.keywords.metrics({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `serp_query` | `object` | Yes | The SERP query object describes a keyword or search phrase in combination with several options to specify how the query is run (i.e. how a SERP should be retrieved for this keyword if necessary). |
| `options` | `object` | No | Options to further refine the keyword metrics that are returned. `include_intent` defaults to `false` if not provided, until December 1, 2026; from that date intent is returned by default. |

`data.keyword.metrics.fetch` returns difficulty, volume, organic CTR and
priority for one `serp_query` (four rows). Search intent is opt-in with
`options.include_intent` until December 1, 2026 and on by default from
that date; it adds one row when Moz has intent for the SERP.

> [accordion] serp\_query full type
>
> ```ts theme={null}
> {
>   keyword: string,
>   locale: string,
>   device: desktop | mobile_android | mobile_ios,
>   engine: google | bing | yahoo,
>   vicinity?: string
> }
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   include_intent?: boolean,
>   max_age?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `keyword_metrics` | `object \| null` | No | — |
| `serp_query` | `object \| null` | No | — |
| `options` | `object \| null` | No | — |

> [accordion] keyword\_metrics full type
>
> ```ts theme={null}
> {
>   volume?: number | null,
>   difficulty?: number | null,
>   organic_ctr?: number | null,
>   priority?: number | null,
>   intent?: {
>     primary_intents?: (string | null)[] | null,
>     all_intents?: (
>       {
>         label?: string | null,
>         score?: number | null
>       } | null
>     )[] | null
>   } | null,
>   metadata?: {
>     collected_at?: string | null
>   } | null
> } | null
> ```

> [accordion] serp\_query full type
>
> ```ts theme={null}
> {
>   keyword?: string | null,
>   locale?: string | null,
>   device?: string | null,
>   engine?: string | null,
>   vicinity?: string | null
> } | null
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   include_intent?: boolean | number | null,
>   max_age?: number | null
> } | null
> ```

***

### metricsMultiple

`keywords.metricsMultiple`

Retrieve difficulty, volume, organic CTR, priority, and search intent metrics for up to 50 keywords in a single request. Costs one row per returned metric value, up to 5 per keyword; null metrics and keywords in errors\_by\_serp\_query cost nothing.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.keywords.metricsMultiple({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `serp_queries` | `object[]` | Yes | — |

> [accordion] serp\_queries full type
>
> ```ts theme={null}
> {
>   keyword: string,
>   locale: string,
>   device: desktop | mobile_android | mobile_ios,
>   engine: google | bing | yahoo,
>   vicinity?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `results_by_serp_query` | `object[] \| null` | No | — |
| `errors_by_serp_query` | `object[] \| null` | No | — |

> [accordion] results\_by\_serp\_query full type
>
> ```ts theme={null}
> (
>   {
>     serp_query?: {
>       keyword?: string | null,
>       locale?: string | null,
>       device?: string | null,
>       engine?: string | null,
>       vicinity?: string | null
>     } | null,
>     keyword_metrics?: {
>       volume?: number | null,
>       difficulty?: number | null,
>       organic_ctr?: number | null,
>       priority?: number | null,
>       intent?: {
>         primary_intents?: (string | null)[] | null,
>         all_intents?: (
>           {
>             label?: string | null,
>             score?: number | null
>           } | null
>         )[] | null
>       } | null
>     } | null
>   } | null
> )[] | null
> ```

> [accordion] errors\_by\_serp\_query full type
>
> ```ts theme={null}
> (
>   {
>     serp_query?: {
>       keyword?: string | null,
>       locale?: string | null,
>       device?: string | null,
>       engine?: string | null,
>       vicinity?: string | null
>     } | null,
>     error?: {
>       message?: string | null,
>       name?: string | null,
>       data?: {
>         key?: string | null,
>         value?: string | null
>       } | null,
>       httpStatus?: number | null,
>       jsonrpcCode?: number | null
>     } | null
>   } | null
> )[] | null
> ```

***

### opportunity

`keywords.opportunity`

Retrieve the most recent organic CTR (opportunity) metric for any keyword that exists in our database. Costs 1 row per call.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.keywords.opportunity({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `serp_query` | `object` | Yes | The SERP query object describes a keyword or search phrase in combination with several options to specify how the query is run (i.e. how a SERP should be retrieved for this keyword if necessary). |
| `options` | `object` | No | Options to further refine the keyword metrics that are returned. `include_intent` defaults to `false` if not provided. |

> [accordion] serp\_query full type
>
> ```ts theme={null}
> {
>   keyword: string,
>   locale: string,
>   device: desktop | mobile_android | mobile_ios,
>   engine: google | bing | yahoo,
>   vicinity?: string
> }
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   include_intent?: boolean,
>   max_age?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `keyword_metrics` | `object \| null` | No | — |
| `serp_query` | `object \| null` | No | — |
| `options` | `object \| null` | No | — |

> [accordion] keyword\_metrics full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     collected_at?: string | null
>   } | null,
>   volume?: any,
>   difficulty?: any,
>   organic_ctr?: number | null,
>   priority?: any,
>   intent?: any
> } | null
> ```

> [accordion] serp\_query full type
>
> ```ts theme={null}
> {
>   keyword?: string | null,
>   locale?: string | null,
>   device?: string | null,
>   engine?: string | null,
>   vicinity?: string | null
> } | null
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   include_intent?: boolean | number | null,
>   max_age?: number | null
> } | null
> ```

***

### priority

`keywords.priority`

Retrieve the most recent priority metric for any keyword that exists in our database. Costs 1 row per call.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.keywords.priority({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `serp_query` | `object` | Yes | The SERP query object describes a keyword or search phrase in combination with several options to specify how the query is run (i.e. how a SERP should be retrieved for this keyword if necessary). |
| `options` | `object` | No | Options to further refine the keyword metrics that are returned. `include_intent` defaults to `false` if not provided. |

> [accordion] serp\_query full type
>
> ```ts theme={null}
> {
>   keyword: string,
>   locale: string,
>   device: desktop | mobile_android | mobile_ios,
>   engine: google | bing | yahoo,
>   vicinity?: string
> }
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   include_intent?: boolean,
>   max_age?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `keyword_metrics` | `object \| null` | No | — |
| `serp_query` | `object \| null` | No | — |
| `options` | `object \| null` | No | — |

> [accordion] keyword\_metrics full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     collected_at?: string | null
>   } | null,
>   volume?: any,
>   difficulty?: any,
>   organic_ctr?: any,
>   priority?: number | null,
>   intent?: any
> } | null
> ```

> [accordion] serp\_query full type
>
> ```ts theme={null}
> {
>   keyword?: string | null,
>   locale?: string | null,
>   device?: string | null,
>   engine?: string | null,
>   vicinity?: string | null
> } | null
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   include_intent?: boolean | number | null,
>   max_age?: number | null
> } | null
> ```

***

### serp

`keywords.serp`

Retrieve the most recently collected SERP for a given query. Quota cost varies by request.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.keywords.serp({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `serp_query` | `object` | Yes | The SERP query object describes a keyword or search phrase in combination with several options to specify how the query is run (i.e. how a SERP should be retrieved for this keyword if necessary). |
| `options` | `object` | No | Options to further refine the cached SERP that is returned. |

> [accordion] serp\_query full type
>
> ```ts theme={null}
> {
>   keyword: string,
>   locale: string,
>   device: desktop | mobile_android | mobile_ios,
>   engine: google | bing | yahoo,
>   vicinity?: string
> }
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   max_age?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `serp_query` | `object \| null` | No | — |
| `options` | `object \| null` | No | — |
| `serp` | `object \| null` | No | — |

> [accordion] serp\_query full type
>
> ```ts theme={null}
> {
>   keyword?: string | null,
>   locale?: string | null,
>   device?: string | null,
>   engine?: string | null,
>   vicinity?: string | null
> } | null
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   max_age?: number | null
> } | null
> ```

> [accordion] serp full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     collected_at?: string | null
>   } | null,
>   metrics?: {
>     volume?: number | null,
>     difficulty?: number | null,
>     organic_ctr?: number | null,
>     priority?: number | null,
>     intent?: {
>       primary_intents?: (string | null)[] | null,
>       all_intents?: (
>         {
>           label?: string | null,
>           score?: number | null
>         } | null
>       )[] | null
>     } | null
>   } | null,
>   results?: (
>     {
>       type?: string | null,
>       description?: string | null,
>       position?: string | null,
>       title?: string | null,
>       traits?: (string | null)[] | null,
>       url?: string | null,
>       price?: string | null,
>       rating?: string | null,
>       reviews?: string | null,
>       question?: string | null,
>       displayed_path?: string | null,
>       job_title?: string | null,
>       job_employer?: string | null,
>       job_location?: string | null,
>       job_source?: string | null,
>       job_posted_on?: string | null,
>       job_travel_time?: string | null,
>       job_details?: string | null,
>       business_name?: string | null,
>       related_searches?: (string | null)[] | null,
>       results?: (Record<string, any> | null)[] | null,
>       sitelinks?: (Record<string, any> | null)[] | null,
>       one_line_sitelinks?: (Record<string, any> | null)[] | null,
>       position_index?: number | null,
>       rank?: number | null,
>       brand_authority?: number | null,
>       url_metrics?: {
>         page?: string | null,
>         subdomain?: string | null,
>         root_domain?: string | null,
>         title?: string | null,
>         last_crawled?: string | null,
>         http_code?: number | null,
>         pages_to_page?: number | null,
>         nofollow_pages_to_page?: number | null,
>         redirect_pages_to_page?: number | null,
>         external_pages_to_page?: number | null,
>         external_nofollow_pages_to_page?: number | null,
>         external_redirect_pages_to_page?: number | null,
>         deleted_pages_to_page?: number | null,
>         root_domains_to_page?: number | null,
>         indirect_root_domains_to_page?: number | null,
>         deleted_root_domains_to_page?: number | null,
>         nofollow_root_domains_to_page?: number | null,
>         pages_to_subdomain?: number | null,
>         nofollow_pages_to_subdomain?: number | null,
>         redirect_pages_to_subdomain?: number | null,
>         external_pages_to_subdomain?: number | null,
>         external_nofollow_pages_to_subdomain?: number | null,
>         external_redirect_pages_to_subdomain?: number | null,
>         deleted_pages_to_subdomain?: number | null,
>         root_domains_to_subdomain?: number | null,
>         deleted_root_domains_to_subdomain?: number | null,
>         nofollow_root_domains_to_subdomain?: number | null,
>         pages_to_root_domain?: number | null,
>         nofollow_pages_to_root_domain?: number | null,
>         redirect_pages_to_root_domain?: number | null,
>         external_pages_to_root_domain?: number | null,
>         external_indirect_pages_to_root_domain?: number | null,
>         external_nofollow_pages_to_root_domain?: number | null,
>         external_redirect_pages_to_root_domain?: number | null,
>         deleted_pages_to_root_domain?: number | null,
>         root_domains_to_root_domain?: number | null,
>         indirect_root_domains_to_root_domain?: number | null,
>         deleted_root_domains_to_root_domain?: number | null,
>         nofollow_root_domains_to_root_domain?: number | null,
>         page_authority?: number | null,
>         domain_authority?: number | null,
>         link_propensity?: number | null,
>         spam_score?: number | null,
>         root_domains_from_page?: number | null,
>         nofollow_root_domains_from_page?: number | null,
>         pages_from_page?: number | null,
>         nofollow_pages_from_page?: number | null,
>         root_domains_from_root_domain?: number | null,
>         nofollow_root_domains_from_root_domain?: number | null,
>         pages_from_root_domain?: number | null,
>         nofollow_pages_from_root_domain?: number | null,
>         pages_crawled_from_root_domain?: number | null
>       } | null
>     } | null
>   )[] | null
> } | null
> ```

***

### suggestions

`keywords.suggestions`

Retrieve a list of related keyword suggestions for a given input keyword. Asynchronous: answers with an async\_call to poll with jobs.lookup. Costs rows per result returned.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.keywords.suggestions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `serp_query` | `object` | Yes | The SERP query object describes a keyword or search phrase in combination with several options to specify how the query is run (i.e. how a SERP should be retrieved for this keyword if necessary). |
| `options` | `object` | No | Options to further filter or refine which keyword suggestions are returned. Strategy will default to `default` if not provided. |
| `page` | `object` | No | Control how much data is returned by providing a specific page number (n) and limit to the number of results in a given page. |

> [accordion] serp\_query full type
>
> ```ts theme={null}
> {
>   keyword: string,
>   locale: string,
>   device: desktop,
>   engine: google,
>   vicinity?: string
> }
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   strategy?: default | related_synonyms | related_topics
> }
> ```

> [accordion] page full type
>
> ```ts theme={null}
> {
>   n?: number,
>   limit?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `async_call` | `object \| null` | No | — |

> [accordion] async\_call full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   action?: string | null,
>   status?: string | null,
>   ttl?: number | null,
>   result?: {
>     suggestions?: (
>       {
>         keyword?: string | null,
>         relevance?: number | null
>       } | null
>     )[] | null,
>     serp_query?: {
>       keyword?: string | null,
>       locale?: string | null,
>       device?: string | null,
>       engine?: string | null,
>       vicinity?: string | null
>     } | null,
>     options?: {
>       strategy?: string | null
>     } | null,
>     page?: {
>       n?: number | null,
>       limit?: number | null
>     } | null
>   } | null,
>   error?: {
>     message?: string | null,
>     code?: number | null,
>     status?: number | null,
>     data?: {
>       explanation?: string | null,
>       issue?: string | null,
>       key?: string | null,
>       value?: Record<string, any> | null
>     } | null
>   } | null
> } | null
> ```

***

### volume

`keywords.volume`

Retrieve the most recent volume metric for any keyword that exists in our database. Costs 1 row per call.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.keywords.volume({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `serp_query` | `object` | Yes | The SERP query object describes a keyword or search phrase in combination with several options to specify how the query is run (i.e. how a SERP should be retrieved for this keyword if necessary). |
| `options` | `object` | No | Options to further refine the keyword metrics that are returned. `include_intent` defaults to `false` if not provided. |

> [accordion] serp\_query full type
>
> ```ts theme={null}
> {
>   keyword: string,
>   locale: string,
>   device: desktop | mobile_android | mobile_ios,
>   engine: google | bing | yahoo,
>   vicinity?: string
> }
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   include_intent?: boolean,
>   max_age?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `keyword_metrics` | `object \| null` | No | — |
| `serp_query` | `object \| null` | No | — |
| `options` | `object \| null` | No | — |

> [accordion] keyword\_metrics full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     collected_at?: string | null
>   } | null,
>   volume?: number | null,
>   difficulty?: any,
>   organic_ctr?: any,
>   priority?: any,
>   intent?: any
> } | null
> ```

> [accordion] serp\_query full type
>
> ```ts theme={null}
> {
>   keyword?: string | null,
>   locale?: string | null,
>   device?: string | null,
>   engine?: string | null,
>   vicinity?: string | null
> } | null
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   include_intent?: boolean | number | null,
>   max_age?: number | null
> } | null
> ```

***

## Linking Domains

### list

`linkingDomains.list`

Use this endpoint to get a list of linking root domains to a target, with information about each root domain and the aggregate number of links to the target. Costs rows per result returned.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.linkingDomains.list({ site_query: { query: 'moz.com', scope: 'domain' }, options: { sort: 'source_domain_authority' } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object` | Yes | A SiteQuery provides a target URL along with a scope to define how the query is parsed. |
| `options` | `object` | No | Options for fetching linking domains. |
| `offset` | `object` | No | Limit and pagination controls. Optionally specify the total number of desired results and, after the first request has been made, access results on the next page of results. |

`data.site.linking-domain.list`. One row per returned root domain. With
several filters, `external` must be one of them.

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query: string,
>   scope: domain | subdomain | subfolder | url
> }
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   sort?: source_domain_authority | source_link_propensity | source_spam_score,
>   filters?: (external | follow | nofollow | deleted | not_deleted)[]
> }
> ```

> [accordion] offset full type
>
> ```ts theme={null}
> {
>   token?: string | null,
>   limit?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object \| null` | No | — |
| `offset` | `object \| null` | No | — |
| `linking_domains` | `object[] \| null` | No | — |
| `options` | `object \| null` | No | — |

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query?: string | null,
>   scope?: string | null,
>   original_site_query?: {
>     query?: string | null,
>     scope?: string | null
>   } | null,
>   site_query_suggestion?: {
>     query?: string | null,
>     scope?: string | null,
>     explanation?: string | null,
>     issue?: string | null
>   } | null
> } | null
> ```

> [accordion] offset full type
>
> ```ts theme={null}
> {
>   provided_token?: string | null,
>   token?: string | null,
>   limit?: number | null
> } | null
> ```

> [accordion] linking\_domains full type
>
> ```ts theme={null}
> (
>   {
>     site_metrics?: {
>       page?: string | null,
>       subdomain?: string | null,
>       root_domain?: string | null,
>       title?: string | null,
>       last_crawled?: string | null,
>       http_code?: number | null,
>       pages_to_page?: number | null,
>       nofollow_pages_to_page?: number | null,
>       redirect_pages_to_page?: number | null,
>       external_pages_to_page?: number | null,
>       external_nofollow_pages_to_page?: number | null,
>       external_redirect_pages_to_page?: number | null,
>       deleted_pages_to_page?: number | null,
>       root_domains_to_page?: number | null,
>       indirect_root_domains_to_page?: number | null,
>       deleted_root_domains_to_page?: number | null,
>       nofollow_root_domains_to_page?: number | null,
>       pages_to_subdomain?: number | null,
>       nofollow_pages_to_subdomain?: number | null,
>       redirect_pages_to_subdomain?: number | null,
>       external_pages_to_subdomain?: number | null,
>       external_nofollow_pages_to_subdomain?: number | null,
>       external_redirect_pages_to_subdomain?: number | null,
>       deleted_pages_to_subdomain?: number | null,
>       root_domains_to_subdomain?: number | null,
>       deleted_root_domains_to_subdomain?: number | null,
>       nofollow_root_domains_to_subdomain?: number | null,
>       pages_to_root_domain?: number | null,
>       nofollow_pages_to_root_domain?: number | null,
>       redirect_pages_to_root_domain?: number | null,
>       external_pages_to_root_domain?: number | null,
>       external_indirect_pages_to_root_domain?: number | null,
>       external_nofollow_pages_to_root_domain?: number | null,
>       external_redirect_pages_to_root_domain?: number | null,
>       deleted_pages_to_root_domain?: number | null,
>       root_domains_to_root_domain?: number | null,
>       indirect_root_domains_to_root_domain?: number | null,
>       deleted_root_domains_to_root_domain?: number | null,
>       nofollow_root_domains_to_root_domain?: number | null,
>       page_authority?: number | null,
>       domain_authority?: number | null,
>       link_propensity?: number | null,
>       spam_score?: number | null,
>       root_domains_from_page?: number | null,
>       nofollow_root_domains_from_page?: number | null,
>       pages_from_page?: number | null,
>       nofollow_pages_from_page?: number | null,
>       root_domains_from_root_domain?: number | null,
>       nofollow_root_domains_from_root_domain?: number | null,
>       pages_from_root_domain?: number | null,
>       nofollow_pages_from_root_domain?: number | null,
>       pages_crawled_from_root_domain?: number | null
>     } | null,
>     link_propensity?: number | null,
>     targeted_pages?: number | null,
>     targeted_nofollow_pages?: number | null,
>     targeted_redirect_pages?: number | null,
>     targeted_deleted_pages?: number | null
>   } | null
> )[] | null
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   sort?: string | null,
>   filters?: (string | null)[] | null
> } | null
> ```

***

### recentlyGained

`linkingDomains.recentlyGained`

This endpoint will return information about external root domains that added new links to a target during the past 60 days. Costs rows per result returned.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.linkingDomains.recentlyGained({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object` | Yes | A SiteQuery provides a target URL along with a scope to define how the query is parsed. |
| `options` | `object` | No | Optional date ranges to filter by. |
| `offset` | `object` | No | Limit and pagination controls. Optionally specify the total number of desired results and, after the first request has been made, access results on the next page of results. |

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query: string,
>   scope: domain | subdomain | subfolder | url
> }
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   begin_date?: string | null,
>   end_date?: string | null
> }
> ```

> [accordion] offset full type
>
> ```ts theme={null}
> {
>   token?: string | null,
>   limit: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object \| null` | No | — |
| `offset` | `object \| null` | No | — |
| `gained_linking_domains` | `object[] \| null` | No | — |
| `options` | `object \| null` | No | — |

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query?: string | null,
>   scope?: string | null,
>   original_site_query?: {
>     query?: string | null,
>     scope?: string | null
>   } | null,
>   site_query_suggestion?: {
>     query?: string | null,
>     scope?: string | null,
>     explanation?: string | null,
>     issue?: string | null
>   } | null
> } | null
> ```

> [accordion] offset full type
>
> ```ts theme={null}
> {
>   provided_token?: string | null,
>   token?: string | null,
>   limit?: number | null
> } | null
> ```

> [accordion] gained\_linking\_domains full type
>
> ```ts theme={null}
> (
>   {
>     site_metrics?: {
>       page?: string | null,
>       subdomain?: string | null,
>       root_domain?: string | null,
>       title?: string | null,
>       last_crawled?: string | null,
>       http_code?: number | null,
>       pages_to_page?: number | null,
>       nofollow_pages_to_page?: number | null,
>       redirect_pages_to_page?: number | null,
>       external_pages_to_page?: number | null,
>       external_nofollow_pages_to_page?: number | null,
>       external_redirect_pages_to_page?: number | null,
>       deleted_pages_to_page?: number | null,
>       root_domains_to_page?: number | null,
>       indirect_root_domains_to_page?: number | null,
>       deleted_root_domains_to_page?: number | null,
>       nofollow_root_domains_to_page?: number | null,
>       pages_to_subdomain?: number | null,
>       nofollow_pages_to_subdomain?: number | null,
>       redirect_pages_to_subdomain?: number | null,
>       external_pages_to_subdomain?: number | null,
>       external_nofollow_pages_to_subdomain?: number | null,
>       external_redirect_pages_to_subdomain?: number | null,
>       deleted_pages_to_subdomain?: number | null,
>       root_domains_to_subdomain?: number | null,
>       deleted_root_domains_to_subdomain?: number | null,
>       nofollow_root_domains_to_subdomain?: number | null,
>       pages_to_root_domain?: number | null,
>       nofollow_pages_to_root_domain?: number | null,
>       redirect_pages_to_root_domain?: number | null,
>       external_pages_to_root_domain?: number | null,
>       external_indirect_pages_to_root_domain?: number | null,
>       external_nofollow_pages_to_root_domain?: number | null,
>       external_redirect_pages_to_root_domain?: number | null,
>       deleted_pages_to_root_domain?: number | null,
>       root_domains_to_root_domain?: number | null,
>       indirect_root_domains_to_root_domain?: number | null,
>       deleted_root_domains_to_root_domain?: number | null,
>       nofollow_root_domains_to_root_domain?: number | null,
>       page_authority?: number | null,
>       domain_authority?: number | null,
>       link_propensity?: number | null,
>       spam_score?: number | null,
>       root_domains_from_page?: number | null,
>       nofollow_root_domains_from_page?: number | null,
>       pages_from_page?: number | null,
>       nofollow_pages_from_page?: number | null,
>       root_domains_from_root_domain?: number | null,
>       nofollow_root_domains_from_root_domain?: number | null,
>       pages_from_root_domain?: number | null,
>       nofollow_pages_from_root_domain?: number | null,
>       pages_crawled_from_root_domain?: number | null
>     } | null,
>     link_propensity?: number | null,
>     targeted_pages?: number | null,
>     targeted_nofollow_pages?: number | null,
>     targeted_redirect_pages?: number | null,
>     targeted_deleted_pages?: number | null,
>     date_gained?: string | null
>   } | null
> )[] | null
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   begin_date?: string | null,
>   end_date?: string | null
> } | null
> ```

***

### recentlyLost

`linkingDomains.recentlyLost`

This endpoint will return information about root domains that removed links to a target during the past 60 days. Costs rows per result returned.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.linkingDomains.recentlyLost({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object` | Yes | A SiteQuery provides a target URL along with a scope to define how the query is parsed. |
| `options` | `object` | No | Optional date ranges to filter by. |
| `offset` | `object` | No | Limit and pagination controls. Optionally specify the total number of desired results and, after the first request has been made, access results on the next page of results. |

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query: string,
>   scope: domain | subdomain | subfolder | url
> }
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   begin_date?: string | null,
>   end_date?: string | null
> }
> ```

> [accordion] offset full type
>
> ```ts theme={null}
> {
>   token?: string | null,
>   limit: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object \| null` | No | — |
| `offset` | `object \| null` | No | — |
| `lost_linking_domains` | `object[] \| null` | No | — |
| `options` | `object \| null` | No | — |

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query?: string | null,
>   scope?: string | null,
>   original_site_query?: {
>     query?: string | null,
>     scope?: string | null
>   } | null,
>   site_query_suggestion?: {
>     query?: string | null,
>     scope?: string | null,
>     explanation?: string | null,
>     issue?: string | null
>   } | null
> } | null
> ```

> [accordion] offset full type
>
> ```ts theme={null}
> {
>   provided_token?: string | null,
>   token?: string | null,
>   limit?: number | null
> } | null
> ```

> [accordion] lost\_linking\_domains full type
>
> ```ts theme={null}
> (
>   {
>     site_metrics?: {
>       page?: string | null,
>       subdomain?: string | null,
>       root_domain?: string | null,
>       title?: string | null,
>       last_crawled?: string | null,
>       http_code?: number | null,
>       pages_to_page?: number | null,
>       nofollow_pages_to_page?: number | null,
>       redirect_pages_to_page?: number | null,
>       external_pages_to_page?: number | null,
>       external_nofollow_pages_to_page?: number | null,
>       external_redirect_pages_to_page?: number | null,
>       deleted_pages_to_page?: number | null,
>       root_domains_to_page?: number | null,
>       indirect_root_domains_to_page?: number | null,
>       deleted_root_domains_to_page?: number | null,
>       nofollow_root_domains_to_page?: number | null,
>       pages_to_subdomain?: number | null,
>       nofollow_pages_to_subdomain?: number | null,
>       redirect_pages_to_subdomain?: number | null,
>       external_pages_to_subdomain?: number | null,
>       external_nofollow_pages_to_subdomain?: number | null,
>       external_redirect_pages_to_subdomain?: number | null,
>       deleted_pages_to_subdomain?: number | null,
>       root_domains_to_subdomain?: number | null,
>       deleted_root_domains_to_subdomain?: number | null,
>       nofollow_root_domains_to_subdomain?: number | null,
>       pages_to_root_domain?: number | null,
>       nofollow_pages_to_root_domain?: number | null,
>       redirect_pages_to_root_domain?: number | null,
>       external_pages_to_root_domain?: number | null,
>       external_indirect_pages_to_root_domain?: number | null,
>       external_nofollow_pages_to_root_domain?: number | null,
>       external_redirect_pages_to_root_domain?: number | null,
>       deleted_pages_to_root_domain?: number | null,
>       root_domains_to_root_domain?: number | null,
>       indirect_root_domains_to_root_domain?: number | null,
>       deleted_root_domains_to_root_domain?: number | null,
>       nofollow_root_domains_to_root_domain?: number | null,
>       page_authority?: number | null,
>       domain_authority?: number | null,
>       link_propensity?: number | null,
>       spam_score?: number | null,
>       root_domains_from_page?: number | null,
>       nofollow_root_domains_from_page?: number | null,
>       pages_from_page?: number | null,
>       nofollow_pages_from_page?: number | null,
>       root_domains_from_root_domain?: number | null,
>       nofollow_root_domains_from_root_domain?: number | null,
>       pages_from_root_domain?: number | null,
>       nofollow_pages_from_root_domain?: number | null,
>       pages_crawled_from_root_domain?: number | null
>     } | null,
>     link_propensity?: number | null,
>     targeted_pages?: number | null,
>     targeted_nofollow_pages?: number | null,
>     targeted_redirect_pages?: number | null,
>     targeted_deleted_pages?: number | null,
>     date_lost?: string | null
>   } | null
> )[] | null
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   begin_date?: string | null,
>   end_date?: string | null
> } | null
> ```

***

## Links

### filterByAnchorText

`links.filterByAnchorText`

Use this endpoint to get a list of links to a target where the anchor text exactly matches a particular string. Costs rows per result returned.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.links.filterByAnchorText({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object` | Yes | A SiteQuery provides a target URL along with a scope to define how the query is parsed. |
| `anchor_text` | `string \| null` | No | The anchor text provided for filtering in the original request. Pass an explicit `null` to request links with no anchor text. |
| `options` | `object` | No | Options for filtering links by anchor text. |
| `offset` | `object` | No | Limit and pagination controls. Optionally specify the total number of desired results and, after the first request has been made, access results on the next page of results. |

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query: string,
>   scope: domain | subdomain | subfolder | url
> }
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   scope?: subdomain | domain | page,
>   subdomains_limited_to_one?: string[],
>   sort?: source_page_authority | source_domain_authority | source_link_propensity | source_spam_score,
>   filters?: (external | follow | nofollow | deleted | not_deleted | redirect | not_redirect | rel_canonical | not_rel_canonical | via_redirect | not_via_redirect | via_rel_canonical | not_via_rel_canonical | gained_last_60_days | lost_last_60_days)[]
> }
> ```

> [accordion] offset full type
>
> ```ts theme={null}
> {
>   token?: string | null,
>   limit?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object \| null` | No | — |
| `offset` | `object \| null` | No | — |
| `links` | `object[] \| null` | No | — |
| `options` | `object \| null` | No | — |
| `anchor_text` | `any \| null` | No | — |

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query?: string | null,
>   scope?: string | null,
>   original_site_query?: {
>     query?: string | null,
>     scope?: string | null
>   } | null,
>   site_query_suggestion?: {
>     query?: string | null,
>     scope?: string | null,
>     explanation?: string | null,
>     issue?: string | null
>   } | null
> } | null
> ```

> [accordion] offset full type
>
> ```ts theme={null}
> {
>   provided_token?: string | null,
>   token?: string | null,
>   limit?: number | null
> } | null
> ```

> [accordion] links full type
>
> ```ts theme={null}
> (
>   {
>     source_site_metrics?: {
>       page?: string | null,
>       subdomain?: string | null,
>       root_domain?: string | null,
>       title?: string | null,
>       last_crawled?: string | null,
>       http_code?: number | null,
>       pages_to_page?: number | null,
>       nofollow_pages_to_page?: number | null,
>       redirect_pages_to_page?: number | null,
>       external_pages_to_page?: number | null,
>       external_nofollow_pages_to_page?: number | null,
>       external_redirect_pages_to_page?: number | null,
>       deleted_pages_to_page?: number | null,
>       root_domains_to_page?: number | null,
>       indirect_root_domains_to_page?: number | null,
>       deleted_root_domains_to_page?: number | null,
>       nofollow_root_domains_to_page?: number | null,
>       pages_to_subdomain?: number | null,
>       nofollow_pages_to_subdomain?: number | null,
>       redirect_pages_to_subdomain?: number | null,
>       external_pages_to_subdomain?: number | null,
>       external_nofollow_pages_to_subdomain?: number | null,
>       external_redirect_pages_to_subdomain?: number | null,
>       deleted_pages_to_subdomain?: number | null,
>       root_domains_to_subdomain?: number | null,
>       deleted_root_domains_to_subdomain?: number | null,
>       nofollow_root_domains_to_subdomain?: number | null,
>       pages_to_root_domain?: number | null,
>       nofollow_pages_to_root_domain?: number | null,
>       redirect_pages_to_root_domain?: number | null,
>       external_pages_to_root_domain?: number | null,
>       external_indirect_pages_to_root_domain?: number | null,
>       external_nofollow_pages_to_root_domain?: number | null,
>       external_redirect_pages_to_root_domain?: number | null,
>       deleted_pages_to_root_domain?: number | null,
>       root_domains_to_root_domain?: number | null,
>       indirect_root_domains_to_root_domain?: number | null,
>       deleted_root_domains_to_root_domain?: number | null,
>       nofollow_root_domains_to_root_domain?: number | null,
>       page_authority?: number | null,
>       domain_authority?: number | null,
>       link_propensity?: number | null,
>       spam_score?: number | null,
>       root_domains_from_page?: number | null,
>       nofollow_root_domains_from_page?: number | null,
>       pages_from_page?: number | null,
>       nofollow_pages_from_page?: number | null,
>       root_domains_from_root_domain?: number | null,
>       nofollow_root_domains_from_root_domain?: number | null,
>       pages_from_root_domain?: number | null,
>       nofollow_pages_from_root_domain?: number | null,
>       pages_crawled_from_root_domain?: number | null
>     } | null,
>     target_site_metrics?: {
>       page?: string | null,
>       subdomain?: string | null,
>       root_domain?: string | null,
>       title?: string | null,
>       last_crawled?: string | null,
>       http_code?: number | null,
>       pages_to_page?: number | null,
>       nofollow_pages_to_page?: number | null,
>       redirect_pages_to_page?: number | null,
>       external_pages_to_page?: number | null,
>       external_nofollow_pages_to_page?: number | null,
>       external_redirect_pages_to_page?: number | null,
>       deleted_pages_to_page?: number | null,
>       root_domains_to_page?: number | null,
>       indirect_root_domains_to_page?: number | null,
>       deleted_root_domains_to_page?: number | null,
>       nofollow_root_domains_to_page?: number | null,
>       pages_to_subdomain?: number | null,
>       nofollow_pages_to_subdomain?: number | null,
>       redirect_pages_to_subdomain?: number | null,
>       external_pages_to_subdomain?: number | null,
>       external_nofollow_pages_to_subdomain?: number | null,
>       external_redirect_pages_to_subdomain?: number | null,
>       deleted_pages_to_subdomain?: number | null,
>       root_domains_to_subdomain?: number | null,
>       deleted_root_domains_to_subdomain?: number | null,
>       nofollow_root_domains_to_subdomain?: number | null,
>       pages_to_root_domain?: number | null,
>       nofollow_pages_to_root_domain?: number | null,
>       redirect_pages_to_root_domain?: number | null,
>       external_pages_to_root_domain?: number | null,
>       external_indirect_pages_to_root_domain?: number | null,
>       external_nofollow_pages_to_root_domain?: number | null,
>       external_redirect_pages_to_root_domain?: number | null,
>       deleted_pages_to_root_domain?: number | null,
>       root_domains_to_root_domain?: number | null,
>       indirect_root_domains_to_root_domain?: number | null,
>       deleted_root_domains_to_root_domain?: number | null,
>       nofollow_root_domains_to_root_domain?: number | null,
>       page_authority?: number | null,
>       domain_authority?: number | null,
>       link_propensity?: number | null,
>       spam_score?: number | null,
>       root_domains_from_page?: number | null,
>       nofollow_root_domains_from_page?: number | null,
>       pages_from_page?: number | null,
>       nofollow_pages_from_page?: number | null,
>       root_domains_from_root_domain?: number | null,
>       nofollow_root_domains_from_root_domain?: number | null,
>       pages_from_root_domain?: number | null,
>       nofollow_pages_from_root_domain?: number | null,
>       pages_crawled_from_root_domain?: number | null
>     } | null,
>     anchor_text?: string | null,
>     date_first_seen?: string | null,
>     date_last_seen?: string | null,
>     date_disappeared?: string | null,
>     nofollow?: boolean | number | null,
>     redirect?: boolean | number | null,
>     rel_canonical?: boolean | number | null,
>     via_redirect?: boolean | number | null,
>     via_rel_canonical?: boolean | number | null
>   } | null
> )[] | null
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   scope?: string | null,
>   subdomains_limited_to_one?: (string | null)[] | null,
>   sort?: string | null,
>   filters?: (string | null)[] | null
> } | null
> ```

***

### filterByDomain

`links.filterByDomain`

Use this endpoint to find links pointing to a target only if they originate from a particular root domain. Costs rows per result returned.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.links.filterByDomain({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object` | Yes | A SiteQuery provides a target URL along with a scope to define how the query is parsed. |
| `domain_site_query` | `object` | Yes | Specify the source domain to filter by. Must be a fully resolved site\_query with a scope of `domain`. |
| `options` | `object` | No | Options for filtering links by domain. |
| `offset` | `object` | No | Limit and pagination controls. Optionally specify the total number of desired results and, after the first request has been made, access results on the next page of results. |
| `anchor_text` | `string` | No | Used in Moz example requests; not in its schema. |

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query: string,
>   scope: domain | subdomain | subfolder | url
> }
> ```

> [accordion] domain\_site\_query full type
>
> ```ts theme={null}
> {
>   query: string,
>   scope: domain
> }
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   scope?: subdomain | domain | page,
>   subdomains_limited_to_one?: string[],
>   sort?: source_page_authority,
>   filters?: (external | follow | nofollow | deleted | not_deleted | gained_last_60_days | lost_last_60_days)[]
> }
> ```

> [accordion] offset full type
>
> ```ts theme={null}
> {
>   token?: string | null,
>   limit?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object \| null` | No | — |
| `domain_site_query` | `object \| null` | No | — |
| `offset` | `object \| null` | No | — |
| `links` | `object[] \| null` | No | — |
| `options` | `object \| null` | No | — |

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query?: string | null,
>   scope?: string | null,
>   original_site_query?: {
>     query?: string | null,
>     scope?: string | null
>   } | null,
>   site_query_suggestion?: {
>     query?: string | null,
>     scope?: string | null,
>     explanation?: string | null,
>     issue?: string | null
>   } | null
> } | null
> ```

> [accordion] domain\_site\_query full type
>
> ```ts theme={null}
> {
>   query?: string | null,
>   scope?: string | null,
>   original_site_query?: {
>     query?: string | null,
>     scope?: string | null
>   } | null,
>   site_query_suggestion?: {
>     query?: string | null,
>     scope?: string | null,
>     explanation?: string | null,
>     issue?: string | null
>   } | null
> } | null
> ```

> [accordion] offset full type
>
> ```ts theme={null}
> {
>   provided_token?: string | null,
>   token?: string | null,
>   limit?: number | null
> } | null
> ```

> [accordion] links full type
>
> ```ts theme={null}
> (
>   {
>     source_site_metrics?: {
>       page?: string | null,
>       subdomain?: string | null,
>       root_domain?: string | null,
>       title?: string | null,
>       last_crawled?: string | null,
>       http_code?: number | null,
>       pages_to_page?: number | null,
>       nofollow_pages_to_page?: number | null,
>       redirect_pages_to_page?: number | null,
>       external_pages_to_page?: number | null,
>       external_nofollow_pages_to_page?: number | null,
>       external_redirect_pages_to_page?: number | null,
>       deleted_pages_to_page?: number | null,
>       root_domains_to_page?: number | null,
>       indirect_root_domains_to_page?: number | null,
>       deleted_root_domains_to_page?: number | null,
>       nofollow_root_domains_to_page?: number | null,
>       pages_to_subdomain?: number | null,
>       nofollow_pages_to_subdomain?: number | null,
>       redirect_pages_to_subdomain?: number | null,
>       external_pages_to_subdomain?: number | null,
>       external_nofollow_pages_to_subdomain?: number | null,
>       external_redirect_pages_to_subdomain?: number | null,
>       deleted_pages_to_subdomain?: number | null,
>       root_domains_to_subdomain?: number | null,
>       deleted_root_domains_to_subdomain?: number | null,
>       nofollow_root_domains_to_subdomain?: number | null,
>       pages_to_root_domain?: number | null,
>       nofollow_pages_to_root_domain?: number | null,
>       redirect_pages_to_root_domain?: number | null,
>       external_pages_to_root_domain?: number | null,
>       external_indirect_pages_to_root_domain?: number | null,
>       external_nofollow_pages_to_root_domain?: number | null,
>       external_redirect_pages_to_root_domain?: number | null,
>       deleted_pages_to_root_domain?: number | null,
>       root_domains_to_root_domain?: number | null,
>       indirect_root_domains_to_root_domain?: number | null,
>       deleted_root_domains_to_root_domain?: number | null,
>       nofollow_root_domains_to_root_domain?: number | null,
>       page_authority?: number | null,
>       domain_authority?: number | null,
>       link_propensity?: number | null,
>       spam_score?: number | null,
>       root_domains_from_page?: number | null,
>       nofollow_root_domains_from_page?: number | null,
>       pages_from_page?: number | null,
>       nofollow_pages_from_page?: number | null,
>       root_domains_from_root_domain?: number | null,
>       nofollow_root_domains_from_root_domain?: number | null,
>       pages_from_root_domain?: number | null,
>       nofollow_pages_from_root_domain?: number | null,
>       pages_crawled_from_root_domain?: number | null
>     } | null,
>     target_site_metrics?: {
>       page?: string | null,
>       subdomain?: string | null,
>       root_domain?: string | null,
>       title?: string | null,
>       last_crawled?: string | null,
>       http_code?: number | null,
>       pages_to_page?: number | null,
>       nofollow_pages_to_page?: number | null,
>       redirect_pages_to_page?: number | null,
>       external_pages_to_page?: number | null,
>       external_nofollow_pages_to_page?: number | null,
>       external_redirect_pages_to_page?: number | null,
>       deleted_pages_to_page?: number | null,
>       root_domains_to_page?: number | null,
>       indirect_root_domains_to_page?: number | null,
>       deleted_root_domains_to_page?: number | null,
>       nofollow_root_domains_to_page?: number | null,
>       pages_to_subdomain?: number | null,
>       nofollow_pages_to_subdomain?: number | null,
>       redirect_pages_to_subdomain?: number | null,
>       external_pages_to_subdomain?: number | null,
>       external_nofollow_pages_to_subdomain?: number | null,
>       external_redirect_pages_to_subdomain?: number | null,
>       deleted_pages_to_subdomain?: number | null,
>       root_domains_to_subdomain?: number | null,
>       deleted_root_domains_to_subdomain?: number | null,
>       nofollow_root_domains_to_subdomain?: number | null,
>       pages_to_root_domain?: number | null,
>       nofollow_pages_to_root_domain?: number | null,
>       redirect_pages_to_root_domain?: number | null,
>       external_pages_to_root_domain?: number | null,
>       external_indirect_pages_to_root_domain?: number | null,
>       external_nofollow_pages_to_root_domain?: number | null,
>       external_redirect_pages_to_root_domain?: number | null,
>       deleted_pages_to_root_domain?: number | null,
>       root_domains_to_root_domain?: number | null,
>       indirect_root_domains_to_root_domain?: number | null,
>       deleted_root_domains_to_root_domain?: number | null,
>       nofollow_root_domains_to_root_domain?: number | null,
>       page_authority?: number | null,
>       domain_authority?: number | null,
>       link_propensity?: number | null,
>       spam_score?: number | null,
>       root_domains_from_page?: number | null,
>       nofollow_root_domains_from_page?: number | null,
>       pages_from_page?: number | null,
>       nofollow_pages_from_page?: number | null,
>       root_domains_from_root_domain?: number | null,
>       nofollow_root_domains_from_root_domain?: number | null,
>       pages_from_root_domain?: number | null,
>       nofollow_pages_from_root_domain?: number | null,
>       pages_crawled_from_root_domain?: number | null
>     } | null,
>     anchor_text?: string | null,
>     date_first_seen?: string | null,
>     date_last_seen?: string | null,
>     date_disappeared?: string | null,
>     nofollow?: boolean | number | null,
>     redirect?: boolean | number | null,
>     rel_canonical?: boolean | number | null,
>     via_redirect?: boolean | number | null,
>     via_rel_canonical?: boolean | number | null
>   } | null
> )[] | null
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   scope?: string | null,
>   subdomains_limited_to_one?: (string | null)[] | null,
>   sort?: string | null,
>   filters?: (string | null)[] | null
> } | null
> ```

***

### intersect

`links.intersect`

This endpoint returns information about sites that point to two or more specified domains, or that point at some domains but not others. Quota cost varies by request.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.links.intersect({ is_linking_to: [{ query: 'moz.com', scope: 'domain' }], not_linking_to: [{ query: 'ahrefs.com', scope: 'domain' }] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `is_linking_to` | `object[]` | Yes | Get sources that link to at least one of the provided sites, or more if `minimum_matching_targets` is set (see description of `minimum_matching_targets` below). Up to 6 total targets may be specified in the `is_linking_to` and `not_linking_to` fields combined, and at least one target must be specified in `is_linking_to`. |
| `not_linking_to` | `object[]` | No | Optionally, ensure that the returned sources that do not link to any of the provided sites. |
| `options` | `object` | No | — |
| `offset` | `object` | No | Limit and pagination controls. Optionally specify the total number of desired results and, after the first request has been made, access results on the next page of results. |

`data.site.link.intersect.fetch`. At least one target in
is\_linking\_to, at most six targets across both arrays, and it costs N
rows per result where N is the number of targets in the request.

> [accordion] is\_linking\_to full type
>
> ```ts theme={null}
> {
>   query: string,
>   scope: domain | subdomain | subfolder | url
> }[]
> ```

> [accordion] not\_linking\_to full type
>
> ```ts theme={null}
> {
>   query: string,
>   scope: domain | subdomain | subfolder | url
> }[]
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   minimum_matching_targets?: number | null,
>   scope?: page | domain,
>   sort?: matching_target_count | source_spam_score | source_domain_authority
> }
> ```

> [accordion] offset full type
>
> ```ts theme={null}
> {
>   token?: string | null,
>   limit?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `is_linking_to` | `object[] \| null` | No | — |
| `not_linking_to` | `object[] \| null` | No | — |
| `options` | `object \| null` | No | — |
| `offset` | `object \| null` | No | — |
| `link_intersects` | `object[] \| null` | No | — |

> [accordion] is\_linking\_to full type
>
> ```ts theme={null}
> (
>   {
>     query?: string | null,
>     scope?: string | null,
>     original_site_query?: {
>       query?: string | null,
>       scope?: string | null
>     } | null,
>     site_query_suggestion?: {
>       query?: string | null,
>       scope?: string | null,
>       explanation?: string | null,
>       issue?: string | null
>     } | null
>   } | null
> )[] | null
> ```

> [accordion] not\_linking\_to full type
>
> ```ts theme={null}
> (
>   {
>     query?: string | null,
>     scope?: string | null,
>     original_site_query?: {
>       query?: string | null,
>       scope?: string | null
>     } | null,
>     site_query_suggestion?: {
>       query?: string | null,
>       scope?: string | null,
>       explanation?: string | null,
>       issue?: string | null
>     } | null
>   } | null
> )[] | null
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   minimum_matching_targets?: number | null,
>   scope?: string | null,
>   sort?: string | null
> } | null
> ```

> [accordion] offset full type
>
> ```ts theme={null}
> {
>   provided_token?: string | null,
>   token?: string | null,
>   limit?: number | null
> } | null
> ```

> [accordion] link\_intersects full type
>
> ```ts theme={null}
> (
>   {
>     page?: string | null,
>     title?: string | null,
>     domain_authority?: number | null,
>     spam_score?: number | null,
>     matching_target_indexes?: (number | null)[] | null,
>     matching_source_pages?: (
>       {
>         page?: string | null,
>         page_authority?: number | null
>       } | null
>     )[] | null
>   } | null
> )[] | null
> ```

***

### list

`links.list`

Use this endpoint to get a list of links to a target. Costs rows per result returned.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.links.list({ site_query: { query: 'moz.com/blog', scope: 'url' }, options: { sort: 'source_link_propensity', filters: ['external', 'nofollow'] }, offset: { limit: 25 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object` | Yes | A SiteQuery provides a target URL along with a scope to define how the query is parsed. |
| `options` | `object` | No | Options for fetching linking domains. |
| `offset` | `object` | No | Limit and pagination controls. Optionally specify the total number of desired results and, after the first request has been made, access results on the next page of results. |

`data.site.link.list`. One row per returned link. The offset.token in
the response is the next page's cursor; it is null when the list is
exhausted. Setting options.subdomains\_limited\_to\_one requires a sort.

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query: string,
>   scope: domain | subdomain | subfolder | url
> }
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   scope?: subdomain | domain | page,
>   subdomains_limited_to_one?: string[],
>   sort?: root_domains_to_source_root_domain | root_domains_to_source_page | source_page_authority | source_domain_authority | source_link_propensity | source_spam_score,
>   filters?: (external | follow | nofollow | deleted | not_deleted | redirect | not_redirect | rel_canonical | not_rel_canonical | via_redirect | not_via_redirect | via_rel_canonical | not_via_rel_canonical | gained_last_60_days | lost_last_60_days)[]
> }
> ```

> [accordion] offset full type
>
> ```ts theme={null}
> {
>   token?: string | null,
>   limit?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object \| null` | No | — |
| `offset` | `object \| null` | No | — |
| `links` | `object[] \| null` | No | — |
| `options` | `object \| null` | No | — |

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query?: string | null,
>   scope?: string | null,
>   original_site_query?: {
>     query?: string | null,
>     scope?: string | null
>   } | null,
>   site_query_suggestion?: {
>     query?: string | null,
>     scope?: string | null,
>     explanation?: string | null,
>     issue?: string | null
>   } | null
> } | null
> ```

> [accordion] offset full type
>
> ```ts theme={null}
> {
>   provided_token?: string | null,
>   token?: string | null,
>   limit?: number | null
> } | null
> ```

> [accordion] links full type
>
> ```ts theme={null}
> (
>   {
>     source_site_metrics?: {
>       page?: string | null,
>       subdomain?: string | null,
>       root_domain?: string | null,
>       title?: string | null,
>       last_crawled?: string | null,
>       http_code?: number | null,
>       pages_to_page?: number | null,
>       nofollow_pages_to_page?: number | null,
>       redirect_pages_to_page?: number | null,
>       external_pages_to_page?: number | null,
>       external_nofollow_pages_to_page?: number | null,
>       external_redirect_pages_to_page?: number | null,
>       deleted_pages_to_page?: number | null,
>       root_domains_to_page?: number | null,
>       indirect_root_domains_to_page?: number | null,
>       deleted_root_domains_to_page?: number | null,
>       nofollow_root_domains_to_page?: number | null,
>       pages_to_subdomain?: number | null,
>       nofollow_pages_to_subdomain?: number | null,
>       redirect_pages_to_subdomain?: number | null,
>       external_pages_to_subdomain?: number | null,
>       external_nofollow_pages_to_subdomain?: number | null,
>       external_redirect_pages_to_subdomain?: number | null,
>       deleted_pages_to_subdomain?: number | null,
>       root_domains_to_subdomain?: number | null,
>       deleted_root_domains_to_subdomain?: number | null,
>       nofollow_root_domains_to_subdomain?: number | null,
>       pages_to_root_domain?: number | null,
>       nofollow_pages_to_root_domain?: number | null,
>       redirect_pages_to_root_domain?: number | null,
>       external_pages_to_root_domain?: number | null,
>       external_indirect_pages_to_root_domain?: number | null,
>       external_nofollow_pages_to_root_domain?: number | null,
>       external_redirect_pages_to_root_domain?: number | null,
>       deleted_pages_to_root_domain?: number | null,
>       root_domains_to_root_domain?: number | null,
>       indirect_root_domains_to_root_domain?: number | null,
>       deleted_root_domains_to_root_domain?: number | null,
>       nofollow_root_domains_to_root_domain?: number | null,
>       page_authority?: number | null,
>       domain_authority?: number | null,
>       link_propensity?: number | null,
>       spam_score?: number | null,
>       root_domains_from_page?: number | null,
>       nofollow_root_domains_from_page?: number | null,
>       pages_from_page?: number | null,
>       nofollow_pages_from_page?: number | null,
>       root_domains_from_root_domain?: number | null,
>       nofollow_root_domains_from_root_domain?: number | null,
>       pages_from_root_domain?: number | null,
>       nofollow_pages_from_root_domain?: number | null,
>       pages_crawled_from_root_domain?: number | null
>     } | null,
>     target_site_metrics?: {
>       page?: string | null,
>       subdomain?: string | null,
>       root_domain?: string | null,
>       title?: string | null,
>       last_crawled?: string | null,
>       http_code?: number | null,
>       pages_to_page?: number | null,
>       nofollow_pages_to_page?: number | null,
>       redirect_pages_to_page?: number | null,
>       external_pages_to_page?: number | null,
>       external_nofollow_pages_to_page?: number | null,
>       external_redirect_pages_to_page?: number | null,
>       deleted_pages_to_page?: number | null,
>       root_domains_to_page?: number | null,
>       indirect_root_domains_to_page?: number | null,
>       deleted_root_domains_to_page?: number | null,
>       nofollow_root_domains_to_page?: number | null,
>       pages_to_subdomain?: number | null,
>       nofollow_pages_to_subdomain?: number | null,
>       redirect_pages_to_subdomain?: number | null,
>       external_pages_to_subdomain?: number | null,
>       external_nofollow_pages_to_subdomain?: number | null,
>       external_redirect_pages_to_subdomain?: number | null,
>       deleted_pages_to_subdomain?: number | null,
>       root_domains_to_subdomain?: number | null,
>       deleted_root_domains_to_subdomain?: number | null,
>       nofollow_root_domains_to_subdomain?: number | null,
>       pages_to_root_domain?: number | null,
>       nofollow_pages_to_root_domain?: number | null,
>       redirect_pages_to_root_domain?: number | null,
>       external_pages_to_root_domain?: number | null,
>       external_indirect_pages_to_root_domain?: number | null,
>       external_nofollow_pages_to_root_domain?: number | null,
>       external_redirect_pages_to_root_domain?: number | null,
>       deleted_pages_to_root_domain?: number | null,
>       root_domains_to_root_domain?: number | null,
>       indirect_root_domains_to_root_domain?: number | null,
>       deleted_root_domains_to_root_domain?: number | null,
>       nofollow_root_domains_to_root_domain?: number | null,
>       page_authority?: number | null,
>       domain_authority?: number | null,
>       link_propensity?: number | null,
>       spam_score?: number | null,
>       root_domains_from_page?: number | null,
>       nofollow_root_domains_from_page?: number | null,
>       pages_from_page?: number | null,
>       nofollow_pages_from_page?: number | null,
>       root_domains_from_root_domain?: number | null,
>       nofollow_root_domains_from_root_domain?: number | null,
>       pages_from_root_domain?: number | null,
>       nofollow_pages_from_root_domain?: number | null,
>       pages_crawled_from_root_domain?: number | null
>     } | null,
>     anchor_text?: string | null,
>     date_first_seen?: string | null,
>     date_last_seen?: string | null,
>     date_disappeared?: string | null,
>     nofollow?: boolean | number | null,
>     redirect?: boolean | number | null,
>     rel_canonical?: boolean | number | null,
>     via_redirect?: boolean | number | null,
>     via_rel_canonical?: boolean | number | null
>   } | null
> )[] | null
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   scope?: string | null,
>   subdomains_limited_to_one?: (string | null)[] | null,
>   sort?: string | null,
>   filters?: (string | null)[] | null
> } | null
> ```

***

### status

`links.status`

Use this endpoint to get the status of a link from a source to a target. Costs 1 row per call.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.links.status({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `target_site_query` | `object` | Yes | Specify the target to check for an existing link. |
| `source_site_query` | `object` | Yes | Specify the source to check for an existing link. |

> [accordion] target\_site\_query full type
>
> ```ts theme={null}
> {
>   query: string,
>   scope: domain | subdomain | subfolder | url
> }
> ```

> [accordion] source\_site\_query full type
>
> ```ts theme={null}
> {
>   query: string,
>   scope: domain | subdomain | subfolder | url
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `target_site_query` | `object \| null` | No | — |
| `source_site_query` | `object \| null` | No | — |
| `exists` | `boolean \| number \| null` | No | — |

> [accordion] target\_site\_query full type
>
> ```ts theme={null}
> {
>   query?: string | null,
>   scope?: string | null,
>   original_site_query?: {
>     query?: string | null,
>     scope?: string | null
>   } | null,
>   site_query_suggestion?: {
>     query?: string | null,
>     scope?: string | null,
>     explanation?: string | null,
>     issue?: string | null
>   } | null
> } | null
> ```

> [accordion] source\_site\_query full type
>
> ```ts theme={null}
> {
>   query?: string | null,
>   scope?: string | null,
>   original_site_query?: {
>     query?: string | null,
>     scope?: string | null
>   } | null,
>   site_query_suggestion?: {
>     query?: string | null,
>     scope?: string | null,
>     explanation?: string | null,
>     issue?: string | null
>   } | null
> } | null
> ```

***

### statusMultiple

`links.statusMultiple`

Use this endpoint to get the status of multiple links from a source to a target. Costs rows per result returned.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.links.statusMultiple({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `queries` | `object[]` | Yes | — |

> [accordion] queries full type
>
> ```ts theme={null}
> {
>   target_site_query?: {
>     query: string,
>     scope: domain | subdomain | subfolder | url
>   },
>   source_site_query?: {
>     query: string,
>     scope: domain | subdomain | subfolder | url
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `results_by_query` | `object[] \| null` | No | — |
| `errors_by_query` | `object[] \| null` | No | — |

> [accordion] results\_by\_query full type
>
> ```ts theme={null}
> (
>   {
>     target_site_query?: {
>       query?: string | null,
>       scope?: string | null,
>       original_site_query?: {
>         query?: string | null,
>         scope?: string | null
>       } | null,
>       site_query_suggestion?: {
>         query?: string | null,
>         scope?: string | null,
>         explanation?: string | null,
>         issue?: string | null
>       } | null
>     } | null,
>     source_site_query?: {
>       query?: string | null,
>       scope?: string | null,
>       original_site_query?: {
>         query?: string | null,
>         scope?: string | null
>       } | null,
>       site_query_suggestion?: {
>         query?: string | null,
>         scope?: string | null,
>         explanation?: string | null,
>         issue?: string | null
>       } | null
>     } | null,
>     exists?: boolean | number | null
>   } | null
> )[] | null
> ```

> [accordion] errors\_by\_query full type
>
> ```ts theme={null}
> (
>   {
>     target_site_query?: {
>       query?: string | null,
>       scope?: string | null,
>       original_site_query?: {
>         query?: string | null,
>         scope?: string | null
>       } | null,
>       site_query_suggestion?: {
>         query?: string | null,
>         scope?: string | null,
>         explanation?: string | null,
>         issue?: string | null
>       } | null
>     } | null,
>     source_site_query?: {
>       query?: string | null,
>       scope?: string | null,
>       original_site_query?: {
>         query?: string | null,
>         scope?: string | null
>       } | null,
>       site_query_suggestion?: {
>         query?: string | null,
>         scope?: string | null,
>         explanation?: string | null,
>         issue?: string | null
>       } | null
>     } | null,
>     error?: {
>       message?: string | null,
>       name?: string | null,
>       data?: {
>         key?: string | null,
>         value?: string | null
>       } | null,
>       httpStatus?: number | null,
>       jsonrpcCode?: number | null
>     } | null
>   } | null
> )[] | null
> ```

***

## Local

### accounts.create

`local.accounts.create`

Creates a new Moz Local Account. Moz Local Enterprise only. Free (no quota).

**Risk:** `write`

```ts theme={null}
await corsair.moz.api.local.accounts.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account` | `object` | Yes | A payload to create a local account. |

> [accordion] account full type
>
> ```ts theme={null}
> {
>   name?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `account` | `object \| null` | No | — |

> [accordion] account full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null
> } | null
> ```

***

### accounts.list

`local.accounts.list`

List all Moz Local Accounts. Moz Local Enterprise only. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.accounts.list({});
```

**Input:** `Record<string, any>`

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `accounts` | `object[] \| string \| null` | No | — |

> [accordion] accounts full type
>
> ```ts theme={null}
> (
>   {
>     id?: number | null,
>     name?: string | null
>   } | null
> )[] | string | null
> ```

***

### accounts.lookup

`local.accounts.lookup`

Lookup a specific Moz Local Account by ID. Moz Local Enterprise only. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.accounts.lookup({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number` | Yes | The ID of the local account. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `account` | `object \| null` | No | — |

> [accordion] account full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null
> } | null
> ```

***

### customFields.create

`local.customFields.create`

Creates a location custom field definition on a Moz Local Account. Moz Local Enterprise only. Free (no quota).

**Risk:** `write`

```ts theme={null}
await corsair.moz.api.local.customFields.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `custom_field` | `object` | Yes | A payload to create a local account custom field. |

> [accordion] custom\_field full type
>
> ```ts theme={null}
> {
>   account_id?: any,
>   name?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `custom_field` | `object \| null` | No | — |

> [accordion] custom\_field full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   account_id?: number | null,
>   name?: string | null
> } | null
> ```

***

### customFields.listForAccount

`local.customFields.listForAccount`

List all location custom fields for a given Moz Local Account ID. Moz Local Enterprise only. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.customFields.listForAccount({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_id` | `number` | Yes | The account ID the custom field is attached to. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `custom_fields` | `object[] \| string \| null` | No | — |

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> (
>   {
>     id?: number | null,
>     account_id?: number | null,
>     name?: string | null
>   } | null
> )[] | string | null
> ```

***

### customFields.lookup

`local.customFields.lookup`

Lookup a specific custom field by ID for a Moz Local Account. Moz Local Enterprise only. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.customFields.lookup({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_id` | `number` | Yes | The account ID the custom field is attached to. |
| `id` | `number` | Yes | The ID of a local account custom field. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `custom_field` | `object \| null` | No | — |

> [accordion] custom\_field full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   account_id?: number | null,
>   name?: string | null
> } | null
> ```

***

### groups.addLocation

`local.groups.addLocation`

Add a location to a group. Moz Local Enterprise only. Free (no quota).

**Risk:** `write`

```ts theme={null}
await corsair.moz.api.local.groups.addLocation({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group_id` | `number` | Yes | The ID of the local group. |
| `location_id` | `number` | Yes | The id of the location |

**Output:** `Record<string, any> \| null`

***

### groups.create

`local.groups.create`

Creates a new group in a Moz Local Account to organize locations. Moz Local Enterprise only. Free (no quota).

**Risk:** `write`

```ts theme={null}
await corsair.moz.api.local.groups.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group` | `object` | Yes | A payload to create a local group. |

> [accordion] group full type
>
> ```ts theme={null}
> {
>   name?: any,
>   account_id?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `group` | `object \| null` | No | — |

> [accordion] group full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null,
>   account_id?: number | null
> } | null
> ```

***

### groups.list

`local.groups.list`

List all local groups. Moz Local Enterprise only. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.groups.list({});
```

**Input:** `Record<string, any>`

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `groups` | `object[] \| string \| null` | No | — |

> [accordion] groups full type
>
> ```ts theme={null}
> (
>   {
>     id?: number | null,
>     name?: string | null,
>     account_id?: number | null
>   } | null
> )[] | string | null
> ```

***

### groups.listForAccount

`local.groups.listForAccount`

List all groups for a given Moz Local Account ID. Moz Local Enterprise only. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.groups.listForAccount({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_id` | `number \| null` | No | The id of the local account the location resides in. May be null for legacy inactive locations. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `groups` | `object[] \| string \| null` | No | — |

> [accordion] groups full type
>
> ```ts theme={null}
> (
>   {
>     id?: number | null,
>     name?: string | null,
>     account_id?: number | null
>   } | null
> )[] | string | null
> ```

***

### groups.listLocations

`local.groups.listLocations`

List locations in a given group. Moz Local Enterprise only. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.groups.listLocations({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group_id` | `number` | Yes | The ID of the local group. |
| `page` | `object` | No | Control the number of results returned per call in addition to fetching additional results. The default `limit` is 25 with an `n` value of 0 (indicating the first page of results). Make subsequent calls to the endpoint with incrementing `n` values to fetch additional pages of results. To get all results, you must continue making calls with incrementing `n` values until an empty result set is retur |

> [accordion] page full type
>
> ```ts theme={null}
> {
>   n?: any,
>   limit?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `locations` | `object[] \| string \| null` | No | — |
| `page` | `object \| null` | No | — |

> [accordion] locations full type
>
> ```ts theme={null}
> (
>   {
>     id?: number | null
>   } | null
> )[] | string | null
> ```

> [accordion] page full type
>
> ```ts theme={null}
> {
>   n?: number | null,
>   limit?: number | null,
>   order?: string | null
> } | null
> ```

***

### groups.lookup

`local.groups.lookup`

Lookup a specific group by ID. Moz Local Enterprise only. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.groups.lookup({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number` | Yes | The ID of the local group. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `group` | `object \| null` | No | — |

> [accordion] group full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null,
>   account_id?: number | null
> } | null
> ```

***

### groups.removeLocation

`local.groups.removeLocation`

Remove a location from a group. Moz Local Enterprise only. Free (no quota).

**Risk:** `write`

```ts theme={null}
await corsair.moz.api.local.groups.removeLocation({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group_id` | `number` | Yes | The ID of the local group. |
| `location_id` | `number` | Yes | The id of the location |

**Output:** `Record<string, any> \| null`

***

### locations.cancel

`local.locations.cancel`

Cancel a specific location by ID. Moz Local Enterprise only. Free (no quota). Stops the paid listing service for the location.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.moz.api.local.locations.cancel({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number` | Yes | The id of the location |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `location` | `object \| null` | No | — |

> [accordion] location full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   level?: string | null,
>   status?: string | null,
>   account_id?: number | null,
>   auto_sync_enabled?: boolean | number | null,
>   custom_fields?: Record<string, any> | null,
>   remote_id?: string | null,
>   listings_name?: string | null,
>   location_name?: string | null,
>   website_url?: string | null,
>   email_address?: string | null,
>   timezone?: string | null,
>   store_code?: string | null,
>   short_description?: string | null,
>   long_description?: string | null,
>   languages?: (string | null)[] | string | null,
>   keywords?: (string | null)[] | string | null,
>   brands?: (string | null)[] | string | null,
>   payment_forms?: (string | null)[] | string | null,
>   price_range?: string | null,
>   service_areas?: (
>     {
>       text?: string | null,
>       id?: string | null
>     } | null
>   )[] | string | null,
>   service_area_only?: boolean | number | null,
>   services?: (string | null)[] | string | null,
>   primary_category?: string | null,
>   additional_categories?: (string | null)[] | string | null,
>   attributes?: (
>     {
>       id?: string | null,
>       value?: string | null
>     } | null
>   )[] | string | null,
>   address?: {
>     address_line_1?: string | null,
>     address_line_2?: string | null,
>     sublocality?: string | null,
>     county?: string | null,
>     city?: string | null,
>     state_province?: string | null,
>     postal_code?: string | null,
>     country?: string | null
>   } | null,
>   lat?: number | null,
>   long?: number | null,
>   opening_status?: string | null,
>   reopen_date?: string | null,
>   hours?: {
>     monday?: (string | null)[] | string | null,
>     tuesday?: (string | null)[] | string | null,
>     wednesday?: (string | null)[] | string | null,
>     thursday?: (string | null)[] | string | null,
>     friday?: (string | null)[] | string | null,
>     saturday?: (string | null)[] | string | null,
>     sunday?: (string | null)[] | string | null
>   } | null,
>   more_hours?: Record<string, any> | null,
>   opening_hours_notes?: string | null,
>   opening_date?: string | null,
>   special_hours?: Record<string, any> | null,
>   phone?: string | null,
>   fax?: string | null
> } | null
> ```

***

### locations.categories

`local.locations.categories`

Retrieve a list of Google category IDs that can be used for `primary_category` or `additional_categories` when creating or updating a location. Moz Local Enterprise only. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.locations.categories({});
```

**Input:** `Record<string, any>`

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `categories` | `object[] \| string \| null` | No | — |

> [accordion] categories full type
>
> ```ts theme={null}
> (
>   {
>     id?: string | null,
>     name?: string | null
>   } | null
> )[] | string | null
> ```

***

### locations.close

`local.locations.close`

Closes a location, setting its status to closed and opening status to permanently closed. Moz Local Enterprise only. Free (no quota). Marks the business permanently closed on every directory.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.moz.api.local.locations.close({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number` | Yes | The id of the location |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `location` | `object \| null` | No | — |

> [accordion] location full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   level?: string | null,
>   status?: string | null,
>   account_id?: number | null,
>   auto_sync_enabled?: boolean | number | null,
>   custom_fields?: Record<string, any> | null,
>   remote_id?: string | null,
>   listings_name?: string | null,
>   location_name?: string | null,
>   website_url?: string | null,
>   email_address?: string | null,
>   timezone?: string | null,
>   store_code?: string | null,
>   short_description?: string | null,
>   long_description?: string | null,
>   languages?: (string | null)[] | string | null,
>   keywords?: (string | null)[] | string | null,
>   brands?: (string | null)[] | string | null,
>   payment_forms?: (string | null)[] | string | null,
>   price_range?: string | null,
>   service_areas?: (
>     {
>       text?: string | null,
>       id?: string | null
>     } | null
>   )[] | string | null,
>   service_area_only?: boolean | number | null,
>   services?: (string | null)[] | string | null,
>   primary_category?: string | null,
>   additional_categories?: (string | null)[] | string | null,
>   attributes?: (
>     {
>       id?: string | null,
>       value?: string | null
>     } | null
>   )[] | string | null,
>   address?: {
>     address_line_1?: string | null,
>     address_line_2?: string | null,
>     sublocality?: string | null,
>     county?: string | null,
>     city?: string | null,
>     state_province?: string | null,
>     postal_code?: string | null,
>     country?: string | null
>   } | null,
>   lat?: number | null,
>   long?: number | null,
>   opening_status?: string | null,
>   reopen_date?: string | null,
>   hours?: {
>     monday?: (string | null)[] | string | null,
>     tuesday?: (string | null)[] | string | null,
>     wednesday?: (string | null)[] | string | null,
>     thursday?: (string | null)[] | string | null,
>     friday?: (string | null)[] | string | null,
>     saturday?: (string | null)[] | string | null,
>     sunday?: (string | null)[] | string | null
>   } | null,
>   more_hours?: Record<string, any> | null,
>   opening_hours_notes?: string | null,
>   opening_date?: string | null,
>   special_hours?: Record<string, any> | null,
>   phone?: string | null,
>   fax?: string | null
> } | null
> ```

***

### locations.create

`local.locations.create`

Creates a new location. Moz Local Enterprise only. Free (no quota). Adds a billed Moz Local location.

**Risk:** `destructive`

```ts theme={null}
await corsair.moz.api.local.locations.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location` | `object` | Yes | A location to be created. |

`local.location.create` adds a billed Moz Local location at the given
`level`; check levels with local.locations.levels first.

> [accordion] location full type
>
> ```ts theme={null}
> {
>   level?: any,
>   account_id?: any,
>   auto_sync_enabled?: any,
>   custom_fields?: Record<string, any>,
>   remote_id?: any,
>   listings_name?: any,
>   location_name?: any,
>   website_url?: any,
>   email_address?: any,
>   timezone?: any,
>   store_code?: any,
>   short_description?: any,
>   long_description?: any,
>   languages?: any,
>   keywords?: any,
>   brands?: any,
>   payment_forms?: any,
>   price_range?: any,
>   service_areas?: any,
>   service_area_only?: any,
>   services?: any,
>   primary_category?: any,
>   additional_categories?: any,
>   attributes?: any,
>   address?: {
>     address_line_1?: any,
>     address_line_2?: any,
>     sublocality?: any,
>     county?: any,
>     city?: any,
>     state_province?: any,
>     postal_code?: any,
>     country?: any
>   },
>   lat?: any,
>   long?: any,
>   opening_status?: any,
>   reopen_date?: any,
>   hours?: {
>     monday?: any,
>     tuesday?: any,
>     wednesday?: any,
>     thursday?: any,
>     friday?: any,
>     saturday?: any,
>     sunday?: any
>   },
>   opening_hours_notes?: any,
>   opening_date?: any,
>   special_hours?: Record<string, any>,
>   phone?: any,
>   fax?: any,
>   published?: any,
>   create_pages?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `location` | `object \| null` | No | — |

> [accordion] location full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   level?: string | null,
>   status?: string | null,
>   account_id?: any | null,
>   auto_sync_enabled?: boolean | number | null,
>   custom_fields?: Record<string, any> | null,
>   remote_id?: string | null,
>   listings_name?: string | null,
>   location_name?: string | null,
>   website_url?: string | null,
>   email_address?: string | null,
>   timezone?: string | null,
>   store_code?: string | null,
>   short_description?: string | null,
>   long_description?: string | null,
>   languages?: (string | null)[] | string | null,
>   keywords?: (string | null)[] | string | null,
>   brands?: (string | null)[] | string | null,
>   payment_forms?: (string | null)[] | string | null,
>   price_range?: string | null,
>   service_areas?: (
>     {
>       text?: string | null,
>       id?: string | null
>     } | null
>   )[] | string | null,
>   service_area_only?: boolean | number | null,
>   services?: (string | null)[] | string | null,
>   primary_category?: string | null,
>   additional_categories?: (string | null)[] | string | null,
>   attributes?: (
>     {
>       id?: string | null,
>       value?: string | null
>     } | null
>   )[] | string | null,
>   address?: {
>     address_line_1?: string | null,
>     address_line_2?: string | null,
>     sublocality?: string | null,
>     county?: string | null,
>     city?: string | null,
>     state_province?: string | null,
>     postal_code?: string | null,
>     country?: string | null
>   } | null,
>   lat?: number | null,
>   long?: number | null,
>   opening_status?: string | null,
>   reopen_date?: string | null,
>   hours?: {
>     monday?: (string | null)[] | string | null,
>     tuesday?: (string | null)[] | string | null,
>     wednesday?: (string | null)[] | string | null,
>     thursday?: (string | null)[] | string | null,
>     friday?: (string | null)[] | string | null,
>     saturday?: (string | null)[] | string | null,
>     sunday?: (string | null)[] | string | null
>   } | null,
>   more_hours?: Record<string, any> | null,
>   opening_hours_notes?: string | null,
>   opening_date?: string | null,
>   special_hours?: Record<string, any> | null,
>   phone?: string | null,
>   fax?: string | null
> } | null
> ```

***

### locations.fieldIssues

`local.locations.fieldIssues`

Returns field-level discrepancy issues for a given location. Moz Local Enterprise only. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.locations.fieldIssues({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location_id` | `number` | Yes | The id of the location |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `field_issues` | `object[] \| string \| null` | No | — |

> [accordion] field\_issues full type
>
> ```ts theme={null}
> (
>   {
>     location_id?: number | null,
>     network_type?: string | null,
>     network_name?: string | null,
>     field_name?: string | null
>   } | null
> )[] | string | null
> ```

***

### locations.fieldStatuses

`local.locations.fieldStatuses`

Returns field-level listing health data for a given location. Moz Local Enterprise only. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.locations.fieldStatuses({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location_id` | `number` | Yes | The id of the location |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `field_statuses` | `object[] \| string \| null` | No | — |

> [accordion] field\_statuses full type
>
> ```ts theme={null}
> (
>   {
>     field_name?: string | null,
>     networks_with_field?: number | null,
>     healthy_networks?: number | null,
>     pending_issues?: number | null,
>     solved_issues?: number | null,
>     dismissed_issues?: number | null
>   } | null
> )[] | string | null
> ```

***

### locations.gbpImpressionHistory

`local.locations.gbpImpressionHistory`

Returns Google Business Profile keyword-impression history over time (month by month) for a location's top-performing keywords. Moz Local Enterprise only. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.locations.gbpImpressionHistory({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location_id` | `number` | Yes | The id of the location |
| `date_start` | `string` | Yes | Inclusive range start, `YYYY-MM-DD`. |
| `date_end` | `string` | Yes | Inclusive range end, `YYYY-MM-DD`. Date range may not exceed 12 months. |
| `keyword_limit` | `number` | No | Max number of top keywords returned per Google Business Profile impression bucket. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `gbp_impression_history` | `object \| null` | No | — |

> [accordion] gbp\_impression\_history full type
>
> ```ts theme={null}
> {
>   location_id?: number | null,
>   date_start?: string | null,
>   date_end?: string | null,
>   keyword_limit?: number | null,
>   gbp_impression_history_reports?: (
>     {
>       date?: string | null,
>       impressions?: (
>         {
>           keyword?: string | null,
>           value?: number | null
>         } | null
>       )[] | string | null
>     } | null
>   )[] | string | null
> } | null
> ```

***

### locations.gbpImpressionTotals

`local.locations.gbpImpressionTotals`

Returns total Google Business Profile keyword impressions for a given location and date range, ordered from most to least impressions. Moz Local Enterprise only. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.locations.gbpImpressionTotals({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location_id` | `number` | Yes | The id of the location |
| `date_start` | `string` | Yes | Inclusive range start, `YYYY-MM-DD`. |
| `date_end` | `string` | Yes | Inclusive range end, `YYYY-MM-DD`. Date range may not exceed 12 months. |
| `page` | `object` | No | Control the number of results returned per call in addition to fetching additional results. The default `limit` is 25 with an `n` value of 0 (indicating the first page of results). Make subsequent calls to the endpoint with incrementing `n` values to fetch additional pages of results. To get all results, you must continue making calls with incrementing `n` values until an empty result set is retur |

> [accordion] page full type
>
> ```ts theme={null}
> {
>   n?: any,
>   limit?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `gbp_impression_total` | `object \| null` | No | — |
| `page` | `object \| null` | No | — |

> [accordion] gbp\_impression\_total full type
>
> ```ts theme={null}
> {
>   location_id?: number | null,
>   date_start?: string | null,
>   date_end?: string | null,
>   gbp_impression_keyword_totals?: (
>     {
>       keyword?: string | null,
>       value?: number | null
>     } | null
>   )[] | string | null
> } | null
> ```

> [accordion] page full type
>
> ```ts theme={null}
> {
>   n?: number | null,
>   limit?: number | null
> } | null
> ```

***

### locations.gbpLeadHistory

`local.locations.gbpLeadHistory`

Returns Google Business Profile lead history over time for a given location, bucketed by day, week, or month. Moz Local Enterprise only. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.locations.gbpLeadHistory({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location_id` | `number` | Yes | The id of the location |
| `date_start` | `string` | Yes | Inclusive range start, `YYYY-MM-DD`. |
| `date_end` | `string` | Yes | Inclusive range end, `YYYY-MM-DD`. Date range may not exceed 12 months. |
| `date_aggregation` | `day \| week \| month` | No | The bucket size used to aggregate a Google Business Profile insight time series. Accepted and returned in lowercase. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `gbp_lead_history` | `object \| null` | No | — |

> [accordion] gbp\_lead\_history full type
>
> ```ts theme={null}
> {
>   location_id?: number | null,
>   date_start?: string | null,
>   date_end?: string | null,
>   date_aggregation?: string | null,
>   gbp_lead_history_reports?: (
>     {
>       date?: string | null,
>       total_leads?: number | null,
>       actions_website?: number | null,
>       actions_phone?: number | null,
>       actions_driving_directions?: number | null,
>       total_impressions?: number | null,
>       ctr?: number | null
>     } | null
>   )[] | string | null
> } | null
> ```

***

### locations.levels

`local.locations.levels`

List the available levels of service for locations. Moz Local Enterprise only. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.locations.levels({});
```

**Input:** `Record<string, any>`

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `levels` | `(string \| null)[] \| string \| null` | No | — |

***

### locations.list

`local.locations.list`

List all locations. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.locations.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `object` | No | Control the number of results returned per call in addition to fetching additional results. The default `limit` is 25 with an `n` value of 0 (indicating the first page of results). Make subsequent calls to the endpoint with incrementing `n` values to fetch additional pages of results. To get all results, you must continue making calls with incrementing `n` values until an empty result set is retur |

> [accordion] page full type
>
> ```ts theme={null}
> {
>   n?: any,
>   limit?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `locations` | `object[] \| string \| null` | No | — |

> [accordion] locations full type
>
> ```ts theme={null}
> (
>   {
>     id?: number | null,
>     level?: string | null,
>     status?: string | null,
>     account_id?: number | null,
>     auto_sync_enabled?: boolean | number | null,
>     custom_fields?: Record<string, any> | null,
>     remote_id?: string | null,
>     listings_name?: string | null,
>     location_name?: string | null,
>     website_url?: string | null,
>     email_address?: string | null,
>     timezone?: string | null,
>     store_code?: string | null,
>     short_description?: string | null,
>     long_description?: string | null,
>     languages?: (string | null)[] | string | null,
>     keywords?: (string | null)[] | string | null,
>     brands?: (string | null)[] | string | null,
>     payment_forms?: (string | null)[] | string | null,
>     price_range?: string | null,
>     service_areas?: (
>       {
>         text?: string | null,
>         id?: string | null
>       } | null
>     )[] | string | null,
>     service_area_only?: boolean | number | null,
>     services?: (string | null)[] | string | null,
>     primary_category?: string | null,
>     additional_categories?: (string | null)[] | string | null,
>     attributes?: (
>       {
>         id?: string | null,
>         value?: string | null
>       } | null
>     )[] | string | null,
>     address?: {
>       address_line_1?: string | null,
>       address_line_2?: string | null,
>       sublocality?: string | null,
>       county?: string | null,
>       city?: string | null,
>       state_province?: string | null,
>       postal_code?: string | null,
>       country?: string | null
>     } | null,
>     lat?: number | null,
>     long?: number | null,
>     opening_status?: string | null,
>     reopen_date?: string | null,
>     hours?: {
>       monday?: (string | null)[] | string | null,
>       tuesday?: (string | null)[] | string | null,
>       wednesday?: (string | null)[] | string | null,
>       thursday?: (string | null)[] | string | null,
>       friday?: (string | null)[] | string | null,
>       saturday?: (string | null)[] | string | null,
>       sunday?: (string | null)[] | string | null
>     } | null,
>     more_hours?: Record<string, any> | null,
>     opening_hours_notes?: string | null,
>     opening_date?: string | null,
>     special_hours?: Record<string, any> | null,
>     phone?: string | null,
>     fax?: string | null
>   } | null
> )[] | string | null
> ```

***

### locations.listByStatus

`local.locations.listByStatus`

List locations filtered by status. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.locations.listByStatus({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `object` | No | Control the number of results returned per call in addition to fetching additional results. The default `limit` is 25 with an `n` value of 0 (indicating the first page of results). Make subsequent calls to the endpoint with incrementing `n` values to fetch additional pages of results. To get all results, you must continue making calls with incrementing `n` values until an empty result set is retur |
| `status` | `active \| canceled \| closed \| suspended` | Yes | The status of the location |

> [accordion] page full type
>
> ```ts theme={null}
> {
>   n?: any,
>   limit?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string \| null` | No | — |
| `locations` | `object[] \| string \| null` | No | — |

> [accordion] locations full type
>
> ```ts theme={null}
> (
>   {
>     id?: number | null,
>     level?: string | null,
>     status?: string | null,
>     account_id?: number | null,
>     auto_sync_enabled?: boolean | number | null,
>     custom_fields?: Record<string, any> | null,
>     remote_id?: string | null,
>     listings_name?: string | null,
>     location_name?: string | null,
>     website_url?: string | null,
>     email_address?: string | null,
>     timezone?: string | null,
>     store_code?: string | null,
>     short_description?: string | null,
>     long_description?: string | null,
>     languages?: (string | null)[] | string | null,
>     keywords?: (string | null)[] | string | null,
>     brands?: (string | null)[] | string | null,
>     payment_forms?: (string | null)[] | string | null,
>     price_range?: string | null,
>     service_areas?: (
>       {
>         text?: string | null,
>         id?: string | null
>       } | null
>     )[] | string | null,
>     service_area_only?: boolean | number | null,
>     services?: (string | null)[] | string | null,
>     primary_category?: string | null,
>     additional_categories?: (string | null)[] | string | null,
>     attributes?: (
>       {
>         id?: string | null,
>         value?: string | null
>       } | null
>     )[] | string | null,
>     address?: {
>       address_line_1?: string | null,
>       address_line_2?: string | null,
>       sublocality?: string | null,
>       county?: string | null,
>       city?: string | null,
>       state_province?: string | null,
>       postal_code?: string | null,
>       country?: string | null
>     } | null,
>     lat?: number | null,
>     long?: number | null,
>     opening_status?: string | null,
>     reopen_date?: string | null,
>     hours?: {
>       monday?: (string | null)[] | string | null,
>       tuesday?: (string | null)[] | string | null,
>       wednesday?: (string | null)[] | string | null,
>       thursday?: (string | null)[] | string | null,
>       friday?: (string | null)[] | string | null,
>       saturday?: (string | null)[] | string | null,
>       sunday?: (string | null)[] | string | null
>     } | null,
>     more_hours?: Record<string, any> | null,
>     opening_hours_notes?: string | null,
>     opening_date?: string | null,
>     special_hours?: Record<string, any> | null,
>     phone?: string | null,
>     fax?: string | null
>   } | null
> )[] | string | null
> ```

***

### locations.listForAccount

`local.locations.listForAccount`

List all active locations filtered by Moz Local Account ID. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.locations.listForAccount({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `object` | No | Control the number of results returned per call in addition to fetching additional results. The default `limit` is 25 with an `n` value of 0 (indicating the first page of results). Make subsequent calls to the endpoint with incrementing `n` values to fetch additional pages of results. To get all results, you must continue making calls with incrementing `n` values until an empty result set is retur |
| `account_id` | `number` | No | Used in Moz example requests; not in its schema. |

> [accordion] page full type
>
> ```ts theme={null}
> {
>   n?: any,
>   limit?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `locations` | `object[] \| string \| null` | No | — |
| `account_id` | `any \| null` | No | — |
| `page` | `object \| null` | No | — |

> [accordion] locations full type
>
> ```ts theme={null}
> (
>   {
>     id?: number | null,
>     level?: string | null,
>     status?: string | null,
>     account_id?: number | null,
>     auto_sync_enabled?: boolean | number | null,
>     custom_fields?: Record<string, any> | null,
>     remote_id?: string | null,
>     listings_name?: string | null,
>     location_name?: string | null,
>     website_url?: string | null,
>     email_address?: string | null,
>     timezone?: string | null,
>     store_code?: string | null,
>     short_description?: string | null,
>     long_description?: string | null,
>     languages?: (string | null)[] | string | null,
>     keywords?: (string | null)[] | string | null,
>     brands?: (string | null)[] | string | null,
>     payment_forms?: (string | null)[] | string | null,
>     price_range?: string | null,
>     service_areas?: (
>       {
>         text?: string | null,
>         id?: string | null
>       } | null
>     )[] | string | null,
>     service_area_only?: boolean | number | null,
>     services?: (string | null)[] | string | null,
>     primary_category?: string | null,
>     additional_categories?: (string | null)[] | string | null,
>     attributes?: (
>       {
>         id?: string | null,
>         value?: string | null
>       } | null
>     )[] | string | null,
>     address?: {
>       address_line_1?: string | null,
>       address_line_2?: string | null,
>       sublocality?: string | null,
>       county?: string | null,
>       city?: string | null,
>       state_province?: string | null,
>       postal_code?: string | null,
>       country?: string | null
>     } | null,
>     lat?: number | null,
>     long?: number | null,
>     opening_status?: string | null,
>     reopen_date?: string | null,
>     hours?: {
>       monday?: (string | null)[] | string | null,
>       tuesday?: (string | null)[] | string | null,
>       wednesday?: (string | null)[] | string | null,
>       thursday?: (string | null)[] | string | null,
>       friday?: (string | null)[] | string | null,
>       saturday?: (string | null)[] | string | null,
>       sunday?: (string | null)[] | string | null
>     } | null,
>     more_hours?: Record<string, any> | null,
>     opening_hours_notes?: string | null,
>     opening_date?: string | null,
>     special_hours?: Record<string, any> | null,
>     phone?: string | null,
>     fax?: string | null
>   } | null
> )[] | string | null
> ```

> [accordion] page full type
>
> ```ts theme={null}
> {
>   n?: number | null,
>   limit?: number | null
> } | null
> ```

***

### locations.listings

`local.locations.listings`

Returns a list of listings for a given location. Moz Local Enterprise only. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.locations.listings({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location_id` | `number` | Yes | The id of the location |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `listings` | `object[] \| string \| null` | No | — |

> [accordion] listings full type
>
> ```ts theme={null}
> (
>   {
>     name?: string | null,
>     status?: string | null,
>     url?: string | null
>   } | null
> )[] | string | null
> ```

***

### locations.localGridHistory

`local.locations.localGridHistory`

Returns all Local Grid results over time for a given keyword, device, engine, and location, including every dot of each grid. Moz Local Enterprise only. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.locations.localGridHistory({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location_id` | `number` | Yes | The id of the location |
| `keyword` | `string` | Yes | The Local Grid keyword the grid ranks are for. |
| `device` | `desktop \| mobile` | Yes | The device to perform the query for. |
| `engine` | `google` | Yes | The engine for the query. |
| `date_start` | `string` | Yes | Inclusive range start, `YYYY-MM-DD`. |
| `date_end` | `string` | Yes | Inclusive range end, `YYYY-MM-DD`. Date range may not exceed 12 months. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `local_grid_history` | `object \| null` | No | — |

> [accordion] local\_grid\_history full type
>
> ```ts theme={null}
> {
>   location_id?: number | null,
>   date_start?: string | null,
>   date_end?: string | null,
>   keyword?: string | null,
>   device?: string | null,
>   engine?: string | null,
>   grids?: (
>     {
>       grid_size?: number | null,
>       grid_distance?: number | null,
>       grid_distance_unit?: string | null,
>       formatted_grid_distance?: string | null,
>       date?: string | null,
>       dots?: (
>         {
>           row?: number | null,
>           column?: number | null,
>           lat?: number | null,
>           long?: number | null,
>           rank?: number | null,
>           rating?: number | null,
>           votes_count?: number | null
>         } | null
>       )[] | string | null
>     } | null
>   )[] | string | null
> } | null
> ```

***

### locations.localGridKeywords

`local.locations.localGridKeywords`

Returns the keywords available to generate a Local Grid report on for a given location. Moz Local Enterprise only. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.locations.localGridKeywords({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location_id` | `number` | Yes | The id of the location |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `keywords` | `(string \| null)[] \| string \| null` | No | — |

***

### locations.lookup

`local.locations.lookup`

Lookup a specific location by ID. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.locations.lookup({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number` | Yes | The id of the location |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `location` | `object \| null` | No | — |

> [accordion] location full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   level?: string | null,
>   status?: string | null,
>   account_id?: number | null,
>   auto_sync_enabled?: boolean | number | null,
>   custom_fields?: Record<string, any> | null,
>   remote_id?: string | null,
>   listings_name?: string | null,
>   location_name?: string | null,
>   website_url?: string | null,
>   email_address?: string | null,
>   timezone?: string | null,
>   store_code?: string | null,
>   short_description?: string | null,
>   long_description?: string | null,
>   languages?: (string | null)[] | string | null,
>   keywords?: (string | null)[] | string | null,
>   brands?: (string | null)[] | string | null,
>   payment_forms?: (string | null)[] | string | null,
>   price_range?: string | null,
>   service_areas?: (
>     {
>       text?: string | null,
>       id?: string | null
>     } | null
>   )[] | string | null,
>   service_area_only?: boolean | number | null,
>   services?: (string | null)[] | string | null,
>   primary_category?: string | null,
>   additional_categories?: (string | null)[] | string | null,
>   attributes?: (
>     {
>       id?: string | null,
>       value?: string | null
>     } | null
>   )[] | string | null,
>   address?: {
>     address_line_1?: string | null,
>     address_line_2?: string | null,
>     sublocality?: string | null,
>     county?: string | null,
>     city?: string | null,
>     state_province?: string | null,
>     postal_code?: string | null,
>     country?: string | null
>   } | null,
>   lat?: number | null,
>   long?: number | null,
>   opening_status?: string | null,
>   reopen_date?: string | null,
>   hours?: {
>     monday?: (string | null)[] | string | null,
>     tuesday?: (string | null)[] | string | null,
>     wednesday?: (string | null)[] | string | null,
>     thursday?: (string | null)[] | string | null,
>     friday?: (string | null)[] | string | null,
>     saturday?: (string | null)[] | string | null,
>     sunday?: (string | null)[] | string | null
>   } | null,
>   more_hours?: Record<string, any> | null,
>   opening_hours_notes?: string | null,
>   opening_date?: string | null,
>   special_hours?: Record<string, any> | null,
>   phone?: string | null,
>   fax?: string | null
> } | null
> ```

***

### locations.networks

`local.locations.networks`

Returns a list of networks for a given location. Moz Local Enterprise only. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.locations.networks({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location_id` | `number` | Yes | The id of the location |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `networks` | `object[] \| string \| null` | No | — |

> [accordion] networks full type
>
> ```ts theme={null}
> (
>   {
>     type?: string | null,
>     id?: number | null,
>     name?: string | null,
>     remote_network_id?: string | null,
>     picture?: string | null,
>     profile_url?: string | null,
>     error?: string | null
>   } | null
> )[] | string | null
> ```

***

### locations.networkStatuses

`local.locations.networkStatuses`

Returns a list of statuses per network for a given location. Moz Local Enterprise only. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.locations.networkStatuses({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location_id` | `number` | Yes | The id of the location |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `network_statuses` | `object[] \| string \| null` | No | — |

> [accordion] network\_statuses full type
>
> ```ts theme={null}
> (
>   {
>     network_name?: string | null,
>     network_type?: string | null,
>     monitored_fields?: number | null,
>     healthy_fields?: number | null
>   } | null
> )[] | string | null
> ```

***

### locations.rankingHistory

`local.locations.rankingHistory`

Returns keyword ranking position over time for a location's tracked keywords. Moz Local Enterprise only. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.local.locations.rankingHistory({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location_id` | `number` | Yes | The id of the location |
| `date_start` | `string` | Yes | Inclusive range start, `YYYY-MM-DD`. |
| `date_end` | `string` | Yes | Inclusive range end, `YYYY-MM-DD`. Date range may not exceed 12 months. |
| `engine` | `google` | Yes | The engine for the query. |
| `device` | `desktop \| mobile` | Yes | The device to perform the query for. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ranking_history` | `object \| null` | No | — |

> [accordion] ranking\_history full type
>
> ```ts theme={null}
> {
>   location_id?: number | null,
>   date_start?: string | null,
>   date_end?: string | null,
>   engine?: string | null,
>   device?: string | null,
>   ranking_history_reports?: (
>     {
>       date?: string | null,
>       ranks?: (
>         {
>           keyword?: string | null,
>           rank?: number | null
>         } | null
>       )[] | string | null
>     } | null
>   )[] | string | null
> } | null
> ```

***

### locations.update

`local.locations.update`

Update a single location. Moz Local Enterprise only. Free (no quota). Moz Local publishes the change to the business listings on every directory.

**Risk:** `write`

```ts theme={null}
await corsair.moz.api.local.locations.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `location` | `object` | Yes | A payload to update one or more fields for a location. |

> [accordion] location full type
>
> ```ts theme={null}
> {
>   id?: any,
>   auto_sync_enabled?: any,
>   custom_fields?: Record<string, any>,
>   remote_id?: any,
>   listings_name?: any,
>   location_name?: any,
>   website_url?: any,
>   email_address?: any,
>   timezone?: any,
>   store_code?: any,
>   short_description?: any,
>   long_description?: any,
>   languages?: any,
>   keywords?: any,
>   brands?: any,
>   payment_forms?: any,
>   price_range?: any,
>   service_areas?: any,
>   service_area_only?: any,
>   services?: any,
>   primary_category?: any,
>   additional_categories?: any,
>   attributes?: any,
>   address?: {
>     address_line_1?: any,
>     address_line_2?: any,
>     sublocality?: any,
>     county?: any,
>     city?: any,
>     state_province?: any,
>     postal_code?: any,
>     country?: any
>   },
>   lat?: any,
>   long?: any,
>   opening_status?: any,
>   reopen_date?: any,
>   hours?: {
>     monday?: any,
>     tuesday?: any,
>     wednesday?: any,
>     thursday?: any,
>     friday?: any,
>     saturday?: any,
>     sunday?: any
>   },
>   opening_hours_notes?: any,
>   opening_date?: any,
>   special_hours?: Record<string, any>,
>   phone?: any,
>   fax?: any,
>   create_pages?: any,
>   published?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `location` | `object \| null` | No | — |

> [accordion] location full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   level?: string | null,
>   status?: string | null,
>   account_id?: number | null,
>   auto_sync_enabled?: boolean | number | null,
>   custom_fields?: Record<string, any> | null,
>   remote_id?: string | null,
>   listings_name?: string | null,
>   location_name?: string | null,
>   website_url?: string | null,
>   email_address?: string | null,
>   timezone?: string | null,
>   store_code?: string | null,
>   short_description?: string | null,
>   long_description?: string | null,
>   languages?: (string | null)[] | string | null,
>   keywords?: (string | null)[] | string | null,
>   brands?: (string | null)[] | string | null,
>   payment_forms?: (string | null)[] | string | null,
>   price_range?: string | null,
>   service_areas?: (
>     {
>       text?: string | null,
>       id?: string | null
>     } | null
>   )[] | string | null,
>   service_area_only?: boolean | number | null,
>   services?: (string | null)[] | string | null,
>   primary_category?: string | null,
>   additional_categories?: (string | null)[] | string | null,
>   attributes?: (
>     {
>       id?: string | null,
>       value?: string | null
>     } | null
>   )[] | string | null,
>   address?: {
>     address_line_1?: string | null,
>     address_line_2?: string | null,
>     sublocality?: string | null,
>     county?: string | null,
>     city?: string | null,
>     state_province?: string | null,
>     postal_code?: string | null,
>     country?: string | null
>   } | null,
>   lat?: number | null,
>   long?: number | null,
>   opening_status?: string | null,
>   reopen_date?: string | null,
>   hours?: {
>     monday?: (string | null)[] | string | null,
>     tuesday?: (string | null)[] | string | null,
>     wednesday?: (string | null)[] | string | null,
>     thursday?: (string | null)[] | string | null,
>     friday?: (string | null)[] | string | null,
>     saturday?: (string | null)[] | string | null,
>     sunday?: (string | null)[] | string | null
>   } | null,
>   more_hours?: Record<string, any> | null,
>   opening_hours_notes?: string | null,
>   opening_date?: string | null,
>   special_hours?: Record<string, any> | null,
>   phone?: string | null,
>   fax?: string | null
> } | null
> ```

***

### locations.updateLevel

`local.locations.updateLevel`

Updates the tier of service for a single location. Moz Local Enterprise only. Free (no quota). Changes the billed service level.

**Risk:** `destructive`

```ts theme={null}
await corsair.moz.api.local.locations.updateLevel({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number` | Yes | The id of the location |
| `level` | `string` | Yes | The name of the tier of service for the location. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `location` | `object \| null` | No | — |

> [accordion] location full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   level?: string | null,
>   status?: string | null,
>   account_id?: number | null,
>   auto_sync_enabled?: boolean | number | null,
>   custom_fields?: Record<string, any> | null,
>   remote_id?: string | null,
>   listings_name?: string | null,
>   location_name?: string | null,
>   website_url?: string | null,
>   email_address?: string | null,
>   timezone?: string | null,
>   store_code?: string | null,
>   short_description?: string | null,
>   long_description?: string | null,
>   languages?: (string | null)[] | string | null,
>   keywords?: (string | null)[] | string | null,
>   brands?: (string | null)[] | string | null,
>   payment_forms?: (string | null)[] | string | null,
>   price_range?: string | null,
>   service_areas?: (
>     {
>       text?: string | null,
>       id?: string | null
>     } | null
>   )[] | string | null,
>   service_area_only?: boolean | number | null,
>   services?: (string | null)[] | string | null,
>   primary_category?: string | null,
>   additional_categories?: (string | null)[] | string | null,
>   attributes?: (
>     {
>       id?: string | null,
>       value?: string | null
>     } | null
>   )[] | string | null,
>   address?: {
>     address_line_1?: string | null,
>     address_line_2?: string | null,
>     sublocality?: string | null,
>     county?: string | null,
>     city?: string | null,
>     state_province?: string | null,
>     postal_code?: string | null,
>     country?: string | null
>   } | null,
>   lat?: number | null,
>   long?: number | null,
>   opening_status?: string | null,
>   reopen_date?: string | null,
>   hours?: {
>     monday?: (string | null)[] | string | null,
>     tuesday?: (string | null)[] | string | null,
>     wednesday?: (string | null)[] | string | null,
>     thursday?: (string | null)[] | string | null,
>     friday?: (string | null)[] | string | null,
>     saturday?: (string | null)[] | string | null,
>     sunday?: (string | null)[] | string | null
>   } | null,
>   more_hours?: Record<string, any> | null,
>   opening_hours_notes?: string | null,
>   opening_date?: string | null,
>   special_hours?: Record<string, any> | null,
>   phone?: string | null,
>   fax?: string | null
> } | null
> ```

***

## Locales

### list

`locales.list`

Use this endpoint to list every locale a search engine supports. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.locales.list({ engine: 'google' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `engine` | `google \| bing \| yahoo` | Yes | The search engine to list supported locales for. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `engine` | `string \| null` | No | — |
| `locales` | `(string \| null)[] \| null` | No | — |

***

## Metrics

### brandAuthority

`metrics.brandAuthority`

This endpoint returns a Brand Authority™ score for the provided site. Costs 1 row per call.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.metrics.brandAuthority({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object` | Yes | — |

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query: string,
>   scope: domain
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_metrics` | `object \| null` | No | — |
| `site_query` | `object \| null` | No | — |

> [accordion] site\_metrics full type
>
> ```ts theme={null}
> {
>   brand_authority_score?: number | null
> } | null
> ```

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query?: string | null,
>   scope?: string | null,
>   original_site_query?: {
>     query?: string | null,
>     scope?: string | null
>   } | null,
>   site_query_suggestion?: {
>     query?: string | null,
>     scope?: string | null,
>     explanation?: string | null,
>     issue?: string | null
>   } | null
> } | null
> ```

***

### distributions

`metrics.distributions`

Fetch Site Metrics Distributions. Costs 1 row per call.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.metrics.distributions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object` | Yes | A SiteQuery provides a target URL along with a scope to define how the query is parsed. |

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query: string,
>   scope: domain | subdomain | subfolder | url
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object \| null` | No | — |
| `site_metrics_distributions` | `object \| null` | No | — |

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query?: string | null,
>   scope?: string | null,
>   original_site_query?: {
>     query?: string | null,
>     scope?: string | null
>   } | null,
>   site_query_suggestion?: {
>     query?: string | null,
>     scope?: string | null,
>     explanation?: string | null,
>     issue?: string | null
>   } | null
> } | null
> ```

> [accordion] site\_metrics\_distributions full type
>
> ```ts theme={null}
> {
>   root_domains_to_page_by_root_domains?: (number | null)[] | null,
>   root_domains_to_root_domain_by_root_domains?: (number | null)[] | null,
>   nofollow_root_domains_to_root_domain_by_root_domains?: (number | null)[] | null,
>   root_domains_to_page_by_domain_authority?: (number | null)[] | null,
>   root_domains_to_subdomain_by_domain_authority?: (number | null)[] | null,
>   root_domains_to_root_domain_by_domain_authority?: (number | null)[] | null,
>   nofollow_root_domains_to_root_domain_by_domain_authority?: (number | null)[] | null,
>   pages_to_root_domain_by_spam_score?: (number | null)[] | null,
>   nofollow_pages_to_root_domain_by_spam_score?: (number | null)[] | null,
>   root_domains_to_page_by_spam_score?: (number | null)[] | null,
>   root_domains_to_subdomain_by_spam_score?: (number | null)[] | null,
>   root_domains_to_root_domain_by_spam_score?: (number | null)[] | null,
>   nofollow_root_domains_to_root_domain_by_spam_score?: (number | null)[] | null
> } | null
> ```

***

### fetch

`metrics.fetch`

Use this endpoint to get metrics such as Domain Authority, Page Authority, Spam Score, link counts and more for one URL. Costs 1 row per call.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.metrics.fetch({ site_query: { query: 'moz.com', scope: 'domain' } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object` | Yes | A SiteQuery provides a target URL along with a scope to define how the query is parsed. |

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query: string,
>   scope: domain | subdomain | subfolder | url
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object \| null` | No | — |
| `site_metrics` | `object \| null` | No | — |

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query?: string | null,
>   scope?: string | null,
>   original_site_query?: {
>     query?: string | null,
>     scope?: string | null
>   } | null,
>   site_query_suggestion?: {
>     query?: string | null,
>     scope?: string | null,
>     explanation?: string | null,
>     issue?: string | null
>   } | null
> } | null
> ```

> [accordion] site\_metrics full type
>
> ```ts theme={null}
> {
>   page?: string | null,
>   subdomain?: string | null,
>   root_domain?: string | null,
>   title?: string | null,
>   last_crawled?: string | null,
>   http_code?: number | null,
>   pages_to_page?: number | null,
>   nofollow_pages_to_page?: number | null,
>   redirect_pages_to_page?: number | null,
>   external_pages_to_page?: number | null,
>   external_nofollow_pages_to_page?: number | null,
>   external_redirect_pages_to_page?: number | null,
>   deleted_pages_to_page?: number | null,
>   root_domains_to_page?: number | null,
>   indirect_root_domains_to_page?: number | null,
>   deleted_root_domains_to_page?: number | null,
>   nofollow_root_domains_to_page?: number | null,
>   pages_to_subdomain?: number | null,
>   nofollow_pages_to_subdomain?: number | null,
>   redirect_pages_to_subdomain?: number | null,
>   external_pages_to_subdomain?: number | null,
>   external_nofollow_pages_to_subdomain?: number | null,
>   external_redirect_pages_to_subdomain?: number | null,
>   deleted_pages_to_subdomain?: number | null,
>   root_domains_to_subdomain?: number | null,
>   deleted_root_domains_to_subdomain?: number | null,
>   nofollow_root_domains_to_subdomain?: number | null,
>   pages_to_root_domain?: number | null,
>   nofollow_pages_to_root_domain?: number | null,
>   redirect_pages_to_root_domain?: number | null,
>   external_pages_to_root_domain?: number | null,
>   external_indirect_pages_to_root_domain?: number | null,
>   external_nofollow_pages_to_root_domain?: number | null,
>   external_redirect_pages_to_root_domain?: number | null,
>   deleted_pages_to_root_domain?: number | null,
>   root_domains_to_root_domain?: number | null,
>   indirect_root_domains_to_root_domain?: number | null,
>   deleted_root_domains_to_root_domain?: number | null,
>   nofollow_root_domains_to_root_domain?: number | null,
>   page_authority?: number | null,
>   domain_authority?: number | null,
>   link_propensity?: number | null,
>   spam_score?: number | null,
>   root_domains_from_page?: number | null,
>   nofollow_root_domains_from_page?: number | null,
>   pages_from_page?: number | null,
>   nofollow_pages_from_page?: number | null,
>   root_domains_from_root_domain?: number | null,
>   nofollow_root_domains_from_root_domain?: number | null,
>   pages_from_root_domain?: number | null,
>   nofollow_pages_from_root_domain?: number | null,
>   pages_crawled_from_root_domain?: number | null
> } | null
> ```

***

### fetchMultiple

`metrics.fetchMultiple`

Use this endpoint to get metrics such as Domain Authority, Page Authority, Spam Score, link counts and more about one or more URLs. Costs rows per result returned.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.metrics.fetchMultiple({ site_queries: [{ query: 'moz.com', scope: 'domain' }, { query: 'moz.com/blog', scope: 'url' }] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_queries` | `object[]` | Yes | — |

> [accordion] site\_queries full type
>
> ```ts theme={null}
> {
>   query: string,
>   scope: domain | subdomain | subfolder | url
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `results_by_site` | `object[] \| null` | No | — |
| `errors_by_site` | `object[] \| null` | No | — |

> [accordion] results\_by\_site full type
>
> ```ts theme={null}
> (
>   {
>     site_query?: {
>       query?: string | null,
>       scope?: string | null,
>       original_site_query?: {
>         query?: string | null,
>         scope?: string | null
>       } | null,
>       site_query_suggestion?: {
>         query?: string | null,
>         scope?: string | null,
>         explanation?: string | null,
>         issue?: string | null
>       } | null
>     } | null,
>     site_metrics?: {
>       page?: string | null,
>       subdomain?: string | null,
>       root_domain?: string | null,
>       title?: string | null,
>       last_crawled?: string | null,
>       http_code?: number | null,
>       pages_to_page?: number | null,
>       nofollow_pages_to_page?: number | null,
>       redirect_pages_to_page?: number | null,
>       external_pages_to_page?: number | null,
>       external_nofollow_pages_to_page?: number | null,
>       external_redirect_pages_to_page?: number | null,
>       deleted_pages_to_page?: number | null,
>       root_domains_to_page?: number | null,
>       indirect_root_domains_to_page?: number | null,
>       deleted_root_domains_to_page?: number | null,
>       nofollow_root_domains_to_page?: number | null,
>       pages_to_subdomain?: number | null,
>       nofollow_pages_to_subdomain?: number | null,
>       redirect_pages_to_subdomain?: number | null,
>       external_pages_to_subdomain?: number | null,
>       external_nofollow_pages_to_subdomain?: number | null,
>       external_redirect_pages_to_subdomain?: number | null,
>       deleted_pages_to_subdomain?: number | null,
>       root_domains_to_subdomain?: number | null,
>       deleted_root_domains_to_subdomain?: number | null,
>       nofollow_root_domains_to_subdomain?: number | null,
>       pages_to_root_domain?: number | null,
>       nofollow_pages_to_root_domain?: number | null,
>       redirect_pages_to_root_domain?: number | null,
>       external_pages_to_root_domain?: number | null,
>       external_indirect_pages_to_root_domain?: number | null,
>       external_nofollow_pages_to_root_domain?: number | null,
>       external_redirect_pages_to_root_domain?: number | null,
>       deleted_pages_to_root_domain?: number | null,
>       root_domains_to_root_domain?: number | null,
>       indirect_root_domains_to_root_domain?: number | null,
>       deleted_root_domains_to_root_domain?: number | null,
>       nofollow_root_domains_to_root_domain?: number | null,
>       page_authority?: number | null,
>       domain_authority?: number | null,
>       link_propensity?: number | null,
>       spam_score?: number | null,
>       root_domains_from_page?: number | null,
>       nofollow_root_domains_from_page?: number | null,
>       pages_from_page?: number | null,
>       nofollow_pages_from_page?: number | null,
>       root_domains_from_root_domain?: number | null,
>       nofollow_root_domains_from_root_domain?: number | null,
>       pages_from_root_domain?: number | null,
>       nofollow_pages_from_root_domain?: number | null,
>       pages_crawled_from_root_domain?: number | null
>     } | null
>   } | null
> )[] | null
> ```

> [accordion] errors\_by\_site full type
>
> ```ts theme={null}
> (
>   {
>     site_query?: {
>       query?: string | null,
>       scope?: string | null,
>       original_site_query?: {
>         query?: string | null,
>         scope?: string | null
>       } | null,
>       site_query_suggestion?: {
>         query?: string | null,
>         scope?: string | null,
>         explanation?: string | null,
>         issue?: string | null
>       } | null
>     } | null,
>     error?: {
>       message?: string | null,
>       name?: string | null,
>       data?: {
>         key?: string | null,
>         value?: string | null
>       } | null,
>       httpStatus?: number | null,
>       jsonrpcCode?: number | null
>     } | null
>   } | null
> )[] | null
> ```

***

### histories

`metrics.histories`

Use this endpoint to get daily or monthly metric histories for a single site. Costs rows per value requested.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.metrics.histories({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object` | Yes | A SiteQuery provides a target URL along with a scope to define how the query is parsed. |
| `get_daily_history_deltas_for` | `(pages_to_page \| nofollow_pages_to_page \| redirect_pages_to_page \| external_pages_to_page \| external_nofollow_pages_to_page \| external_redirect_pages_to_page \| root_domains_to_page \| indirect_root_domains_to_page \| nofollow_root_domains_to_page \| pages_to_subdomain \| nofollow_pages_to_subdomain \| redirect_pages_to_subdomain \| external_pages_to_subdomain \| external_nofollow_pages_to_subdomain \| external_redirect_pages_to_subdomain \| root_domains_to_subdomain \| nofollow_root_domains_to_subdomain \| pages_to_root_domain \| nofollow_pages_to_root_domain \| redirect_pages_to_root_domain \| external_pages_to_root_domain \| external_indirect_pages_to_root_domain \| external_nofollow_pages_to_root_domain \| external_redirect_pages_to_root_domain \| root_domains_to_root_domain \| indirect_root_domains_to_root_domain \| nofollow_root_domains_to_root_domain \| page_authority \| domain_authority)[]` | No | Optional array of values for which to get daily history deltas. Valid values are all non-deleted link count metrics from the site\_metrics object in [Fetch Site Metrics](https://moz.com/api/docs/methods/DataSiteMetricsFetchAction) (`pages_to_page`, etc), `page_authority`, and `domain_authority`. At least one value must be provided between `get_daily_history_deltas_for`, `get_daily_history_values_for`, \`get\_monthl |
| `get_daily_history_values_for` | `(pages_to_page \| nofollow_pages_to_page \| redirect_pages_to_page \| external_pages_to_page \| external_nofollow_pages_to_page \| external_redirect_pages_to_page \| root_domains_to_page \| indirect_root_domains_to_page \| nofollow_root_domains_to_page \| pages_to_subdomain \| nofollow_pages_to_subdomain \| redirect_pages_to_subdomain \| external_pages_to_subdomain \| external_nofollow_pages_to_subdomain \| external_redirect_pages_to_subdomain \| root_domains_to_subdomain \| nofollow_root_domains_to_subdomain \| pages_to_root_domain \| nofollow_pages_to_root_domain \| redirect_pages_to_root_domain \| external_pages_to_root_domain \| external_indirect_pages_to_root_domain \| external_nofollow_pages_to_root_domain \| external_redirect_pages_to_root_domain \| root_domains_to_root_domain \| indirect_root_domains_to_root_domain \| nofollow_root_domains_to_root_domain \| page_authority \| domain_authority \| root_domains_to_root_domain_by_root_domains \| nofollow_root_domains_to_root_domain_by_root_domains \| pages_to_root_domain_by_spam_score \| nofollow_pages_to_root_domain_by_spam_score \| root_domains_to_root_domain_by_spam_score \| nofollow_root_domains_to_root_domain_by_spam_score)[]` | No | Optional array of values for which to get daily history values. Valid values are all non-deleted link count metrics from the site\_metrics object in [Fetch Site Metrics](https://moz.com/api/docs/methods/DataSiteMetricsFetchAction) (`pages_to_page`, etc), `page_authority`, `domain_authority`, `nofollow_pages_to_root_domain_by_spam_score`, `nofollow_root_domains_to_root_domain_by_root_domains`, \`nofollow\_root\_domai |
| `get_monthly_history_deltas_for` | `(pages_to_page \| nofollow_pages_to_page \| redirect_pages_to_page \| external_pages_to_page \| external_nofollow_pages_to_page \| external_redirect_pages_to_page \| root_domains_to_page \| indirect_root_domains_to_page \| nofollow_root_domains_to_page \| pages_to_subdomain \| nofollow_pages_to_subdomain \| redirect_pages_to_subdomain \| external_pages_to_subdomain \| external_nofollow_pages_to_subdomain \| external_redirect_pages_to_subdomain \| root_domains_to_subdomain \| nofollow_root_domains_to_subdomain \| pages_to_root_domain \| nofollow_pages_to_root_domain \| redirect_pages_to_root_domain \| external_pages_to_root_domain \| external_indirect_pages_to_root_domain \| external_nofollow_pages_to_root_domain \| external_redirect_pages_to_root_domain \| root_domains_to_root_domain \| indirect_root_domains_to_root_domain \| nofollow_root_domains_to_root_domain \| page_authority \| domain_authority)[]` | No | Optional array of values for which to get monthly history deltas. Valid values are all non-deleted link count metrics from the site\_metrics object in [Fetch Site Metrics](https://moz.com/api/docs/methods/DataSiteMetricsFetchAction) (`pages_to_page`, etc), `page_authority`, and `domain_authority`. At least one value must be provided between `get_daily_history_deltas_for`, `get_daily_history_values_for`, \`get\_mont |
| `get_monthly_history_values_for` | `(pages_to_page \| nofollow_pages_to_page \| redirect_pages_to_page \| external_pages_to_page \| external_nofollow_pages_to_page \| external_redirect_pages_to_page \| root_domains_to_page \| indirect_root_domains_to_page \| nofollow_root_domains_to_page \| pages_to_subdomain \| nofollow_pages_to_subdomain \| redirect_pages_to_subdomain \| external_pages_to_subdomain \| external_nofollow_pages_to_subdomain \| external_redirect_pages_to_subdomain \| root_domains_to_subdomain \| nofollow_root_domains_to_subdomain \| pages_to_root_domain \| nofollow_pages_to_root_domain \| redirect_pages_to_root_domain \| external_pages_to_root_domain \| external_indirect_pages_to_root_domain \| external_nofollow_pages_to_root_domain \| external_redirect_pages_to_root_domain \| root_domains_to_root_domain \| indirect_root_domains_to_root_domain \| nofollow_root_domains_to_root_domain \| page_authority \| domain_authority \| root_domains_to_root_domain_by_root_domains \| nofollow_root_domains_to_root_domain_by_root_domains \| pages_to_root_domain_by_spam_score \| nofollow_pages_to_root_domain_by_spam_score \| root_domains_to_root_domain_by_spam_score \| nofollow_root_domains_to_root_domain_by_spam_score)[]` | No | Optional array of values for which to get monthly history values. Valid values are all non-deleted link count metrics from the site\_metrics object in [Fetch Site Metrics](https://moz.com/api/docs/methods/DataSiteMetricsFetchAction) (`pages_to_page`, etc), `page_authority`, `domain_authority`, `nofollow_pages_to_root_domain_by_spam_score`, `nofollow_root_domains_to_root_domain_by_root_domains`, \`nofollow\_root\_dom |

`data.site.metrics.histories.fetch`. Each of the four selector arrays
(get\_daily\_history\_deltas\_for, get\_daily\_history\_values\_for,
get\_monthly\_history\_deltas\_for, get\_monthly\_history\_values\_for) is
optional, but together they must name at least one metric. It costs one
row per metric returned across the four arrays.

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query: string,
>   scope: domain | subdomain | subfolder | url
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object \| null` | No | — |
| `site_metrics_histories` | `object \| null` | No | — |

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query?: string | null,
>   scope?: string | null,
>   original_site_query?: {
>     query?: string | null,
>     scope?: string | null
>   } | null,
>   site_query_suggestion?: {
>     query?: string | null,
>     scope?: string | null,
>     explanation?: string | null,
>     issue?: string | null
>   } | null
> } | null
> ```

> [accordion] site\_metrics\_histories full type
>
> ```ts theme={null}
> {
>   daily_history_deltas?: (
>     {
>       metric_name?: string | null,
>       metric_deltas?: {
>         gained?: (
>           {
>             date?: string | null,
>             count?: number | null
>           } | null
>         )[] | null,
>         lost?: (
>           {
>             date?: string | null,
>             count?: number | null
>           } | null
>         )[] | null
>       } | null
>     } | null
>   )[] | null,
>   daily_history_values?: (
>     {
>       metric_name?: string | null,
>       metric_values?: (
>         {
>           date?: string | null,
>           value?: number | null
>         } | null
>       )[] | null
>     } | null
>   )[] | null,
>   monthly_history_deltas?: (
>     {
>       metric_name?: string | null,
>       metric_deltas?: {
>         gained?: (
>           {
>             date?: string | null,
>             count?: number | null
>           } | null
>         )[] | null,
>         lost?: (
>           {
>             date?: string | null,
>             count?: number | null
>           } | null
>         )[] | null
>       } | null
>     } | null
>   )[] | null,
>   monthly_history_values?: (
>     {
>       metric_name?: string | null,
>       metric_values?: (
>         {
>           date?: string | null,
>           value?: number | null
>         } | null
>       )[] | null
>     } | null
>   )[] | null
> } | null
> ```

***

## Quota

### lookup

`quota.lookup`

Check how much quota is used/available for the current billing period, as well as additional information about the quota such as whether or not overages are enabled. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.quota.lookup({ path: 'api.limits.data.rows' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `api.limits.mozscape.rows \| api.limits.data.rows \| api.limits.beta.rows` | Yes | The quota path specifies a particular quota for which to retrieve information (e.g. beta or production quotas). The quota used by a particular method is specified in the Quota Usage section at the bottom of the method documentation. |

`quota.lookup` is free. The path picks the bucket: api.limits.data.rows
for everything except competitors, api.limits.mozscape.rows for the
competitor fetch, api.limits.beta.rows for beta methods.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `quota` | `object \| null` | No | — |

> [accordion] quota full type
>
> ```ts theme={null}
> {
>   path?: string | null,
>   account_id?: number | null,
>   allotted?: number | null,
>   used?: number | null,
>   report?: string | null,
>   reset?: string | null,
>   overage?: boolean | number | null,
>   period_start?: number | null,
>   period_reset?: number | null
> } | null
> ```

***

## Ranking Keywords

### count

`rankingKeywords.count`

Retrieve a summary of the number of keywords for which the provided query (domain, subdomain, or page) ranks in the top 50. Costs 1 row per call.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.rankingKeywords.count({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `target_query` | `object` | Yes | The target query to use for the ranking keyword count. |

> [accordion] target\_query full type
>
> ```ts theme={null}
> {
>   query: string,
>   scope: domain | subdomain | url,
>   locale: en-US | en-GB | en-CA | en-AU
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ranking_keyword_count` | `object \| null` | No | — |
| `target_query` | `object \| null` | No | — |

> [accordion] ranking\_keyword\_count full type
>
> ```ts theme={null}
> {
>   total?: number | null,
>   position?: {
>     rank_1?: number | null,
>     rank_2?: number | null,
>     rank_3?: number | null,
>     rank_4?: number | null,
>     rank_5?: number | null,
>     rank_6?: number | null,
>     rank_7?: number | null,
>     rank_8?: number | null,
>     rank_9?: number | null,
>     rank_10?: number | null,
>     rank_11?: number | null,
>     rank_12?: number | null,
>     rank_13?: number | null,
>     rank_14?: number | null,
>     rank_15?: number | null,
>     rank_16?: number | null,
>     rank_17?: number | null,
>     rank_18?: number | null,
>     rank_19?: number | null,
>     rank_20?: number | null,
>     rank_21?: number | null,
>     rank_22?: number | null,
>     rank_23?: number | null,
>     rank_24?: number | null,
>     rank_25?: number | null,
>     rank_26?: number | null,
>     rank_27?: number | null,
>     rank_28?: number | null,
>     rank_29?: number | null,
>     rank_30?: number | null,
>     rank_31?: number | null,
>     rank_32?: number | null,
>     rank_33?: number | null,
>     rank_34?: number | null,
>     rank_35?: number | null,
>     rank_36?: number | null,
>     rank_37?: number | null,
>     rank_38?: number | null,
>     rank_39?: number | null,
>     rank_40?: number | null,
>     rank_41?: number | null,
>     rank_42?: number | null,
>     rank_43?: number | null,
>     rank_44?: number | null,
>     rank_45?: number | null,
>     rank_46?: number | null,
>     rank_47?: number | null,
>     rank_48?: number | null,
>     rank_49?: number | null,
>     rank_50?: number | null
>   } | null
> } | null
> ```

> [accordion] target\_query full type
>
> ```ts theme={null}
> {
>   query?: string | null,
>   scope?: string | null,
>   locale?: string | null,
>   original_target_query?: {
>     query?: string | null,
>     scope?: string | null,
>     locale?: string | null
>   } | null,
>   suggestion?: {
>     query?: string | null,
>     scope?: string | null,
>     locale?: string | null,
>     explanation?: string | null,
>     issue?: string | null
>   } | null
> } | null
> ```

***

### list

`rankingKeywords.list`

Retrieve a list of keywords for which the provided site (domain, subdomain, subfolder, or page) ranks in the top 50, along with the ranking position and the difficulty and monthly search volume for each keyword. Costs rows per result returned.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.rankingKeywords.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `target_query` | `object` | Yes | A TargetQuery provides a target URL along with several options to specify how the query is run. |
| `options` | `object` | No | The options used when generating site ranking keywords result. |
| `page` | `object` | No | Control the number of results returned per call in addition to fetching additional results. The default "limit" is 25 with an "n" value of 0 (indicating the first page of results). Make subsequent calls to the endpoint with incrementing "n" values to fetch additional pages of results. |

`data.site.ranking-keyword.list`: keywords a site ranks for in the top 50,
one row per result. rankingKeywords.count is one row.

> [accordion] target\_query full type
>
> ```ts theme={null}
> {
>   query: string,
>   scope: domain | subdomain | subfolder | url,
>   locale: en-US | en-GB | en-CA | en-AU
> }
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   sort: rank | alpha | difficulty | volume
> }
> ```

> [accordion] page full type
>
> ```ts theme={null}
> {
>   n?: number,
>   limit?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ranking_keywords` | `object[] \| null` | No | — |
| `target_query` | `object \| null` | No | — |
| `options` | `object \| null` | No | — |
| `page` | `object \| null` | No | — |

> [accordion] ranking\_keywords full type
>
> ```ts theme={null}
> (
>   {
>     keyword?: string | null,
>     ranking_page?: string | null,
>     rank_position?: number | null,
>     difficulty?: number | null,
>     volume?: number | null
>   } | null
> )[] | null
> ```

> [accordion] target\_query full type
>
> ```ts theme={null}
> {
>   query?: string | null,
>   scope?: string | null,
>   locale?: string | null,
>   original_target_query?: {
>     query?: string | null,
>     scope?: string | null,
>     locale?: string | null
>   } | null,
>   suggestion?: {
>     query?: string | null,
>     scope?: string | null,
>     locale?: string | null,
>     explanation?: string | null,
>     issue?: string | null
>   } | null
> } | null
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   sort?: string | null
> } | null
> ```

> [accordion] page full type
>
> ```ts theme={null}
> {
>   n?: number | null,
>   limit?: number | null
> } | null
> ```

***

## Redirects

### fetch

`redirects.fetch`

Use this endpoint to see the final redirect target of a page after following known redirects in the index. Costs 1 row per call.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.redirects.fetch({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object` | Yes | A SiteQuery provides a target URL along with a scope to define how the query is parsed. |

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query: string,
>   scope: domain | subdomain | subfolder | url
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object \| null` | No | — |
| `destination` | `string \| null` | No | — |

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query?: string | null,
>   scope?: string | null,
>   original_site_query?: {
>     query?: string | null,
>     scope?: string | null
>   } | null,
>   site_query_suggestion?: {
>     query?: string | null,
>     scope?: string | null,
>     explanation?: string | null,
>     issue?: string | null
>   } | null
> } | null
> ```

***

## Test

### ping

`test.ping`

Use this endpoint to verify that your integration with the Moz JSON-RPC API works end to end, without spending any quota. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.test.ping({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string` | No | A message to return to the caller. |
| `error` | `boolean` | No | If true, the request will fail instead of returning a message. Use this to exercise the error handling in your integration. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string \| null` | No | — |

***

### pingAsync

`test.pingAsync`

Use this endpoint to verify that your integration correctly handles the asynchronous methods in the Moz JSON-RPC API, without spending any quota. Asynchronous: answers with an async\_call to poll with jobs.lookup. Free (no quota).

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.test.pingAsync({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string` | No | A message to return to the caller. |
| `error` | `boolean` | No | If true, the request will fail instead of returning a message. Use this to exercise the error handling in your integration. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `async_call` | `object \| null` | No | — |

> [accordion] async\_call full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   action?: string | null,
>   status?: string | null,
>   ttl?: number | null,
>   result?: {
>     message?: string | null
>   } | null,
>   error?: {
>     message?: string | null,
>     code?: number | null,
>     status?: number | null,
>     data?: {
>       explanation?: string | null,
>       issue?: string | null,
>       key?: string | null,
>       value?: Record<string, any> | null
>     } | null
>   } | null
> } | null
> ```

***

## Top Pages

### list

`topPages.list`

Use this endpoint to return a list of the top pages on a target domain, sorted by descending page authority, linking root domains, or external linking pages. Costs rows per result returned.

**Risk:** `read`

```ts theme={null}
await corsair.moz.api.topPages.list({ site_query: { query: 'moz.com', scope: 'domain' }, options: { filter: 'status_200', sort: 'page_authority' } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object` | Yes | A SiteQuery provides a target URL along with a scope to define how the query is parsed. |
| `options` | `object` | No | Options for fetching top pages. |
| `offset` | `object` | No | Limit and pagination controls. Optionally specify the total number of desired results and, after the first request has been made, access results on the next page of results. |

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query: string,
>   scope: domain | subdomain
> }
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   filter?: all | status_200 | status_301 | status_302 | status_4xx | status_5xx,
>   sort?: page_authority | root_domains_to_page | external_pages_to_page
> }
> ```

> [accordion] offset full type
>
> ```ts theme={null}
> {
>   token?: string | null,
>   limit?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_query` | `object \| null` | No | — |
| `offset` | `object \| null` | No | — |
| `options` | `object \| null` | No | — |
| `top_pages` | `object[] \| null` | No | — |

> [accordion] site\_query full type
>
> ```ts theme={null}
> {
>   query?: string | null,
>   scope?: string | null,
>   original_site_query?: {
>     query?: string | null,
>     scope?: string | null
>   } | null,
>   site_query_suggestion?: {
>     query?: string | null,
>     scope?: string | null,
>     explanation?: string | null,
>     issue?: string | null
>   } | null
> } | null
> ```

> [accordion] offset full type
>
> ```ts theme={null}
> {
>   provided_token?: string | null,
>   token?: string | null,
>   limit?: number | null
> } | null
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   filter?: string | null,
>   sort?: string | null
> } | null
> ```

> [accordion] top\_pages full type
>
> ```ts theme={null}
> (
>   {
>     page?: string | null,
>     subdomain?: string | null,
>     root_domain?: string | null,
>     title?: string | null,
>     last_crawled?: string | null,
>     http_code?: number | null,
>     pages_to_page?: number | null,
>     nofollow_pages_to_page?: number | null,
>     redirect_pages_to_page?: number | null,
>     external_pages_to_page?: number | null,
>     external_nofollow_pages_to_page?: number | null,
>     external_redirect_pages_to_page?: number | null,
>     deleted_pages_to_page?: number | null,
>     root_domains_to_page?: number | null,
>     indirect_root_domains_to_page?: number | null,
>     deleted_root_domains_to_page?: number | null,
>     nofollow_root_domains_to_page?: number | null,
>     pages_to_subdomain?: number | null,
>     nofollow_pages_to_subdomain?: number | null,
>     redirect_pages_to_subdomain?: number | null,
>     external_pages_to_subdomain?: number | null,
>     external_nofollow_pages_to_subdomain?: number | null,
>     external_redirect_pages_to_subdomain?: number | null,
>     deleted_pages_to_subdomain?: number | null,
>     root_domains_to_subdomain?: number | null,
>     deleted_root_domains_to_subdomain?: number | null,
>     nofollow_root_domains_to_subdomain?: number | null,
>     pages_to_root_domain?: number | null,
>     nofollow_pages_to_root_domain?: number | null,
>     redirect_pages_to_root_domain?: number | null,
>     external_pages_to_root_domain?: number | null,
>     external_indirect_pages_to_root_domain?: number | null,
>     external_nofollow_pages_to_root_domain?: number | null,
>     external_redirect_pages_to_root_domain?: number | null,
>     deleted_pages_to_root_domain?: number | null,
>     root_domains_to_root_domain?: number | null,
>     indirect_root_domains_to_root_domain?: number | null,
>     deleted_root_domains_to_root_domain?: number | null,
>     nofollow_root_domains_to_root_domain?: number | null,
>     page_authority?: number | null,
>     domain_authority?: number | null,
>     link_propensity?: number | null,
>     spam_score?: number | null,
>     root_domains_from_page?: number | null,
>     nofollow_root_domains_from_page?: number | null,
>     pages_from_page?: number | null,
>     nofollow_pages_from_page?: number | null,
>     root_domains_from_root_domain?: number | null,
>     nofollow_root_domains_from_root_domain?: number | null,
>     pages_from_root_domain?: number | null,
>     nofollow_pages_from_root_domain?: number | null,
>     pages_crawled_from_root_domain?: number | null
>   } | null
> )[] | null
> ```

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.