const url = ' https://sitechecker.pro/api/v1/segments?project_id=12345 ' ;
const options = {method: ' GET ' , headers: {Authorization: ' Bearer <token> ' }} ;
const response = await fetch ( url , options );
const data = await response . json ();
--url ' https://sitechecker.pro/api/v1/segments?project_id=12345 ' \
--header ' Authorization: Bearer <token> '
Returns the page segments available for a project, including their segment IDs. Segment IDs can be used in supported Site Audit, Site Monitoring, GSC Insights, GA4 Insights, and SEO Tests endpoints.
include
string
Comma-separated optional data sets to attach to each segment.
Media type application/json
object data
Array<object>
object segment_id
Segment ID used in other endpoints.
string
segment_name
Segment name shown in UI.
string
pages_count
Pages included in the segment.
integer
nullable
segment_type
Segment type (system/custom/etc.).
string
Allowed values: base custom
Example "segment_id" : " all_pages " ,
"segment_name" : " All pages " ,
Missing or invalid API key
Media type application/json
object object string
Allowed values: validation_error bad_request project_not_found segment_not_found forbidden crawl_in_progress not_found upstream_error unauthorized rate_limit_exceeded api_access_denied internal_error crawl_not_found invalid_date_range invalid_filter invalid_event_type keyword_not_found opportunity_not_found snapshot_unavailable gsc_not_connected ga4_not_connected site_audit_data_unavailable ga4_data_unavailable unsupported_filter unsupported_dimension segment_filter_unsupported unsupported_scope ai_overview_data_unavailable prompt_data_unavailable
Example "message" : " Invalid or missing API key. "
No active API entitlement for the account, or the project belongs to another account
Media type application/json
Returned as api_access_denied when the account has no active API entitlement, and as forbidden when the requested project belongs to another account.
object object string
Allowed values: validation_error bad_request project_not_found segment_not_found forbidden crawl_in_progress not_found upstream_error unauthorized rate_limit_exceeded api_access_denied internal_error crawl_not_found invalid_date_range invalid_filter invalid_event_type keyword_not_found opportunity_not_found snapshot_unavailable gsc_not_connected ga4_not_connected site_audit_data_unavailable ga4_data_unavailable unsupported_filter unsupported_dimension segment_filter_unsupported unsupported_scope ai_overview_data_unavailable prompt_data_unavailable
Example "code" : " api_access_denied " ,
"message" : " API access is not available: the account has no active API entitlement. "
Media type application/json
The exact missing resource is in error.code: project_not_found, segment_not_found, crawl_not_found, keyword_not_found, opportunity_not_found, snapshot_unavailable or not_found.
object object string
Allowed values: validation_error bad_request project_not_found segment_not_found forbidden crawl_in_progress not_found upstream_error unauthorized rate_limit_exceeded api_access_denied internal_error crawl_not_found invalid_date_range invalid_filter invalid_event_type keyword_not_found opportunity_not_found snapshot_unavailable gsc_not_connected ga4_not_connected site_audit_data_unavailable ga4_data_unavailable unsupported_filter unsupported_dimension segment_filter_unsupported unsupported_scope ai_overview_data_unavailable prompt_data_unavailable
Example "code" : " project_not_found " ,
"message" : " Project not found. "
Media type application/json
Rejected query parameters. error.code is validation_error for parameter validation, or invalid_date_range / invalid_filter / invalid_event_type / unsupported_filter / unsupported_dimension / unsupported_scope / segment_filter_unsupported for module-specific rules.
object object string
Allowed values: validation_error bad_request project_not_found segment_not_found forbidden crawl_in_progress not_found upstream_error unauthorized rate_limit_exceeded api_access_denied internal_error crawl_not_found invalid_date_range invalid_filter invalid_event_type keyword_not_found opportunity_not_found snapshot_unavailable gsc_not_connected ga4_not_connected site_audit_data_unavailable ga4_data_unavailable unsupported_filter unsupported_dimension segment_filter_unsupported unsupported_scope ai_overview_data_unavailable prompt_data_unavailable
Example "code" : " validation_error " ,
"message" : " project_id is required. "
Rate limit exceeded — retry after the interval in the Retry-After header
Media type application/json
object object string
Allowed values: validation_error bad_request project_not_found segment_not_found forbidden crawl_in_progress not_found upstream_error unauthorized rate_limit_exceeded api_access_denied internal_error crawl_not_found invalid_date_range invalid_filter invalid_event_type keyword_not_found opportunity_not_found snapshot_unavailable gsc_not_connected ga4_not_connected site_audit_data_unavailable ga4_data_unavailable unsupported_filter unsupported_dimension segment_filter_unsupported unsupported_scope ai_overview_data_unavailable prompt_data_unavailable
Example "code" : " rate_limit_exceeded " ,
"message" : " Rate limit exceeded. Try again later. "
Media type application/json
object object string
Allowed values: validation_error bad_request project_not_found segment_not_found forbidden crawl_in_progress not_found upstream_error unauthorized rate_limit_exceeded api_access_denied internal_error crawl_not_found invalid_date_range invalid_filter invalid_event_type keyword_not_found opportunity_not_found snapshot_unavailable gsc_not_connected ga4_not_connected site_audit_data_unavailable ga4_data_unavailable unsupported_filter unsupported_dimension segment_filter_unsupported unsupported_scope ai_overview_data_unavailable prompt_data_unavailable
Example "code" : " internal_error " ,
"message" : " Internal server error. "