totalum-sdk 1.11.1 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/totalum-sdk.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # totalum-sdk reference
2
2
 
3
- > Generated by `scripts/gen-docs.mjs` from the types and JSDoc of `totalum-sdk` 1.11.1. Do not edit.
3
+ > Generated by `scripts/gen-docs.mjs` from the types and JSDoc of `totalum-sdk` 1.12.0. Do not edit.
4
4
 
5
5
  `totalum-sdk` is the package every Totalum v2 app uses for Totalum's built-in features: the project's database
6
6
  (`totalum-sdk/d1`, used through Drizzle), file storage, e-mail, AI, payments, real-time rooms, scheduled jobs, vector
@@ -32,7 +32,7 @@ coding agent's sandbox and a laptop. Never add a third-party SDK or provider key
32
32
  | [AI](#totalum-sdkai) | `totalum-sdk/ai` | AI from your server without any provider account: chat completions (streamed or not), structured JSON, a label out of a list, embeddings, image generation and editing, video generation and image description. |
33
33
  | [Email](#totalum-sdkemail) | `totalum-sdk/email` | Send transactional e-mail (sign-up confirmations, receipts, notifications) from the project's own sender, and check whether it was delivered. |
34
34
  | [Cron Jobs](#totalum-sdkcron) | `totalum-sdk/cron` | Run a route of your own app on a schedule: every night at 8:00, every 15 minutes, the first day of the month. |
35
- | [SEO & IndexNow](#totalum-sdkseo) | `totalum-sdk/seo` | Tell search engines that pages of your custom domain changed (IndexNow), so new and edited pages are indexed in minutes instead of days. |
35
+ | [SEO & AI search](#totalum-sdkseo) | `totalum-sdk/seo` | Research what ranks on Google and what AI assistants answer, for a country and language (ISO codes): Google results with "People also ask" and the AI Overview, AI Mode, Maps, what ChatGPT, Claude, Gemini and Perplexity answer and cite, keyword ideas with volume and difficulty, Google Trends, a domain's keywords, competitors, keyword gaps and backlinks, and an on-page analysis of any public page. |
36
36
  | [Browser Automation](#totalum-sdkbrowser) | `totalum-sdk/browser` | A real Chrome in the cloud, driven over HTTPS from your server, so it works inside the published app: open pages, click, type, log in, fill forms, download files, take screenshots and PDFs, extract data. |
37
37
  | [Realtime](#totalum-sdkrealtime) | `totalum-sdk/realtime` | Live updates between the people using your app: chat, notifications, presence ("who is online"), collaborative editing, live dashboards and games. |
38
38
  | [Logs](#totalum-sdklogs) | `totalum-sdk/logs` | Read your app's own server logs: the requests the published app (`env: 'live'`) or the preview (`'dev'`) handled, with their `console` lines, status codes and errors. |
@@ -167,6 +167,9 @@ These are the errors every call can throw; each method lists its own below it.
167
167
  | `PROJECT_PAUSED_BY_USER` | 402 | The owner paused the project; it works again once resumed. |
168
168
  | `PROJECT_HIBERNATED` | 410 | The project is hibernated; the owner reactivates it in Totalum (free, about a minute). |
169
169
  | `PROJECT_DELETED` | 410 | The project was deleted. |
170
+ | `NOT_AVAILABLE_IN_COUNTRY` | 400 | SEO data does not exist for that country and language (or the feature is not offered there); `seo.locations()` lists the languages each country has data in. Nothing was charged. |
171
+ | `SEO_REQUEST_REJECTED` | 400 | The SEO request was refused (`details.field` names the input). Nothing was charged. |
172
+ | `SEO_CITY_NOT_FOUND` | 400 | No city of that name in `country`. Nothing was charged. |
170
173
  | `PROVIDER_UNAVAILABLE` | 503 | The service behind this feature is unavailable right now. Retry later. |
171
174
  | `ENGINE_UNAVAILABLE` | 500 | An unexpected error on Totalum's side; `details.errorId` identifies it for support. |
172
175
 
@@ -185,7 +188,7 @@ Workers) and name the HTTPS replacement: `ai.video.wait()`.
185
188
 
186
189
  All client-side codes: `SDK_NOT_CONFIGURED`, `NOT_SUPPORTED`, `BATCH_FOREIGN_STATEMENT`, `TRANSACTIONS_NOT_SUPPORTED`, `NETWORK_ERROR`, `TIMEOUT`, `RESPONSE_PARSE_ERROR`, `NODE_ONLY`, `WEBHOOK_SECRET_MISSING`, `WEBHOOK_SIGNATURE_INVALID`, `WEBHOOK_TIMESTAMP_EXPIRED`.
187
190
 
188
- All server codes: `SERVICE_UNAUTHORIZED`, `SERVICE_REPLAY`, `ACTOR_MISMATCH`, `PAYLOAD_TOO_LARGE`, `VALIDATION_ERROR`, `PROJECT_NOT_FOUND`, `PROJECT_NOT_READY`, `OPERATION_IN_PROGRESS`, `AGENT_RUNNING`, `PROJECT_MOVED`, `OBJECT_MIGRATING`, `INDEX_SHARD_UNAVAILABLE`, `RATE_LIMIT_EXCEEDED`, `RATE_LIMITED`, `PROJECT_PAUSED_RUNAWAY`, `AI_MEDIA_PAUSED_THIS_HOUR`, `PROJECT_PAUSED_BALANCE`, `PROJECT_SUSPENDED`, `PROJECT_HIBERNATED`, `PROJECT_DELETED`, `PROJECT_PAUSED_BY_USER`, `LIFECYCLE_NOT_APPLICABLE`, `PROJECT_NOT_PAUSED`, `PAUSE_DUMP_EXPIRED`, `PAUSE_VERIFICATION_FAILED`, `DEPLOYMENT_IN_PROGRESS`, `REACTIVATE_IMPORT_MISMATCH`, `RESUME_IMPORT_MISMATCH`, `INSUFFICIENT_CREDITS`, `VCAAS_INSUFFICIENT_CREDITS`, `PROJECT_CREDIT_LIMIT_REACHED`, `FREE_PROMPTS_DISABLED`, `PLAN_REQUIRED`, `FEATURE_LIMIT_REACHED`, `FEATURE_DISABLED`, `VECTORS_LIMIT_REACHED`, `CONNECTION_REQUIRED`, `CONNECTION_ACTION_FAILED`, `TOOLKIT_NOT_AVAILABLE`, `TOOLKIT_NEEDS_OWN_APP`, `AGENT_ALREADY_RUNNING`, `IMPORT_IN_PROGRESS`, `MIGRATION_TOO_LARGE`, `MIGRATION_START_FAILED`, `TOO_MANY_RUN_REQUESTS`, `PROMPT_SECURITY_VIOLATION`, `NO_PROCESS_RUNNING`, `RUN_NOT_FOUND`, `KEY_NOT_FOUND`, `DEPLOYMENT_RUNNING`, `AUTO_EXECUTION_ALREADY_ACTIVE`, `REBUILD_RUNNING`, `SECRET_ALREADY_EXISTS`, `SECRET_LIMIT_EXCEEDED`, `RESERVED_SECRET_NAME`, `DUMP_NOT_FOUND`, `DUMP_INVALID`, `RESTORE_TARGET_NOT_EMPTY`, `ENGINE_NOT_SUPPORTED`, `ENGINE_V2_DISABLED`, `V2_TEMPORARILY_DISABLED`, `ENGINE_REQUEST_NOT_ELIGIBLE`, `ENGINE_MISMATCH`, `INVALID_ENGINE_VERSION`, `PROJECT_ENGINE_MISMATCH`, `ENGINE_UNAVAILABLE`, `PREVIEW_LABEL_TOO_LONG`, `PROJECT_ALREADY_EXISTS`, `CLOUDFLARE_API_ERROR`, `PROVISIONING_BUSY`, `UNAUTHORIZED`, `LEGACY_KEY_NOT_SUPPORTED`, `SANDBOX_KEY_EXPIRED`, `AUTH_RATE_LIMITED`, `FORBIDDEN_SCOPE`, `KEY_ENV_MISMATCH`, `KEY_LIMIT_EXCEEDED`, `LIVE_DB_READ_ONLY`, `LIVE_WRITE_NEEDS_CONFIRMATION`, `DDL_NOT_ALLOWED`, `MIGRATION_IN_PROGRESS`, `MIGRATION_EDITED`, `SCHEMA_OUT_OF_SYNC`, `LIVE_MIGRATION_FAILED`, `DESTRUCTIVE_MIGRATION_NEEDS_CONFIRMATION`, `DESTRUCTIVE_MIGRATION_UNDONE_BY_RESTORE`, `DEV_DATABASE_NOT_FOUND`, `DATABASE_ROLE_NOT_FOUND`, `BOOKMARK_NOT_FOUND`, `BACKUP_NOT_FOUND`, `BACKUP_NOT_DELETABLE`, `BACKUP_RATE_LIMITED`, `BACKUP_TOO_LARGE_FOR_IMPORT`, `PRE_RESTORE_BACKUP_FAILED`, `RESTORE_VERIFY_FAILED`, `RESTORE_BEFORE_LIVE_MIGRATION`, `RUN_NOT_LATEST`, `DEV_DATABASE_EXISTS`, `SQL_ERROR`, `SQL_MULTI_STATEMENT`, `SQL_STATEMENT_TOO_LARGE`, `SQL_TOO_MANY_PARAMS`, `STATEMENT_NOT_ALLOWED`, `VIRTUAL_TABLES_NOT_SUPPORTED`, `USE_STORAGE_FOR_FILES`, `D1_TYPE_ERROR`, `MIGRATION_INVALID`, `SYSTEM_TABLE_READ_ONLY`, `SQL_READ_ONLY`, `RESULT_TOO_LARGE`, `NL_QUERY_UNANSWERABLE`, `QUERY_TIMEOUT`, `DB_OVERLOADED`, `D1_TRANSIENT`, `DB_FULL_NEAR_LIMIT`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENT_REPLAY_UNAVAILABLE`, `TABLE_NOT_FOUND`, `SCHEMA_TOO_LARGE_FOR_COUNTS`, `EXEC_REQUIRES_MIGRATE_MODE`, `MIGRATION_UNKNOWN_IN_DB`, `QUERY_LIMIT_EXCEEDED`, `STORAGE_LIMIT_EXCEEDED`, `METER_UNAVAILABLE`, `COLUMN_NOT_FOUND`, `VALUE_NOT_ALLOWED`, `COLUMN_REQUIRED`, `FILTER_TOO_COMPLEX`, `OFFSET_TOO_LARGE`, `BULK_TOO_LARGE`, `NOT_A_JUNCTION_TABLE`, `AMBIGUOUS_RELATION`, `LIVE_WRITE_CONFIRMATION_REQUIRED`, `RECORD_NOT_FOUND`, `RECORD_KEY_REQUIRED`, `AMBIGUOUS_RECORD_ID`, `DEV_NAME_GUARD`, `PROD_NAME_GUARD`, `INVALID_RUN_REQUEST`, `RUN_ALREADY_ACTIVE`, `RUN_CONFLICT`, `INVALID_CREDENTIALS`, `ADAPTER_UNAVAILABLE`, `DISK_FULL`, `DEPLOY_FIX_ATTEMPTS_EXHAUSTED`, `TOKEN_REVOKED`, `AM_UPDATE_DOWNLOAD_FAILED`, `AM_UPDATE_BAD_SHA`, `AM_UPDATE_BAD_SIGNATURE`, `AM_UPDATE_INCOMPATIBLE_IMAGE`, `AM_UPDATE_START_FAILED`, `AM_VERSION_UNAVAILABLE`, `AM_UPDATE_FAILED`, `RELEASE_CANARY_NOT_PASSED`, `RELEASE_NOT_FOUND`, `RELEASE_ROLLOUT_ACTIVE`, `RELEASE_GUARD_PAUSED`, `RELEASE_BUILD_UNAVAILABLE`, `RELEASE_BELOW_MIN_SAFE_VERSION`, `VISUAL_EDIT_PREVIEW_DEPLOYING`, `VISUAL_EDIT_NOT_PATCHABLE`, `VISUAL_EDIT_BASE_MISMATCH`, `VISUAL_EDIT_TYPECHECK_FAILED`, `INVALID_VISUAL_EDIT`, `IMAGE_VERSION_NOT_FOUND`, `IMAGE_VERSION_NOT_PROMOTABLE`, `REALTIME_TICKET_INVALID`, `REALTIME_TICKET_EXPIRED`, `REALTIME_PERMISSION_DENIED`, `REALTIME_MESSAGE_TOO_LARGE`, `REALTIME_MESSAGE_RATE_EXCEEDED`, `REALTIME_CONNECTION_LIMIT_REACHED`, `REALTIME_ROOM_LIMIT_REACHED`, `CONFIRMATION_REQUIRED`, `MIGRATION_NOT_REVERSIBLE`, `ALREADY_ON_PROVIDER`, `DATABASE_MIGRATING`, `TURSO_STORAGE_INSUFFICIENT`, `LOGWATCH_INACTIVE`, `AGENT_LOG_READS_LIMIT`, `LOGS_UPSTREAM_ERROR`, `ANALYTICS_INVALID_QUERY`, `ANALYTICS_UPSTREAM_ERROR`, `ANALYTICS_WINDOW_OUT_OF_RETENTION`, `INVALID_CIDR`, `RATE_LIMIT_ABOVE_PLAN`, `RATE_LIMIT_DISABLE_NOT_ALLOWED`, `OWNER_ONLY`, `SIGNING_NOT_CONFIGURED`, `SIGNING_ALREADY_CONFIGURED`, `SIGNING_INVALID_KEYSTORE`, `SIGNING_INVALID_ASC_KEY`, `KEYSTORE_DOWNLOAD_EXPIRED`, `KEYSTORE_NOT_DOWNLOADABLE`, `MOBILE_BUILD_RUNNING`, `MOBILE_BUILD_RATE_LIMITED`, `MOBILE_BUILD_QUEUE_TIMEOUT`, `MOBILE_BUILD_NOT_CANCELLABLE`, `MOBILE_BUILD_NOT_FOUND`, `MOBILE_BUILD_NOT_READY`, `MOBILE_REQUIRES_PUBLISHED_PROJECT`, `DOWNLOAD_EXPIRED`, `PROCESS_IN_PROGRESS`, `SANDBOX_NOT_RUNNING`, `MOBILE_LAYER_MISSING`, `MOBILE_BUILD_FAILED`, `MOBILE_ARTIFACT_INVALID`, `SIGNING_FINGERPRINT_MISMATCH`, `AM_RESTARTED`, `MOBILE_BUILD_NOT_SIGNED`, `STORE_NOT_CONFIGURED`, `STORE_CREDENTIALS_INVALID`, `STORE_APP_NOT_FOUND`, `STORE_UPLOAD_RUNNING`, `STORE_UPLOAD_LIMIT_REACHED`, `STORE_UPLOAD_NOT_FOUND`, `STORE_UPLOAD_FAILED`, `PLAY_FIRST_UPLOAD_MANUAL`, `STORE_PROCESSING_TIMEOUT`, `LIMIT_ABOVE_PLAN_CEILING`, `UNKNOWN_FEATURE`, `INVALID_LIMIT`, `FEATURE_NOT_DISABLABLE`, `USE_PUT_LIMITS`, `LIMIT_NOT_USER_EDITABLE`, `NOT_AVAILABLE_FOR_ENGINE`, `INVALID_AMOUNT`, `REFUND_EXCEEDS_CHARGES`, `IDEMPOTENCY_CONFLICT`, `ORGANIZATION_NOT_FOUND`, `ACCOUNT_NOT_FOUND`, `PROVIDER_UNAVAILABLE`, `URL_NOT_ALLOWED`, `JOB_NOT_FOUND`, `CONCURRENCY_QUEUE_TIMEOUT`, `CONCURRENCY_QUEUE_FULL`, `PROVIDER_TIMEOUT`, `FILE_TOO_LARGE`, `UNSUPPORTED_FILE_TYPE`, `FILE_NOT_FOUND`, `FILE_KEY_FORBIDDEN`, `FILE_UPLOAD_ERROR`, `FILE_DOWNLOAD_ERROR`, `FILE_DELETE_ERROR`, `UPLOAD_NOT_COMPLETED`, `MISSING_URL`, `MISSING_INPUT`, `MISSING_EXTRACTION_CONFIG`, `MISSING_QUERY`, `SCRAPE_FAILED`, `EXTRACT_FAILED`, `SCREENSHOT_FAILED`, `SEARCH_FAILED`, `SCRAPE_BLOCKED`, `SESSION_NOT_FOUND`, `SESSION_EXPIRED`, `SESSION_BUSY`, `SESSION_LIMIT_REACHED`, `SESSION_ENDED_INSUFFICIENT_CREDITS`, `ACTION_TIMEOUT`, `ACTION_FAILED`, `UNKNOWN_COMMAND`, `BATCH_TOO_LARGE`, `SKIPPED`, `UPLOAD_TOO_LARGE`, `DOWNLOAD_TOO_LARGE`, `CAPTURE_LIMIT_REACHED`, `CAPTCHA_UNSOLVED`, `BROWSER_CDP_NODE_ONLY`, `DIALOG_NOT_OPEN`, `STEALTH_TIER_UNAVAILABLE`, `DOMAIN_NOT_ALLOWED`, `CONTEXT_SEED_UNSUPPORTED`, `EXTENSION_TOO_LARGE`, `NL_PROVIDER_UNAVAILABLE`, `PROGRAM_TOO_LARGE`, `PROGRAM_UNBOUNDED`, `UNKNOWN_STEP`, `PROGRAM_IN_FLIGHT`, `PROGRAM_TIMEOUT`, `PROGRAM_NOT_FOUND`, `PROGRAM_STEP_FAILED`, `PROGRAM_LIMIT_REACHED`, `CREATE_PDF_FROM_HTML_ERROR`, `GENERATE_PDF_BY_URL_ERROR`, `PDF_TIMEOUT`, `PDF_TOO_LARGE`, `FILENAME_REQUIRED`, `SCANUM_EYE_ARRAY_NOT_SUPPORTED`, `INVALID_EXTRA_FIELD_TYPE`, `SCANUM_EYE_PDF_NOT_SUPPORTED`, `UNSUPPORTED_SCAN_MODEL`, `SCAN_DOCUMENT_ERROR`, `SCAN_INVOICE_ERROR`, `OCR_IMAGE_PROCESSING_ERROR`, `OCR_PDF_PROCESSING_ERROR`, `SCAN_TOO_MANY_PAGES`, `SCAN_PDF_ENCRYPTED`, `SCAN_XFA_UNSUPPORTED`, `AUDIO_FILE_REQUIRED`, `AUDIO_FILE_TOO_LARGE`, `INVALID_AUDIO_FORMAT`, `AUDIO_TRANSCRIPTION_ERROR`, `TTS_TEXT_TOO_LONG`, `TTS_VOICE_UNKNOWN`, `TOO_MANY_AUDIO_TRANSCRIPTIONS`, `EMAIL_SEND_FAILED`, `TOO_MANY_ATTACHMENTS`, `INVALID_ATTACHMENT_URL`, `ATTACHMENT_TOO_LARGE`, `TOO_MANY_RECIPIENTS`, `EMAIL_RECIPIENT_SUPPRESSED`, `EMAIL_DOMAIN_NOT_VERIFIED`, `EMAIL_LOCAL_PART_TAKEN`, `EMAIL_SENDING_PAUSED`, `EMAIL_DOMAINS_REQUIRE_PAID_PLAN`, `SUPPRESSION_PERMANENT`, `DEV_RECIPIENT_NOT_ALLOWED`, `CRON_LIMIT_REACHED`, `INVALID_SCHEDULE`, `CRON_URL_NOT_ALLOWED`, `CRON_JOB_NOT_FOUND`, `CRON_REQUIRES_PUBLISHED_PROJECT`, `LIVE_CRON_READ_ONLY`, `URL_NOT_PROJECT_HOST`, `INDEXNOW_ERROR`, `MCP_VERIFY_FAILED`, `MCP_NAME_RESERVED`, `MCP_LIMIT_REACHED`, `MCP_SERVER_NOT_FOUND`, `PAYMENTS_NOT_ENABLED`, `PAYMENTS_LIVE_ONBOARDING_REQUIRED`, `PAYMENTS_PUBLISH_FIRST`, `PAYMENTS_ACCOUNT_DISCONNECTED`, `CARD_DATA_NOT_ACCEPTED`, `STRIPE_ERROR`, `STRIPE_RATE_LIMITED`, `PAYMENTS_WEBHOOK_SIGNATURE_INVALID`, `AI_MODEL_NOT_ALLOWED`, `AI_MODEL_UNKNOWN`, `AI_INVALID_SCHEMA`, `AI_CONTENT_BLOCKED`, `AI_CONTEXT_TOO_LONG`, `AI_PROVIDER_QUOTA`, `AI_PROVIDER_UNAVAILABLE`, `AI_STREAM_ERROR`, `AI_VIDEO_JOB_NOT_FOUND`, `AI_VIDEO_FAILED`, `MISSING_VIDEO_URL`, `MISSING_PROMPT`, `INVALID_VIDEO_URL`, `INVALID_VIDEO_URL_PROTOCOL`, `INVALID_MIME_TYPE_HINT`, `VIDEO_TOO_LARGE`, `VIDEO_URL_UNREACHABLE`, `VIDEO_URL_NOT_A_VIDEO`, `YOUTUBE_VIDEO_UNAVAILABLE`, `NO_PAYMENT_METHOD`, `DOMAIN_CONTACT_REQUIRED`, `DOMAIN_UNAVAILABLE`, `DOMAIN_PREMIUM_NOT_ALLOWED`, `DOMAIN_PRICE_OVER_CAP`, `TLD_NOT_ALLOWED`, `DOMAIN_LIMIT_REACHED`, `PRICE_CHANGED`, `PAYMENT_FAILED`, `REGISTRATION_FAILED`, `DOMAIN_NOT_RENEWABLE`, `DOMAIN_ALREADY_ATTACHED`, `DNS_RECORD_MANAGED`, `DNS_RECORD_CONFLICT`, `DNS_RECORD_LIMIT`, `DOMAIN_TRANSFER_LOCKED`, `DOMAIN_NOT_FOUND`, `DOMAIN_IN_USE`, `DOMAIN_ALREADY_ADDED`, `PROJECT_HAS_CUSTOM_DOMAIN`, `NO_DEPLOYMENT`, `REDIRECT_LIMIT_REACHED`, `REDIRECT_INVALID`, `APEX_NOT_FLATTENABLE`, `SECOND_FACTOR_NOT_CONFIGURED`, `PASSWORD_REQUIRED`, `PASSWORD_INCORRECT`, `TOO_MANY_ATTEMPTS`, `CONFIRMATION_MISMATCH`, `INVALID_TOKEN`, `MISSING_PERMISSIONS`, `REPO_NOT_FOUND`, `REPO_MISSING_BRANCHES`, `UNKNOWN`, `SANDBOX_NOT_READY`, `SYNC_FAILED`, `TOKEN_EXPIRED`, `GITHUB_NOT_CONNECTED`, `FIGMA_TOKEN_MISSING`, `FIGMA_TOKEN_MALFORMED`, `FIGMA_TOKEN_INVALID`, `FIGMA_TOKEN_FORBIDDEN`, `FIGMA_RATE_LIMITED`, `FIGMA_UNREACHABLE`, `INVALID_IMPORT_CODE`, `IMPORT_SOURCE_GONE`, `PROJECT_NOT_IMPORTABLE`, `PROJECT_IMPORT_LIMIT_REACHED`, `PROJECT_EXPORT_LIMIT_REACHED`, `VERSION_NOT_FOUND`, `INVALID_CODE_EDIT`, `CODE_EDIT_FAILED`, `BADGE_IN_SOURCE`.
191
+ All server codes: `SERVICE_UNAUTHORIZED`, `SERVICE_REPLAY`, `ACTOR_MISMATCH`, `PAYLOAD_TOO_LARGE`, `VALIDATION_ERROR`, `PROJECT_NOT_FOUND`, `PROJECT_NOT_READY`, `OPERATION_IN_PROGRESS`, `AGENT_RUNNING`, `PROJECT_MOVED`, `OBJECT_MIGRATING`, `INDEX_SHARD_UNAVAILABLE`, `RATE_LIMIT_EXCEEDED`, `RATE_LIMITED`, `PROJECT_PAUSED_RUNAWAY`, `AI_MEDIA_PAUSED_THIS_HOUR`, `PROJECT_PAUSED_BALANCE`, `PROJECT_SUSPENDED`, `PROJECT_HIBERNATED`, `PROJECT_DELETED`, `PROJECT_DELETE_PROTECTED`, `PROJECT_PAUSED_BY_USER`, `LIFECYCLE_NOT_APPLICABLE`, `PROJECT_NOT_PAUSED`, `PAUSE_DUMP_EXPIRED`, `PAUSE_VERIFICATION_FAILED`, `DEPLOYMENT_IN_PROGRESS`, `REACTIVATE_IMPORT_MISMATCH`, `RESUME_IMPORT_MISMATCH`, `INSUFFICIENT_CREDITS`, `VCAAS_INSUFFICIENT_CREDITS`, `PROJECT_CREDIT_LIMIT_REACHED`, `DEV_INFRASTRUCTURE_LIMIT_REACHED`, `FREE_PROMPTS_DISABLED`, `PLAN_REQUIRED`, `FEATURE_LIMIT_REACHED`, `FEATURE_DISABLED`, `VECTORS_LIMIT_REACHED`, `CONNECTION_REQUIRED`, `CONNECTION_ACTION_FAILED`, `TOOLKIT_NOT_AVAILABLE`, `TOOLKIT_NEEDS_OWN_APP`, `AGENT_ALREADY_RUNNING`, `IMPORT_IN_PROGRESS`, `MIGRATION_TOO_LARGE`, `MIGRATION_START_FAILED`, `MIGRATION_ALREADY_PUBLISHED`, `TOO_MANY_RUN_REQUESTS`, `PROMPT_SECURITY_VIOLATION`, `NO_PROCESS_RUNNING`, `RUN_NOT_FOUND`, `KEY_NOT_FOUND`, `DEPLOYMENT_RUNNING`, `AUTO_EXECUTION_ALREADY_ACTIVE`, `REBUILD_RUNNING`, `SECRET_ALREADY_EXISTS`, `SECRET_LIMIT_EXCEEDED`, `RESERVED_SECRET_NAME`, `DUMP_NOT_FOUND`, `DUMP_INVALID`, `RESTORE_TARGET_NOT_EMPTY`, `ENGINE_NOT_SUPPORTED`, `ENGINE_V2_DISABLED`, `V2_TEMPORARILY_DISABLED`, `ENGINE_REQUEST_NOT_ELIGIBLE`, `ENGINE_MISMATCH`, `INVALID_ENGINE_VERSION`, `PROJECT_ENGINE_MISMATCH`, `ENGINE_UNAVAILABLE`, `PREVIEW_LABEL_TOO_LONG`, `PROJECT_ALREADY_EXISTS`, `CLOUDFLARE_API_ERROR`, `PROVISIONING_BUSY`, `UNAUTHORIZED`, `LEGACY_KEY_NOT_SUPPORTED`, `SANDBOX_KEY_EXPIRED`, `AUTH_RATE_LIMITED`, `FORBIDDEN_SCOPE`, `KEY_ENV_MISMATCH`, `KEY_LIMIT_EXCEEDED`, `LIVE_DB_READ_ONLY`, `LIVE_WRITE_NEEDS_CONFIRMATION`, `DDL_NOT_ALLOWED`, `MIGRATION_IN_PROGRESS`, `MIGRATION_EDITED`, `SCHEMA_OUT_OF_SYNC`, `LIVE_MIGRATION_FAILED`, `DESTRUCTIVE_MIGRATION_NEEDS_CONFIRMATION`, `DESTRUCTIVE_MIGRATION_UNDONE_BY_RESTORE`, `DEV_DATABASE_NOT_FOUND`, `DATABASE_ROLE_NOT_FOUND`, `BOOKMARK_NOT_FOUND`, `BACKUP_NOT_FOUND`, `BACKUP_NOT_DELETABLE`, `BACKUP_RATE_LIMITED`, `BACKUP_TOO_LARGE_FOR_IMPORT`, `PRE_RESTORE_BACKUP_FAILED`, `RESTORE_VERIFY_FAILED`, `RESTORE_BEFORE_LIVE_MIGRATION`, `RUN_NOT_LATEST`, `DEV_DATABASE_EXISTS`, `SQL_ERROR`, `SQL_MULTI_STATEMENT`, `SQL_STATEMENT_TOO_LARGE`, `SQL_TOO_MANY_PARAMS`, `STATEMENT_NOT_ALLOWED`, `VIRTUAL_TABLES_NOT_SUPPORTED`, `USE_STORAGE_FOR_FILES`, `D1_TYPE_ERROR`, `MIGRATION_INVALID`, `SYSTEM_TABLE_READ_ONLY`, `SQL_READ_ONLY`, `RESULT_TOO_LARGE`, `NL_QUERY_UNANSWERABLE`, `QUERY_TIMEOUT`, `DB_OVERLOADED`, `D1_TRANSIENT`, `DB_FULL_NEAR_LIMIT`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENT_REPLAY_UNAVAILABLE`, `TABLE_NOT_FOUND`, `SCHEMA_TOO_LARGE_FOR_COUNTS`, `EXEC_REQUIRES_MIGRATE_MODE`, `MIGRATION_UNKNOWN_IN_DB`, `QUERY_LIMIT_EXCEEDED`, `STORAGE_LIMIT_EXCEEDED`, `METER_UNAVAILABLE`, `COLUMN_NOT_FOUND`, `VALUE_NOT_ALLOWED`, `COLUMN_REQUIRED`, `FILTER_TOO_COMPLEX`, `OFFSET_TOO_LARGE`, `BULK_TOO_LARGE`, `NOT_A_JUNCTION_TABLE`, `AMBIGUOUS_RELATION`, `LIVE_WRITE_CONFIRMATION_REQUIRED`, `RECORD_NOT_FOUND`, `RECORD_KEY_REQUIRED`, `AMBIGUOUS_RECORD_ID`, `DEV_NAME_GUARD`, `PROD_NAME_GUARD`, `INVALID_RUN_REQUEST`, `RUN_ALREADY_ACTIVE`, `RUN_CONFLICT`, `INVALID_CREDENTIALS`, `ADAPTER_UNAVAILABLE`, `DISK_FULL`, `DEPLOY_FIX_ATTEMPTS_EXHAUSTED`, `TOKEN_REVOKED`, `AM_UPDATE_DOWNLOAD_FAILED`, `AM_UPDATE_BAD_SHA`, `AM_UPDATE_BAD_SIGNATURE`, `AM_UPDATE_INCOMPATIBLE_IMAGE`, `AM_UPDATE_START_FAILED`, `AM_VERSION_UNAVAILABLE`, `AM_UPDATE_FAILED`, `RELEASE_CANARY_NOT_PASSED`, `RELEASE_NOT_FOUND`, `RELEASE_ROLLOUT_ACTIVE`, `RELEASE_GUARD_PAUSED`, `RELEASE_BUILD_UNAVAILABLE`, `RELEASE_BELOW_MIN_SAFE_VERSION`, `VISUAL_EDIT_PREVIEW_DEPLOYING`, `VISUAL_EDIT_NOT_PATCHABLE`, `VISUAL_EDIT_BASE_MISMATCH`, `VISUAL_EDIT_TYPECHECK_FAILED`, `INVALID_VISUAL_EDIT`, `IMAGE_VERSION_NOT_FOUND`, `IMAGE_VERSION_NOT_PROMOTABLE`, `REALTIME_TICKET_INVALID`, `REALTIME_TICKET_EXPIRED`, `REALTIME_PERMISSION_DENIED`, `REALTIME_MESSAGE_TOO_LARGE`, `REALTIME_MESSAGE_RATE_EXCEEDED`, `REALTIME_CONNECTION_LIMIT_REACHED`, `REALTIME_ROOM_LIMIT_REACHED`, `CONFIRMATION_REQUIRED`, `MIGRATION_NOT_REVERSIBLE`, `ALREADY_ON_PROVIDER`, `DATABASE_MIGRATING`, `TURSO_STORAGE_INSUFFICIENT`, `LOGWATCH_INACTIVE`, `AGENT_LOG_READS_LIMIT`, `LOGS_UPSTREAM_ERROR`, `ANALYTICS_INVALID_QUERY`, `ANALYTICS_UPSTREAM_ERROR`, `ANALYTICS_WINDOW_OUT_OF_RETENTION`, `INVALID_CIDR`, `RATE_LIMIT_ABOVE_PLAN`, `RATE_LIMIT_DISABLE_NOT_ALLOWED`, `OWNER_ONLY`, `SIGNING_NOT_CONFIGURED`, `SIGNING_ALREADY_CONFIGURED`, `SIGNING_INVALID_KEYSTORE`, `SIGNING_INVALID_ASC_KEY`, `KEYSTORE_DOWNLOAD_EXPIRED`, `KEYSTORE_NOT_DOWNLOADABLE`, `MOBILE_BUILD_RUNNING`, `MOBILE_BUILD_RATE_LIMITED`, `MOBILE_BUILD_QUEUE_TIMEOUT`, `MOBILE_BUILD_NOT_CANCELLABLE`, `MOBILE_BUILD_NOT_FOUND`, `MOBILE_BUILD_NOT_READY`, `MOBILE_REQUIRES_PUBLISHED_PROJECT`, `DOWNLOAD_EXPIRED`, `PROCESS_IN_PROGRESS`, `SANDBOX_NOT_RUNNING`, `MOBILE_LAYER_MISSING`, `MOBILE_BUILD_FAILED`, `MOBILE_ARTIFACT_INVALID`, `SIGNING_FINGERPRINT_MISMATCH`, `AM_RESTARTED`, `MOBILE_BUILD_NOT_SIGNED`, `STORE_NOT_CONFIGURED`, `STORE_CREDENTIALS_INVALID`, `STORE_APP_NOT_FOUND`, `STORE_UPLOAD_RUNNING`, `STORE_UPLOAD_LIMIT_REACHED`, `STORE_UPLOAD_NOT_FOUND`, `STORE_UPLOAD_FAILED`, `PLAY_FIRST_UPLOAD_MANUAL`, `STORE_PROCESSING_TIMEOUT`, `LIMIT_ABOVE_PLAN_CEILING`, `UNKNOWN_FEATURE`, `INVALID_LIMIT`, `FEATURE_NOT_DISABLABLE`, `USE_PUT_LIMITS`, `LIMIT_NOT_USER_EDITABLE`, `NOT_AVAILABLE_FOR_ENGINE`, `INVALID_AMOUNT`, `REFUND_EXCEEDS_CHARGES`, `IDEMPOTENCY_CONFLICT`, `ORGANIZATION_NOT_FOUND`, `ACCOUNT_NOT_FOUND`, `PROVIDER_UNAVAILABLE`, `URL_NOT_ALLOWED`, `JOB_NOT_FOUND`, `CONCURRENCY_QUEUE_TIMEOUT`, `CONCURRENCY_QUEUE_FULL`, `PROVIDER_TIMEOUT`, `FILE_TOO_LARGE`, `UNSUPPORTED_FILE_TYPE`, `FILE_NOT_FOUND`, `FILE_KEY_FORBIDDEN`, `FILE_UPLOAD_ERROR`, `FILE_DOWNLOAD_ERROR`, `FILE_DELETE_ERROR`, `UPLOAD_NOT_COMPLETED`, `MISSING_URL`, `MISSING_INPUT`, `MISSING_EXTRACTION_CONFIG`, `MISSING_QUERY`, `SCRAPE_FAILED`, `EXTRACT_FAILED`, `SCREENSHOT_FAILED`, `SEARCH_FAILED`, `SCRAPE_BLOCKED`, `SESSION_NOT_FOUND`, `SESSION_EXPIRED`, `SESSION_BUSY`, `SESSION_LIMIT_REACHED`, `SESSION_ENDED_INSUFFICIENT_CREDITS`, `ACTION_TIMEOUT`, `ACTION_FAILED`, `UNKNOWN_COMMAND`, `BATCH_TOO_LARGE`, `SKIPPED`, `UPLOAD_TOO_LARGE`, `DOWNLOAD_TOO_LARGE`, `CAPTURE_LIMIT_REACHED`, `CAPTCHA_UNSOLVED`, `BROWSER_CDP_NODE_ONLY`, `DIALOG_NOT_OPEN`, `STEALTH_TIER_UNAVAILABLE`, `DOMAIN_NOT_ALLOWED`, `CONTEXT_SEED_UNSUPPORTED`, `EXTENSION_TOO_LARGE`, `NL_PROVIDER_UNAVAILABLE`, `PROGRAM_TOO_LARGE`, `PROGRAM_UNBOUNDED`, `UNKNOWN_STEP`, `PROGRAM_IN_FLIGHT`, `PROGRAM_TIMEOUT`, `PROGRAM_NOT_FOUND`, `PROGRAM_STEP_FAILED`, `PROGRAM_LIMIT_REACHED`, `CREATE_PDF_FROM_HTML_ERROR`, `GENERATE_PDF_BY_URL_ERROR`, `PDF_TIMEOUT`, `PDF_TOO_LARGE`, `FILENAME_REQUIRED`, `SCANUM_EYE_ARRAY_NOT_SUPPORTED`, `INVALID_EXTRA_FIELD_TYPE`, `SCANUM_EYE_PDF_NOT_SUPPORTED`, `UNSUPPORTED_SCAN_MODEL`, `SCAN_DOCUMENT_ERROR`, `SCAN_INVOICE_ERROR`, `OCR_IMAGE_PROCESSING_ERROR`, `OCR_PDF_PROCESSING_ERROR`, `SCAN_TOO_MANY_PAGES`, `SCAN_PDF_ENCRYPTED`, `SCAN_XFA_UNSUPPORTED`, `AUDIO_FILE_REQUIRED`, `AUDIO_FILE_TOO_LARGE`, `INVALID_AUDIO_FORMAT`, `AUDIO_TRANSCRIPTION_ERROR`, `TTS_TEXT_TOO_LONG`, `TTS_VOICE_UNKNOWN`, `TOO_MANY_AUDIO_TRANSCRIPTIONS`, `EMAIL_SEND_FAILED`, `TOO_MANY_ATTACHMENTS`, `INVALID_ATTACHMENT_URL`, `ATTACHMENT_TOO_LARGE`, `TOO_MANY_RECIPIENTS`, `EMAIL_RECIPIENT_SUPPRESSED`, `EMAIL_DOMAIN_NOT_VERIFIED`, `EMAIL_LOCAL_PART_TAKEN`, `EMAIL_SENDING_PAUSED`, `EMAIL_DOMAINS_REQUIRE_PAID_PLAN`, `SUPPRESSION_PERMANENT`, `DEV_RECIPIENT_NOT_ALLOWED`, `CRON_LIMIT_REACHED`, `INVALID_SCHEDULE`, `CRON_URL_NOT_ALLOWED`, `CRON_JOB_NOT_FOUND`, `CRON_REQUIRES_PUBLISHED_PROJECT`, `LIVE_CRON_READ_ONLY`, `URL_NOT_PROJECT_HOST`, `INDEXNOW_ERROR`, `NOT_AVAILABLE_IN_COUNTRY`, `SEO_REQUEST_REJECTED`, `SEO_CITY_NOT_FOUND`, `MCP_VERIFY_FAILED`, `MCP_NAME_RESERVED`, `MCP_LIMIT_REACHED`, `MCP_SERVER_NOT_FOUND`, `PAYMENTS_NOT_ENABLED`, `PAYMENTS_LIVE_ONBOARDING_REQUIRED`, `PAYMENTS_PUBLISH_FIRST`, `PAYMENTS_ACCOUNT_DISCONNECTED`, `CARD_DATA_NOT_ACCEPTED`, `STRIPE_ERROR`, `STRIPE_RATE_LIMITED`, `PAYMENTS_WEBHOOK_SIGNATURE_INVALID`, `AI_MODEL_NOT_ALLOWED`, `AI_MODEL_UNKNOWN`, `AI_INVALID_SCHEMA`, `AI_CONTENT_BLOCKED`, `AI_CONTEXT_TOO_LONG`, `AI_PROVIDER_QUOTA`, `AI_PROVIDER_UNAVAILABLE`, `AI_STREAM_ERROR`, `AI_VIDEO_JOB_NOT_FOUND`, `AI_VIDEO_FAILED`, `MISSING_VIDEO_URL`, `MISSING_PROMPT`, `INVALID_VIDEO_URL`, `INVALID_VIDEO_URL_PROTOCOL`, `INVALID_MIME_TYPE_HINT`, `VIDEO_TOO_LARGE`, `VIDEO_URL_UNREACHABLE`, `VIDEO_URL_NOT_A_VIDEO`, `YOUTUBE_VIDEO_UNAVAILABLE`, `NO_PAYMENT_METHOD`, `DOMAIN_CONTACT_REQUIRED`, `DOMAIN_UNAVAILABLE`, `DOMAIN_PREMIUM_NOT_ALLOWED`, `DOMAIN_PRICE_OVER_CAP`, `TLD_NOT_ALLOWED`, `DOMAIN_LIMIT_REACHED`, `PRICE_CHANGED`, `PAYMENT_FAILED`, `REGISTRATION_FAILED`, `DOMAIN_NOT_RENEWABLE`, `DOMAIN_ALREADY_ATTACHED`, `DNS_RECORD_MANAGED`, `DNS_RECORD_CONFLICT`, `DNS_RECORD_LIMIT`, `DOMAIN_TRANSFER_LOCKED`, `DOMAIN_NOT_FOUND`, `DOMAIN_IN_USE`, `DOMAIN_ALREADY_ADDED`, `PROJECT_HAS_CUSTOM_DOMAIN`, `NO_DEPLOYMENT`, `REDIRECT_LIMIT_REACHED`, `REDIRECT_INVALID`, `APEX_NOT_FLATTENABLE`, `SECOND_FACTOR_NOT_CONFIGURED`, `PASSWORD_REQUIRED`, `PASSWORD_INCORRECT`, `TOO_MANY_ATTEMPTS`, `CONFIRMATION_MISMATCH`, `INVALID_TOKEN`, `MISSING_PERMISSIONS`, `REPO_NOT_FOUND`, `REPO_MISSING_BRANCHES`, `UNKNOWN`, `SANDBOX_NOT_READY`, `SYNC_FAILED`, `TOKEN_EXPIRED`, `GITHUB_NOT_CONNECTED`, `FIGMA_TOKEN_MISSING`, `FIGMA_TOKEN_MALFORMED`, `FIGMA_TOKEN_INVALID`, `FIGMA_TOKEN_FORBIDDEN`, `FIGMA_RATE_LIMITED`, `FIGMA_UNREACHABLE`, `INVALID_IMPORT_CODE`, `IMPORT_SOURCE_GONE`, `PROJECT_NOT_IMPORTABLE`, `PROJECT_IMPORT_LIMIT_REACHED`, `PROJECT_EXPORT_LIMIT_REACHED`, `VERSION_NOT_FOUND`, `INVALID_CODE_EDIT`, `CODE_EDIT_FAILED`, `BADGE_IN_SOURCE`.
189
192
 
190
193
  ## Versions and deprecations
191
194
 
@@ -280,7 +283,7 @@ The type of `totalum` and of `createTotalum()`'s result: one property per namesp
280
283
  | `pdf` | [`TotalumPdf`](#totalumpdf) | yes | Turn HTML or a web page into a PDF stored in the project's files: invoices, tickets, reports. See [PDF](#totalum-sdkpdf). |
281
284
  | `realtime` | [`TotalumRealtime`](#totalumrealtime) | yes | Live updates between the people using your app: chat, notifications, presence ("who is online"), collaborative editing, live dashboards and games. See [Realtime](#totalum-sdkrealtime). |
282
285
  | `scan` | [`TotalumScan`](#totalumscan) | yes | Read documents and images: extract the fields you describe (an invoice's number, date and total) as JSON with `document()`, or get the plain text of every page with `ocr()`. See [Document Scan / OCR](#totalum-sdkscan). |
283
- | `seo` | [`TotalumSeo`](#totalumseo) | yes | Tell search engines that pages of your custom domain changed (IndexNow), so new and edited pages are indexed in minutes instead of days. See [SEO & IndexNow](#totalum-sdkseo). |
286
+ | `seo` | [`TotalumSeo`](#totalumseo) | yes | Research what ranks on Google and what AI assistants answer, for a country and language (ISO codes): Google results with "People also ask" and the AI Overview, AI Mode, Maps, what ChatGPT, Claude, Gemini and Perplexity answer and cite, keyword ideas with volume and difficulty, Google Trends, a domain's keywords, competitors, keyword gaps and backlinks, and an on-page analysis of any public page. See [SEO & AI search](#totalum-sdkseo). |
284
287
  | `speech` | [`TotalumSpeech`](#totalumspeech) | yes | Speech to text (`transcribe`) and text to speech (`synthesize`): transcribe a recording or a voice note, read a text aloud, store the audio as a project file. See [Speech](#totalum-sdkspeech). |
285
288
  | `vectors` | [`TotalumVectors`](#totalumvectors) | yes | Semantic search over your own content: store texts or images as vectors with metadata (`upsert`), then find the closest ones to a question, a text or an image (`query`). See [Vector Search](#totalum-sdkvectors). |
286
289
  | `web` | [`TotalumWeb`](#totalumweb) | yes | Read the web from your app: one page as Markdown or HTML (`scrape`), a web search (`search`), every URL of a site (`map`), a whole site in the background (`crawl`) and screenshots. See [Web Scraping & Search](#totalum-sdkweb). |
@@ -1008,7 +1011,7 @@ byte-identical to the binding's message when the failure is SQLite's.
1008
1011
  Deprecated: Since 1.0.0: use `TotalumErrorCode` (the same type).
1009
1012
 
1010
1013
  ```ts
1011
- type TotalumD1ErrorCode = 'SERVICE_UNAUTHORIZED' | 'SERVICE_REPLAY' | 'ACTOR_MISMATCH' | 'PAYLOAD_TOO_LARGE' | 'VALIDATION_ERROR' | 'PROJECT_NOT_FOUND' | 'PROJECT_NOT_READY' | 'OPERATION_IN_PROGRESS' | … // 421 values
1014
+ type TotalumD1ErrorCode = 'SERVICE_UNAUTHORIZED' | 'SERVICE_REPLAY' | 'ACTOR_MISMATCH' | 'PAYLOAD_TOO_LARGE' | 'VALIDATION_ERROR' | 'PROJECT_NOT_FOUND' | 'PROJECT_NOT_READY' | 'OPERATION_IN_PROGRESS' | … // 427 values
1012
1015
  ```
1013
1016
 
1014
1017
  ### `TotalumD1Options`
@@ -7672,20 +7675,76 @@ One page of `cron.runs()`.
7672
7675
 
7673
7676
  ## `totalum-sdk/seo`
7674
7677
 
7675
- Tell search engines that pages of your custom domain changed (IndexNow), so new and edited pages are indexed in
7676
- minutes instead of days. Works on verified custom domains. Free.
7678
+ Research what ranks on Google and what AI assistants answer, for a country and language (ISO codes): Google
7679
+ results with "People also ask" and the AI Overview, AI Mode, Maps, what ChatGPT, Claude, Gemini and Perplexity answer
7680
+ and cite, keyword ideas with volume and difficulty, Google Trends, a domain's keywords, competitors, keyword gaps and
7681
+ backlinks, and an on-page analysis of any public page. Each research call is billed in credits (`usage.credits`) and
7682
+ counts in the plan's SEO calls per minute and per month; call it from a cron job or an owner's action and save the
7683
+ result, never on every page view. Plus IndexNow for verified custom domains (free).
7677
7684
 
7678
7685
  ```ts
7686
+ const { keywords } = await totalum.seo.keywords.ideas({ keywords: ['dentista barcelona'], country: 'es', language: 'es', limit: 20 });
7687
+ const serp = await totalum.seo.serp.google({ keyword: keywords[0].keyword, country: 'es', language: 'es', city: 'Barcelona' });
7679
7688
  await totalum.seo.notifyChanged(['https://www.acme.com/blog/launch']);
7680
7689
  ```
7681
7690
 
7682
7691
  | Method or type | What it does |
7683
7692
  |---|---|
7684
- | [`totalumSeo`](#totalumseo) | Creates the `seo` namespace (the same object as `totalum.seo`, scope `seo`): IndexNow for verified custom domains, free. |
7693
+ | [`totalumSeo`](#totalumseo) | Creates the `seo` namespace (the same object as `totalum.seo`, scope `seo`): search and AI-answer research — Google results, AI Overviews and AI Mode, Maps, what ChatGPT, Claude, Gemini and Perplexity answer and cite, keyword ideas and volumes, competitors and keyword gaps, backlinks and on-page analysis — for a country and language (ISO codes, e.g. |
7685
7694
  | [`seo.notifyChanged`](#seonotifychanged) | Tells the search engines that use IndexNow (Bing, Yandex, Seznam, Naver, …) that these pages of the project's custom domain were added or changed, so they are crawled again soon, and fetches each domain's `/sitemap.xml` so it is fresh. |
7686
7695
  | [`seo.indexNowKey`](#seoindexnowkey) | The project's IndexNow key: the template serves it at `/<key>.txt` so search engines can check the submissions are yours. |
7696
+ | [`seo.locations`](#seolocations) | The countries and languages the research methods accept, and for each country the languages keyword, domain and AI data exist in (search results take any listed language). |
7697
+ | [`seo.serp.google`](#seoserpgoogle) | Google's results for a keyword as searched from a country (or one of its cities), in a language: the organic results, the featured snippet, "People also ask", related searches and the AI Overview with its sources. |
7698
+ | [`seo.serp.aiMode`](#seoserpaimode) | Google's AI Mode answer for a question and the pages it cites, where Google offers AI Mode. |
7699
+ | [`seo.serp.maps`](#seoserpmaps) | Google Maps results for a search (local businesses): name, category, address, phone, website, rating and reviews — the local competitors of a business. |
7700
+ | [`seo.ai.answer`](#seoaianswer) | What an AI assistant (ChatGPT, Claude, Gemini or Perplexity) answers to a question, with the web searches it ran, the pages it cited and their domains — to see which brands and sites the AIs recommend (GEO). |
7701
+ | [`seo.ai.chatgptSearch`](#seoaichatgptsearch) | ChatGPT's search answer for a query as shown to users in a country: the answer, the sources and search results it showed, and the brands it named. |
7702
+ | [`seo.ai.mentions`](#seoaimentions) | Where a domain, or a keyword or brand, is mentioned in AI answers (Google's AI Overviews; ChatGPT for the United States in English): the questions and answers, or the most cited domains or pages. |
7703
+ | [`seo.ai.keywordVolume`](#seoaikeywordvolume) | How often keywords are asked to AI assistants per month (AI search volume), per keyword. |
7704
+ | [`seo.keywords.ideas`](#seokeywordsideas) | Keyword ideas around seed keywords (phrases containing the first seed first, then wider ideas), each with its monthly Google search volume, cost per click, competition, difficulty and intent — to choose what a page or an article targets. |
7705
+ | [`seo.keywords.related`](#seokeywordsrelated) | The searches Google relates to a keyword ("related searches", followed `depth` hops), with the same data as `ideas` — topic clusters and article ideas. |
7706
+ | [`seo.keywords.overview`](#seokeywordsoverview) | The search data of keywords you already have (up to 700): volume, cost per click, competition, difficulty, intent and the last 12 months. |
7707
+ | [`seo.keywords.trends`](#seokeywordstrends) | Google Trends interest over time (0–100) for up to 5 keywords, worldwide or in a country — seasonality and which wording is rising. |
7708
+ | [`seo.domain.keywords`](#seodomainkeywords) | The keywords a domain ranks for on Google in a country, with its position, the ranking URL and the estimated traffic — what a competitor gets its visits from. |
7709
+ | [`seo.domain.competitors`](#seodomaincompetitors) | The domains that compete with a domain on Google in a country (most shared keywords first). |
7710
+ | [`seo.domain.keywordGap`](#seodomainkeywordgap) | The keyword gap between a domain and a competitor: the keywords the competitor ranks for and the domain does not (`missing`), or that both rank for (`shared`). |
7711
+ | [`seo.domain.backlinks`](#seodomainbacklinks) | A domain's backlink profile: authority rank, backlinks, referring domains, spam score and where its links come from. |
7712
+ | [`seo.page.analyze`](#seopageanalyze) | Reads one public page as a search engine does: title, description, canonical, headings, word count, links, images, structured data, social tags, an on-page score with the issues found, and its main text by section — the structure of a page that ranks. |
7713
+ | [`SeoAiAnswerInput`](#seoaianswerinput) | The question of `seo.ai.answer()`. |
7714
+ | [`SeoAiAnswerOutput`](#seoaiansweroutput) | The assistant's answer. |
7715
+ | [`SeoAiKeywordVolumeInput`](#seoaikeywordvolumeinput) | The keywords of `seo.ai.keywordVolume()`. |
7716
+ | [`SeoAiKeywordVolumeOutput`](#seoaikeywordvolumeoutput) | AI search volume per keyword. |
7717
+ | [`SeoAiMentionsInput`](#seoaimentionsinput) | The target of `seo.ai.mentions()`: exactly one of `domain` or `keyword`. |
7718
+ | [`SeoAiMentionsOutput`](#seoaimentionsoutput) | Mentions in AI answers; the field present depends on `view`. |
7719
+ | [`SeoBacklinksSummaryInput`](#seobacklinkssummaryinput) | The domain of `seo.domain.backlinks()`. |
7720
+ | [`SeoBacklinksSummaryOutput`](#seobacklinkssummaryoutput) | A domain's backlink profile. |
7721
+ | [`SeoChatGptSearchInput`](#seochatgptsearchinput) | The query of `seo.ai.chatgptSearch()`. |
7722
+ | [`SeoChatGptSearchOutput`](#seochatgptsearchoutput) | ChatGPT's search answer. |
7723
+ | [`SeoDomainCompetitorsInput`](#seodomaincompetitorsinput) | The domain of `seo.domain.competitors()`. |
7724
+ | [`SeoDomainCompetitorsOutput`](#seodomaincompetitorsoutput) | A domain's search competitors. |
7725
+ | [`SeoDomainKeywordsInput`](#seodomainkeywordsinput) | The domain of `seo.domain.keywords()`. |
7726
+ | [`SeoDomainKeywordsOutput`](#seodomainkeywordsoutput) | The keywords a domain ranks for. |
7687
7727
  | [`SeoIndexNowKey`](#seoindexnowkey-type) | The project's IndexNow key. |
7728
+ | [`SeoKeyword`](#seokeyword) | One keyword's Google search data in the country and language asked. |
7729
+ | [`SeoKeywordGapInput`](#seokeywordgapinput) | The two domains of `seo.domain.keywordGap()`. |
7730
+ | [`SeoKeywordGapOutput`](#seokeywordgapoutput) | The keyword gap between two domains. |
7731
+ | [`SeoKeywordIdeasInput`](#seokeywordideasinput) | The seeds of `seo.keywords.ideas()`. |
7732
+ | [`SeoKeywordOverviewInput`](#seokeywordoverviewinput) | The keywords of `seo.keywords.overview()`. |
7733
+ | [`SeoKeywordRelatedInput`](#seokeywordrelatedinput) | The keyword of `seo.keywords.related()`. |
7734
+ | [`SeoKeywordsOutput`](#seokeywordsoutput) | Keywords with their search data. |
7735
+ | [`SeoKeywordTrendsInput`](#seokeywordtrendsinput) | The keywords of `seo.keywords.trends()`. |
7736
+ | [`SeoKeywordTrendsOutput`](#seokeywordtrendsoutput) | Google Trends interest over time. |
7737
+ | [`SeoLocationsOutput`](#seolocationsoutput) | The places the research methods accept. |
7688
7738
  | [`SeoNotifyOutput`](#seonotifyoutput) | The answer of `seo.notifyChanged()`. |
7739
+ | [`SeoPageAnalyzeInput`](#seopageanalyzeinput) | The page of `seo.page.analyze()`. |
7740
+ | [`SeoPageAnalyzeOutput`](#seopageanalyzeoutput) | One page as a search engine reads it. |
7741
+ | [`SeoSerpAiModeInput`](#seoserpaimodeinput) | The question of `seo.serp.aiMode()`. |
7742
+ | [`SeoSerpAiModeOutput`](#seoserpaimodeoutput) | Google AI Mode's answer. |
7743
+ | [`SeoSerpGoogleInput`](#seoserpgoogleinput) | The search of `seo.serp.google()`. |
7744
+ | [`SeoSerpGoogleOutput`](#seoserpgoogleoutput) | Google's results page for the keyword. |
7745
+ | [`SeoSerpMapsInput`](#seoserpmapsinput) | The search of `seo.serp.maps()`. |
7746
+ | [`SeoSerpMapsOutput`](#seoserpmapsoutput) | Google Maps places for the search. |
7747
+ | [`SeoSource`](#seosource) | A page an answer cites or a result links to. |
7689
7748
 
7690
7749
  ### `totalumSeo`
7691
7750
 
@@ -7693,8 +7752,11 @@ await totalum.seo.notifyChanged(['https://www.acme.com/blog/launch']);
7693
7752
  totalumSeo(options?: TotalumClientOptions): TotalumSeo
7694
7753
  ```
7695
7754
 
7696
- Creates the `seo` namespace (the same object as `totalum.seo`, scope `seo`): IndexNow for verified custom domains,
7697
- free.
7755
+ Creates the `seo` namespace (the same object as `totalum.seo`, scope `seo`): search and AI-answer research —
7756
+ Google results, AI Overviews and AI Mode, Maps, what ChatGPT, Claude, Gemini and Perplexity answer and cite,
7757
+ keyword ideas and volumes, competitors and keyword gaps, backlinks and on-page analysis — for a country and
7758
+ language (ISO codes, e.g. `es`/`es`), billed in credits (every result carries `usage.credits`); plus IndexNow for
7759
+ verified custom domains, free. The plan limits the research calls per minute and per month.
7698
7760
 
7699
7761
  **Parameters**
7700
7762
 
@@ -7713,7 +7775,7 @@ free.
7713
7775
  import { totalumSeo } from 'totalum-sdk/seo';
7714
7776
 
7715
7777
  const seo = totalumSeo();
7716
- await seo.notifyChanged(['https://www.acme.com/blog/launch']);
7778
+ const { keywords } = await seo.keywords.ideas({ keywords: ['dentista'], country: 'es', language: 'es' });
7717
7779
  ```
7718
7780
 
7719
7781
  The namespace's type is exported as `TotalumSeo` (`import type { TotalumSeo } from 'totalum-sdk/seo'`).
@@ -7797,6 +7859,1159 @@ Result:
7797
7859
  { "key": "99d8cc52…", "keyLocation": "https://acme.totalum.app/99d8cc52….txt" }
7798
7860
  ```
7799
7861
 
7862
+ ### `seo.locations`
7863
+
7864
+ ```ts
7865
+ seo.locations(): Promise<SeoLocationsOutput>
7866
+ ```
7867
+
7868
+ The countries and languages the research methods accept, and for each country the languages keyword, domain
7869
+ and AI data exist in (search results take any listed language). Free.
7870
+
7871
+ **Returns** `Promise<SeoLocationsOutput>` — Every country and language code.
7872
+
7873
+ | Field | Type | Always present | Description |
7874
+ |---|---|---|---|
7875
+ | `countries` | `({ country, name, dataLanguages })[]` | yes | Every country. |
7876
+ | `countries.country` | `string` | yes | Its ISO 3166-1 alpha-2 code. |
7877
+ | `countries.name` | `string` | yes | Its English name. |
7878
+ | `countries.dataLanguages` | `string[]` | yes | The languages keyword, domain and AI data exist in there; search results take any language. |
7879
+ | `languages` | `({ language, name })[]` | yes | Every language. |
7880
+ | `languages.language` | `string` | yes | Its code. |
7881
+ | `languages.name` | `string` | yes | Its English name. |
7882
+
7883
+ **Errors** — besides the [errors every call can throw](#errors):
7884
+
7885
+ | Code | HTTP | When |
7886
+ |---|---|---|
7887
+ | `FORBIDDEN_SCOPE` | 403 | The key lacks the `seo` scope. |
7888
+
7889
+ **Example**
7890
+
7891
+ ```ts
7892
+ const { countries } = await totalum.seo.locations();
7893
+ ```
7894
+
7895
+ Result:
7896
+
7897
+ ```ts
7898
+ { "countries": [{ "country": "es", "name": "Spain", "dataLanguages": ["es"] }, …], "languages": [{ "language": "ca", "name": "Catalan" }, …] }
7899
+ ```
7900
+
7901
+ ### `seo.serp.google`
7902
+
7903
+ ```ts
7904
+ seo.serp.google(input: { country, city?, language, keyword, depth?, device? }): Promise<{ keyword, totalResults, organic, featuredSnippet, peopleAlsoAsk, relatedSearches, aiOverview, usage }>
7905
+ ```
7906
+
7907
+ Google's results for a keyword as searched from a country (or one of its cities), in a language: the organic
7908
+ results, the featured snippet, "People also ask", related searches and the AI Overview with its sources. Use
7909
+ it to see what ranks and what the page that ranks must answer.
7910
+
7911
+ **Parameters**
7912
+
7913
+ | Name | Type | Required | Description |
7914
+ |---|---|---|---|
7915
+ | `input` | `{ country, city?, language, keyword, depth?, device? }` | yes | The keyword, where it is searched from and how many results. |
7916
+ | `input.country` | `string` | yes | The country searched from, as an ISO 3166-1 alpha-2 code (`es`, `us`, any case). |
7917
+ | `input.city` | `string` | no | A city of `country` (`Barcelona`): the results as seen there. Allowed: at least 2 characters, at most 80 characters. |
7918
+ | `input.language` | `string` | yes | The language of the search, as an ISO 639-1 code (`es`, `ca`, `en`) or a regional tag (`pt-BR`). `seo.locations()` lists them. |
7919
+ | `input.keyword` | `string` | yes | What is searched, as a user types it. Allowed: at least 1 character, at most 700 characters. |
7920
+ | `input.depth` | `number` | no | How many results to read, 10 to 100. Allowed: ≥ 10, ≤ 100, default `10`. |
7921
+ | `input.device` | `'mobile' \| 'desktop'` | no | `desktop` or `mobile` results. Allowed: default `"desktop"`. |
7922
+
7923
+ **Returns** `Promise<{ keyword, totalResults, organic, featuredSnippet, peopleAlsoAsk, relatedSearches, aiOverview, usage }>` — The results page and the credits it cost.
7924
+
7925
+ | Field | Type | Always present | Description |
7926
+ |---|---|---|---|
7927
+ | `keyword` | `string` | yes | The keyword searched. |
7928
+ | `totalResults` | `number \| null` | yes | How many results Google reports. |
7929
+ | `organic` | `({ position, title, url, domain, snippet, breadcrumb })[]` | yes | The organic results, in rank order. |
7930
+ | `organic.position` | `number` | yes | The rank among organic results, from 1. |
7931
+ | `organic.title` | `string \| null` | yes | The result's title. |
7932
+ | `organic.url` | `string` | yes | The ranking page's URL. |
7933
+ | `organic.domain` | `string \| null` | yes | The ranking page's host. |
7934
+ | `organic.snippet` | `string \| null` | yes | The text Google shows under the title. |
7935
+ | `organic.breadcrumb` | `string \| null` | yes | The path Google shows above the title. |
7936
+ | `featuredSnippet` | `{ title, snippet, url, domain } \| null` | yes | The answer box at the top, when Google shows one. |
7937
+ | `featuredSnippet.title` | `string \| null` | yes | Its title. |
7938
+ | `featuredSnippet.snippet` | `string \| null` | yes | Its text. |
7939
+ | `featuredSnippet.url` | `string` | yes | The page it quotes. |
7940
+ | `featuredSnippet.domain` | `string \| null` | yes | That page's host. |
7941
+ | `peopleAlsoAsk` | `({ question, answer })[]` | yes | The "People also ask" questions. |
7942
+ | `peopleAlsoAsk.question` | `string` | yes | The question. |
7943
+ | `peopleAlsoAsk.answer` | `{ title, url, domain, snippet } \| null` | yes | The page Google answers it from, when shown. |
7944
+ | `peopleAlsoAsk.answer.title` | `string \| null` | yes | The page's title. |
7945
+ | `peopleAlsoAsk.answer.url` | `string` | yes | The page's URL. |
7946
+ | `peopleAlsoAsk.answer.domain` | `string \| null` | yes | The page's host. |
7947
+ | `peopleAlsoAsk.answer.snippet` | `string \| null` | yes | The answer text. |
7948
+ | `relatedSearches` | `string[]` | yes | The related searches at the bottom of the page. |
7949
+ | `aiOverview` | `{ text, sources } \| null` | yes | Google's AI Overview, when it shows one. |
7950
+ | `aiOverview.text` | `string` | yes | The overview, as Markdown. |
7951
+ | `aiOverview.sources` | [`SeoSource[]`](#seosource) | yes | The pages it cites. |
7952
+ | `usage` | `{ credits }` | yes | What the call cost. |
7953
+ | `usage.credits` | `number` | yes | Credits charged for this call. |
7954
+
7955
+ **Errors** — besides the [errors every call can throw](#errors):
7956
+
7957
+ | Code | HTTP | When |
7958
+ |---|---|---|
7959
+ | `SEO_CITY_NOT_FOUND` | 400 | No such city in `country`. |
7960
+ | `NOT_AVAILABLE_IN_COUNTRY` | 400 | No data for that country and language. |
7961
+ | `RATE_LIMIT_EXCEEDED` | 429 | The plan's SEO calls per minute or per month are used up; `details.period`. |
7962
+ | `PROVIDER_TIMEOUT` | 504 | The search took too long; retry. |
7963
+ | `PROVIDER_UNAVAILABLE` | 503 | Search data is unavailable; retry later. |
7964
+
7965
+ **Example**
7966
+
7967
+ ```ts
7968
+ const page = await totalum.seo.serp.google({ keyword: 'dentista barcelona', country: 'es', language: 'es', city: 'Barcelona' });
7969
+ ```
7970
+
7971
+ Result:
7972
+
7973
+ ```json
7974
+ {
7975
+ "keyword": "dentista barcelona",
7976
+ "totalResults": 3150000,
7977
+ "organic": [{ "position": 1, "title": "Clínica Dental …", "url": "https://www.example.es/", "domain": "www.example.es", "snippet": "…", "breadcrumb": "https://www.example.es" }],
7978
+ "featuredSnippet": null,
7979
+ "peopleAlsoAsk": [{ "question": "¿Cuánto cuesta un empaste en Barcelona?", "answer": null }],
7980
+ "relatedSearches": ["dentista barcelona urgencias"],
7981
+ "aiOverview": null,
7982
+ "usage": { "credits": 0.1429 }
7983
+ }
7984
+ ```
7985
+
7986
+ ### `seo.serp.aiMode`
7987
+
7988
+ ```ts
7989
+ seo.serp.aiMode(input: { country, language, keyword, device? }): Promise<{ sources, keyword, answer, usage }>
7990
+ ```
7991
+
7992
+ Google's AI Mode answer for a question and the pages it cites, where Google offers AI Mode.
7993
+
7994
+ **Parameters**
7995
+
7996
+ | Name | Type | Required | Description |
7997
+ |---|---|---|---|
7998
+ | `input` | `{ country, language, keyword, device? }` | yes | The question and where it is asked from. |
7999
+ | `input.country` | `string` | yes | The country searched from, as an ISO 3166-1 alpha-2 code (`es`, `us`, any case). |
8000
+ | `input.language` | `string` | yes | The language of the search, as an ISO 639-1 code (`es`, `ca`, `en`) or a regional tag (`pt-BR`). `seo.locations()` lists them. |
8001
+ | `input.keyword` | `string` | yes | The question, as a user asks it. Allowed: at least 1 character, at most 700 characters. |
8002
+ | `input.device` | `'mobile' \| 'desktop'` | no | `desktop` or `mobile`. Allowed: default `"desktop"`. |
8003
+
8004
+ **Returns** `Promise<{ sources, keyword, answer, usage }>` — The answer, its sources and the credits it cost.
8005
+
8006
+ | Field | Type | Always present | Description |
8007
+ |---|---|---|---|
8008
+ | `sources` | [`SeoSource[]`](#seosource) | yes | The pages it cites. |
8009
+ | `keyword` | `string` | yes | The question asked. |
8010
+ | `answer` | `string` | yes | The answer, as Markdown. |
8011
+ | `usage` | `{ credits }` | yes | What the call cost. |
8012
+ | `usage.credits` | `number` | yes | Credits charged for this call. |
8013
+
8014
+ **Errors** — besides the [errors every call can throw](#errors):
8015
+
8016
+ | Code | HTTP | When |
8017
+ |---|---|---|
8018
+ | `NOT_AVAILABLE_IN_COUNTRY` | 400 | Google does not offer AI Mode there, or no data for that country and language. |
8019
+ | `RATE_LIMIT_EXCEEDED` | 429 | The plan's SEO calls per minute or per month are used up; `details.period`. |
8020
+ | `PROVIDER_TIMEOUT` | 504 | The search took too long; retry. |
8021
+ | `PROVIDER_UNAVAILABLE` | 503 | Search data is unavailable; retry later. |
8022
+
8023
+ **Example**
8024
+
8025
+ ```ts
8026
+ const ai = await totalum.seo.serp.aiMode({ keyword: 'best budgeting apps', country: 'us', language: 'en' });
8027
+ ```
8028
+
8029
+ Result:
8030
+
8031
+ ```json
8032
+ { "keyword": "best budgeting apps", "answer": "Popular choices include …", "sources": [{ "title": "…", "url": "https://…", "domain": "…" }], "usage": { "credits": 0.2858 } }
8033
+ ```
8034
+
8035
+ ### `seo.serp.maps`
8036
+
8037
+ ```ts
8038
+ seo.serp.maps(input: { country, city?, language, keyword, depth? }): Promise<{ keyword, results, usage }>
8039
+ ```
8040
+
8041
+ Google Maps results for a search (local businesses): name, category, address, phone, website, rating and
8042
+ reviews — the local competitors of a business.
8043
+
8044
+ **Parameters**
8045
+
8046
+ | Name | Type | Required | Description |
8047
+ |---|---|---|---|
8048
+ | `input` | `{ country, city?, language, keyword, depth? }` | yes | The search, where it is made from and how many results. |
8049
+ | `input.country` | `string` | yes | The country searched from, as an ISO 3166-1 alpha-2 code (`es`, `us`, any case). |
8050
+ | `input.city` | `string` | no | A city of `country`: the places as seen there. Allowed: at least 2 characters, at most 80 characters. |
8051
+ | `input.language` | `string` | yes | The language of the search, as an ISO 639-1 code (`es`, `ca`, `en`) or a regional tag (`pt-BR`). `seo.locations()` lists them. |
8052
+ | `input.keyword` | `string` | yes | What is searched on Maps (`dentista`, `pizzeria`). Allowed: at least 1 character, at most 700 characters. |
8053
+ | `input.depth` | `number` | no | How many places to read, 1 to 100. Allowed: ≥ 1, ≤ 100, default `20`. |
8054
+
8055
+ **Returns** `Promise<{ keyword, results, usage }>` — The places, best first, and the credits it cost.
8056
+
8057
+ | Field | Type | Always present | Description |
8058
+ |---|---|---|---|
8059
+ | `keyword` | `string` | yes | The search. |
8060
+ | `results` | `({ position, title, category, address, city, phone, website, rating, reviews, priceLevel, latitude, longitude, placeId, claimed })[]` | yes | The places, in rank order. |
8061
+ | `results.position` | `number` | yes | The rank, from 1. |
8062
+ | `results.title` | `string` | yes | The place's name. |
8063
+ | `results.category` | `string \| null` | yes | Its main category. |
8064
+ | `results.address` | `string \| null` | yes | Its address. |
8065
+ | `results.city` | `string \| null` | yes | Its city. |
8066
+ | `results.phone` | `string \| null` | yes | Its phone number. |
8067
+ | `results.website` | `string \| null` | yes | Its website. |
8068
+ | `results.rating` | `number \| null` | yes | Its average rating, 1–5. |
8069
+ | `results.reviews` | `number \| null` | yes | How many reviews it has. |
8070
+ | `results.priceLevel` | `string \| null` | yes | Its price level, when shown. |
8071
+ | `results.latitude` | `number \| null` | yes | Latitude. |
8072
+ | `results.longitude` | `number \| null` | yes | Longitude. |
8073
+ | `results.placeId` | `string \| null` | yes | Google's place id. |
8074
+ | `results.claimed` | `boolean \| null` | yes | Whether the owner claimed the listing. |
8075
+ | `usage` | `{ credits }` | yes | What the call cost. |
8076
+ | `usage.credits` | `number` | yes | Credits charged for this call. |
8077
+
8078
+ **Errors** — besides the [errors every call can throw](#errors):
8079
+
8080
+ | Code | HTTP | When |
8081
+ |---|---|---|
8082
+ | `SEO_CITY_NOT_FOUND` | 400 | No such city in `country`. |
8083
+ | `NOT_AVAILABLE_IN_COUNTRY` | 400 | No data for that country and language. |
8084
+ | `RATE_LIMIT_EXCEEDED` | 429 | The plan's SEO calls per minute or per month are used up; `details.period`. |
8085
+ | `PROVIDER_TIMEOUT` | 504 | The search took too long; retry. |
8086
+ | `PROVIDER_UNAVAILABLE` | 503 | Search data is unavailable; retry later. |
8087
+
8088
+ **Example**
8089
+
8090
+ ```ts
8091
+ const { results } = await totalum.seo.serp.maps({ keyword: 'dentista', country: 'es', language: 'es', city: 'Barcelona', depth: 10 });
8092
+ ```
8093
+
8094
+ Result:
8095
+
8096
+ ```ts
8097
+ { "keyword": "dentista", "results": [{ "position": 1, "title": "Clínica Dental …", "category": "Dentista", "rating": 4.9, "reviews": 812, … }], "usage": { "credits": 0.1429 } }
8098
+ ```
8099
+
8100
+ ### `seo.ai.answer`
8101
+
8102
+ ```ts
8103
+ seo.ai.answer(input: { country?, prompt, model?, platform?, webSearch? }): Promise<{ sources, model, platform, answer, citedDomains, searchQueries, usage }>
8104
+ ```
8105
+
8106
+ What an AI assistant (ChatGPT, Claude, Gemini or Perplexity) answers to a question, with the web searches it
8107
+ ran, the pages it cited and their domains — to see which brands and sites the AIs recommend (GEO). Among the
8108
+ dearer research calls: ask a few real questions, not dozens.
8109
+
8110
+ **Parameters**
8111
+
8112
+ | Name | Type | Required | Description |
8113
+ |---|---|---|---|
8114
+ | `input` | `{ country?, prompt, model?, platform?, webSearch? }` | yes | The question, the assistant and the country its web search runs from. |
8115
+ | `input.country` | `string` | no | The country its web search runs from (ISO 3166-1 alpha-2). |
8116
+ | `input.prompt` | `string` | yes | The question, as a user asks the assistant. Allowed: at least 1 character, at most 500 characters. |
8117
+ | `input.model` | `string` | no | A model id of that assistant; omitted = a current fast model. |
8118
+ | `input.platform` | `'claude' \| 'chatgpt' \| 'gemini' \| 'perplexity'` | no | The assistant: `chatgpt`, `claude`, `gemini` or `perplexity`. Allowed: default `"chatgpt"`. |
8119
+ | `input.webSearch` | `boolean` | no | Whether the assistant may search the web (as it does for users); `true` by default. Allowed: default `true`. |
8120
+
8121
+ **Returns** `Promise<{ sources, model, platform, answer, citedDomains, searchQueries, usage }>` — The answer, its sources and the credits it cost.
8122
+
8123
+ | Field | Type | Always present | Description |
8124
+ |---|---|---|---|
8125
+ | `sources` | [`SeoSource[]`](#seosource) | yes | The pages it cited. |
8126
+ | `model` | `string` | yes | The model that answered. |
8127
+ | `platform` | `'claude' \| 'chatgpt' \| 'gemini' \| 'perplexity'` | yes | The assistant asked. |
8128
+ | `answer` | `string` | yes | The answer, as Markdown. |
8129
+ | `citedDomains` | `string[]` | yes | The domains of those pages. |
8130
+ | `searchQueries` | `string[]` | yes | The web searches the assistant ran. |
8131
+ | `usage` | `{ credits }` | yes | What the call cost. |
8132
+ | `usage.credits` | `number` | yes | Credits charged for this call. |
8133
+
8134
+ **Errors** — besides the [errors every call can throw](#errors):
8135
+
8136
+ | Code | HTTP | When |
8137
+ |---|---|---|
8138
+ | `SEO_REQUEST_REJECTED` | 400 | The question or model was refused; `details.field`. |
8139
+ | `RATE_LIMIT_EXCEEDED` | 429 | The plan's SEO calls per minute or per month are used up; `details.period`. |
8140
+ | `PROVIDER_TIMEOUT` | 504 | The answer took too long; retry. |
8141
+ | `PROVIDER_UNAVAILABLE` | 503 | The AI data is unavailable; retry later. |
8142
+
8143
+ **Example**
8144
+
8145
+ ```ts
8146
+ const a = await totalum.seo.ai.answer({ prompt: 'Mejor clínica dental en Barcelona', platform: 'chatgpt', country: 'es' });
8147
+ ```
8148
+
8149
+ Result:
8150
+
8151
+ ```json
8152
+ { "platform": "chatgpt", "model": "…", "answer": "Algunas de las clínicas mejor valoradas …", "sources": [{ "title": "…", "url": "https://…", "domain": "…" }], "citedDomains": ["www.doctoralia.es"], "searchQueries": ["mejor clínica dental barcelona"], "usage": { "credits": 2.1883 } }
8153
+ ```
8154
+
8155
+ ### `seo.ai.chatgptSearch`
8156
+
8157
+ ```ts
8158
+ seo.ai.chatgptSearch(input: SeoChatGptSearchInput): Promise<{ sources, keyword, answer, searchQueries, searchResults, brands, usage }>
8159
+ ```
8160
+
8161
+ ChatGPT's search answer for a query as shown to users in a country: the answer, the sources and search results
8162
+ it showed, and the brands it named.
8163
+
8164
+ **Parameters**
8165
+
8166
+ | Name | Type | Required | Description |
8167
+ |---|---|---|---|
8168
+ | `input` | [`SeoChatGptSearchInput`](#seochatgptsearchinput) | yes | The query and the country and language. |
8169
+ | `input.country` | `string` | yes | The country searched from, as an ISO 3166-1 alpha-2 code (`es`, `us`, any case). |
8170
+ | `input.language` | `string` | yes | The language of the search, as an ISO 639-1 code (`es`, `ca`, `en`) or a regional tag (`pt-BR`). `seo.locations()` lists them. |
8171
+ | `input.keyword` | `string` | yes | The query, as a user types it in ChatGPT. Allowed: at least 1 character, at most 2000 characters. |
8172
+
8173
+ **Returns** `Promise<{ sources, keyword, answer, searchQueries, searchResults, brands, usage }>` — The answer, its sources, brands and the credits it cost.
8174
+
8175
+ | Field | Type | Always present | Description |
8176
+ |---|---|---|---|
8177
+ | `sources` | `({ title, url, domain, snippet, publishedAt })[]` | yes | The pages it cites. |
8178
+ | `sources.title` | `string \| null` | yes | The page's title. |
8179
+ | `sources.url` | `string` | yes | The page's URL. |
8180
+ | `sources.domain` | `string \| null` | yes | The page's host. |
8181
+ | `sources.snippet` | `string \| null` | yes | The text it quotes, when given. |
8182
+ | `sources.publishedAt` | `string \| null` | yes | The page's date, when known. |
8183
+ | `keyword` | `string` | yes | The query. |
8184
+ | `answer` | `string` | yes | The answer, as Markdown. |
8185
+ | `searchQueries` | `string[]` | yes | The searches it ran. |
8186
+ | `searchResults` | [`SeoSource[]`](#seosource) | yes | The search results it showed. |
8187
+ | `brands` | `({ name, category })[]` | yes | The brands and products it named. |
8188
+ | `brands.name` | `string` | yes | The brand or product named. |
8189
+ | `brands.category` | `string \| null` | yes | What it is, when known. |
8190
+ | `usage` | `{ credits }` | yes | What the call cost. |
8191
+ | `usage.credits` | `number` | yes | Credits charged for this call. |
8192
+
8193
+ **Errors** — besides the [errors every call can throw](#errors):
8194
+
8195
+ | Code | HTTP | When |
8196
+ |---|---|---|
8197
+ | `NOT_AVAILABLE_IN_COUNTRY` | 400 | No data for that country and language. |
8198
+ | `RATE_LIMIT_EXCEEDED` | 429 | The plan's SEO calls per minute or per month are used up; `details.period`. |
8199
+ | `PROVIDER_TIMEOUT` | 504 | The answer took too long; retry. |
8200
+ | `PROVIDER_UNAVAILABLE` | 503 | The AI data is unavailable; retry later. |
8201
+
8202
+ **Example**
8203
+
8204
+ ```ts
8205
+ const s = await totalum.seo.ai.chatgptSearch({ keyword: 'best budgeting app', country: 'us', language: 'en' });
8206
+ ```
8207
+
8208
+ Result:
8209
+
8210
+ ```json
8211
+ { "keyword": "best budgeting app", "answer": "…", "sources": [], "searchResults": [], "brands": [{ "name": "YNAB", "category": "Software" }], "searchQueries": ["best budgeting app 2026"], "usage": { "credits": 0.2858 } }
8212
+ ```
8213
+
8214
+ ### `seo.ai.mentions`
8215
+
8216
+ ```ts
8217
+ seo.ai.mentions(input: { country, language, domain?, keyword?, platform?, limit?, view? }): Promise<{ pages?, mentions?, totalCount, domains?, usage }>
8218
+ ```
8219
+
8220
+ Where a domain, or a keyword or brand, is mentioned in AI answers (Google's AI Overviews; ChatGPT for the
8221
+ United States in English): the questions and answers, or the most cited domains or pages. Give exactly one
8222
+ of `domain` or `keyword`. The dearest research call: use it once per brand, not per page.
8223
+
8224
+ **Parameters**
8225
+
8226
+ | Name | Type | Required | Description |
8227
+ |---|---|---|---|
8228
+ | `input` | `{ country, language, domain?, keyword?, platform?, limit?, view? }` | yes | The domain or keyword, the place, the AI and the view. |
8229
+ | `input.country` | `string` | yes | The country searched from, as an ISO 3166-1 alpha-2 code (`es`, `us`, any case). |
8230
+ | `input.language` | `string` | yes | The language of the search, as an ISO 639-1 code (`es`, `ca`, `en`) or a regional tag (`pt-BR`). `seo.locations()` lists them. |
8231
+ | `input.domain` | `string` | no | Mentions of this domain (cited by AI answers). Allowed: at most 253 characters. |
8232
+ | `input.keyword` | `string` | no | Or mentions of this keyword or brand name in AI questions and answers. Allowed: at least 1 character, at most 250 characters. |
8233
+ | `input.platform` | `'chatgpt' \| 'google'` | no | `google` (AI Overviews) or `chatgpt` (United States, English only); omitted = both. |
8234
+ | `input.limit` | `number` | no | At most this many rows. Allowed: ≥ 1, ≤ 100, default `20`. |
8235
+ | `input.view` | `'mentions' \| 'top-domains' \| 'top-pages'` | no | `mentions` (the questions and answers), `top-domains` or `top-pages` (the most cited). Allowed: default `"mentions"`. |
8236
+
8237
+ **Returns** `Promise<{ pages?, mentions?, totalCount, domains?, usage }>` — The mentions (or top domains or pages) and the credits it cost.
8238
+
8239
+ | Field | Type | Always present | Description |
8240
+ |---|---|---|---|
8241
+ | `pages` | `({ mentions, aiSearchVolume, url })[]` | no | The most cited pages (`view: top-pages`). |
8242
+ | `pages.mentions` | `number` | yes | How many answers cite it. |
8243
+ | `pages.aiSearchVolume` | `number \| null` | yes | The monthly AI search volume of those answers. |
8244
+ | `pages.url` | `string` | yes | The page. |
8245
+ | `mentions` | `({ platform, question, answer, sources, brands, aiSearchVolume })[]` | no | The questions and answers (`view: mentions`). |
8246
+ | `mentions.platform` | `'chatgpt' \| 'google'` | yes | `google` (AI Overview) or `chatgpt`. |
8247
+ | `mentions.question` | `string` | yes | The question asked. |
8248
+ | `mentions.answer` | `string` | yes | The AI answer. |
8249
+ | `mentions.sources` | [`SeoSource[]`](#seosource) | yes | The pages it cites. |
8250
+ | `mentions.brands` | `({ name, category })[]` | yes | The brands it names. |
8251
+ | `mentions.brands.name` | `string` | yes | The brand or product named. |
8252
+ | `mentions.brands.category` | `string \| null` | yes | What it is, when known. |
8253
+ | `mentions.aiSearchVolume` | `number \| null` | yes | How often the question is asked per month. |
8254
+ | `totalCount` | `number` | yes | How many mentions exist in all. |
8255
+ | `domains` | `({ mentions, aiSearchVolume, domain })[]` | no | The most cited domains (`view: top-domains`). |
8256
+ | `domains.mentions` | `number` | yes | How many answers cite it. |
8257
+ | `domains.aiSearchVolume` | `number \| null` | yes | The monthly AI search volume of those answers. |
8258
+ | `domains.domain` | `string` | yes | The domain. |
8259
+ | `usage` | `{ credits }` | yes | What the call cost. |
8260
+ | `usage.credits` | `number` | yes | Credits charged for this call. |
8261
+
8262
+ **Errors** — besides the [errors every call can throw](#errors):
8263
+
8264
+ | Code | HTTP | When |
8265
+ |---|---|---|
8266
+ | `VALIDATION_ERROR` | 400 | Neither or both of `domain` and `keyword`. |
8267
+ | `NOT_AVAILABLE_IN_COUNTRY` | 400 | No data for that country and language. |
8268
+ | `RATE_LIMIT_EXCEEDED` | 429 | The plan's SEO calls per minute or per month are used up; `details.period`. |
8269
+ | `PROVIDER_UNAVAILABLE` | 503 | The AI data is unavailable; retry later. |
8270
+
8271
+ **Example**
8272
+
8273
+ ```ts
8274
+ const m = await totalum.seo.ai.mentions({ keyword: 'budgeting app', country: 'us', language: 'en', view: 'top-domains', limit: 5 });
8275
+ ```
8276
+
8277
+ Result:
8278
+
8279
+ ```json
8280
+ { "totalCount": 1814, "domains": [{ "domain": "www.nerdwallet.com", "mentions": 416, "aiSearchVolume": 316550 }], "usage": { "credits": 7.5 } }
8281
+ ```
8282
+
8283
+ ### `seo.ai.keywordVolume`
8284
+
8285
+ ```ts
8286
+ seo.ai.keywordVolume(input: SeoAiKeywordVolumeInput): Promise<{ keywords, usage }>
8287
+ ```
8288
+
8289
+ How often keywords are asked to AI assistants per month (AI search volume), per keyword.
8290
+
8291
+ **Parameters**
8292
+
8293
+ | Name | Type | Required | Description |
8294
+ |---|---|---|---|
8295
+ | `input` | [`SeoAiKeywordVolumeInput`](#seoaikeywordvolumeinput) | yes | Up to 1,000 keywords and the place. |
8296
+ | `input.country` | `string` | yes | The country searched from, as an ISO 3166-1 alpha-2 code (`es`, `us`, any case). |
8297
+ | `input.language` | `string` | yes | The language of the search, as an ISO 639-1 code (`es`, `ca`, `en`) or a regional tag (`pt-BR`). `seo.locations()` lists them. |
8298
+ | `input.keywords` | `string[]` | yes | Up to 1,000 keywords. Allowed: at least 1 item, at most 1000 items. |
8299
+
8300
+ **Returns** `Promise<{ keywords, usage }>` — The AI search volume per keyword and the credits it cost.
8301
+
8302
+ | Field | Type | Always present | Description |
8303
+ |---|---|---|---|
8304
+ | `keywords` | `({ keyword, aiSearchVolume, monthlySearches })[]` | yes | One row per keyword. |
8305
+ | `keywords.keyword` | `string` | yes | The keyword. |
8306
+ | `keywords.aiSearchVolume` | `number \| null` | yes | How often it is asked to AI assistants per month. |
8307
+ | `keywords.monthlySearches` | `({ year, month, aiSearchVolume })[]` | yes | The last 12 months, newest first. |
8308
+ | `keywords.monthlySearches.year` | `number` | yes | The year. |
8309
+ | `keywords.monthlySearches.month` | `number` | yes | The month, 1–12. |
8310
+ | `keywords.monthlySearches.aiSearchVolume` | `number \| null` | yes | AI searches that month. |
8311
+ | `usage` | `{ credits }` | yes | What the call cost. |
8312
+ | `usage.credits` | `number` | yes | Credits charged for this call. |
8313
+
8314
+ **Errors** — besides the [errors every call can throw](#errors):
8315
+
8316
+ | Code | HTTP | When |
8317
+ |---|---|---|
8318
+ | `NOT_AVAILABLE_IN_COUNTRY` | 400 | No data for that country and language. |
8319
+ | `RATE_LIMIT_EXCEEDED` | 429 | The plan's SEO calls per minute or per month are used up; `details.period`. |
8320
+ | `PROVIDER_UNAVAILABLE` | 503 | The AI data is unavailable; retry later. |
8321
+
8322
+ **Example**
8323
+
8324
+ ```ts
8325
+ const v = await totalum.seo.ai.keywordVolume({ keywords: ['budget planner'], country: 'us', language: 'en' });
8326
+ ```
8327
+
8328
+ Result:
8329
+
8330
+ ```json
8331
+ { "keywords": [{ "keyword": "budget planner", "aiSearchVolume": 3241, "monthlySearches": [{ "year": 2026, "month": 10, "aiSearchVolume": 3241 }] }], "usage": { "credits": 0.7215 } }
8332
+ ```
8333
+
8334
+ ### `seo.keywords.ideas`
8335
+
8336
+ ```ts
8337
+ seo.keywords.ideas(input: { country, language, keywords, limit? }): Promise<{ keywords, usage }>
8338
+ ```
8339
+
8340
+ Keyword ideas around seed keywords (phrases containing the first seed first, then wider ideas), each with its
8341
+ monthly Google search volume, cost per click, competition, difficulty and intent — to choose what a page or an
8342
+ article targets.
8343
+
8344
+ **Parameters**
8345
+
8346
+ | Name | Type | Required | Description |
8347
+ |---|---|---|---|
8348
+ | `input` | `{ country, language, keywords, limit? }` | yes | Up to 20 seed keywords, the place and how many ideas. |
8349
+ | `input.country` | `string` | yes | The country searched from, as an ISO 3166-1 alpha-2 code (`es`, `us`, any case). |
8350
+ | `input.language` | `string` | yes | The language of the search, as an ISO 639-1 code (`es`, `ca`, `en`) or a regional tag (`pt-BR`). `seo.locations()` lists them. |
8351
+ | `input.keywords` | `string[]` | yes | Up to 20 seed keywords; ideas containing the first one come first. Allowed: at least 1 item, at most 20 items. |
8352
+ | `input.limit` | `number` | no | At most this many ideas. Allowed: ≥ 1, ≤ 100, default `50`. |
8353
+
8354
+ **Returns** `Promise<{ keywords, usage }>` — The ideas and the credits it cost.
8355
+
8356
+ | Field | Type | Always present | Description |
8357
+ |---|---|---|---|
8358
+ | `keywords` | [`SeoKeyword[]`](#seokeyword) | yes | The keywords, most relevant first. |
8359
+ | `usage` | `{ credits }` | yes | What the call cost. |
8360
+ | `usage.credits` | `number` | yes | Credits charged for this call. |
8361
+
8362
+ **Errors** — besides the [errors every call can throw](#errors):
8363
+
8364
+ | Code | HTTP | When |
8365
+ |---|---|---|
8366
+ | `NOT_AVAILABLE_IN_COUNTRY` | 400 | No keyword data for that country and language. |
8367
+ | `RATE_LIMIT_EXCEEDED` | 429 | The plan's SEO calls per minute or per month are used up; `details.period`. |
8368
+ | `PROVIDER_UNAVAILABLE` | 503 | Keyword data is unavailable; retry later. |
8369
+
8370
+ **Example**
8371
+
8372
+ ```ts
8373
+ const { keywords } = await totalum.seo.keywords.ideas({ keywords: ['dentista barcelona'], country: 'es', language: 'es', limit: 20 });
8374
+ ```
8375
+
8376
+ Result:
8377
+
8378
+ ```json
8379
+ { "keywords": [{ "keyword": "dentista barcelona", "searchVolume": 4400, "cpc": 2.1, "competition": 0.4, "competitionLevel": "medium", "difficulty": 31, "intent": "commercial", "trend": { "monthly": 0, "quarterly": 22, "yearly": -18 }, "monthlySearches": [{ "year": 2026, "month": 10, "searchVolume": 4400 }] }], "usage": { "credits": 2.0572 } }
8380
+ ```
8381
+
8382
+ ### `seo.keywords.related`
8383
+
8384
+ ```ts
8385
+ seo.keywords.related(input: { country, language, keyword, limit?, depth? }): Promise<{ keywords, usage }>
8386
+ ```
8387
+
8388
+ The searches Google relates to a keyword ("related searches", followed `depth` hops), with the same data as
8389
+ `ideas` — topic clusters and article ideas.
8390
+
8391
+ **Parameters**
8392
+
8393
+ | Name | Type | Required | Description |
8394
+ |---|---|---|---|
8395
+ | `input` | `{ country, language, keyword, limit?, depth? }` | yes | The keyword, the place, the depth and how many. |
8396
+ | `input.country` | `string` | yes | The country searched from, as an ISO 3166-1 alpha-2 code (`es`, `us`, any case). |
8397
+ | `input.language` | `string` | yes | The language of the search, as an ISO 639-1 code (`es`, `ca`, `en`) or a regional tag (`pt-BR`). `seo.locations()` lists them. |
8398
+ | `input.keyword` | `string` | yes | The keyword. Allowed: at least 1 character, at most 80 characters. |
8399
+ | `input.limit` | `number` | no | At most this many keywords. Allowed: ≥ 1, ≤ 100, default `50`. |
8400
+ | `input.depth` | `number` | no | How many hops of related searches to follow, 1 to 3. Allowed: ≥ 1, ≤ 3, default `1`. |
8401
+
8402
+ **Returns** `Promise<{ keywords, usage }>` — The related keywords and the credits it cost.
8403
+
8404
+ | Field | Type | Always present | Description |
8405
+ |---|---|---|---|
8406
+ | `keywords` | [`SeoKeyword[]`](#seokeyword) | yes | The keywords, most relevant first. |
8407
+ | `usage` | `{ credits }` | yes | What the call cost. |
8408
+ | `usage.credits` | `number` | yes | Credits charged for this call. |
8409
+
8410
+ **Errors** — besides the [errors every call can throw](#errors):
8411
+
8412
+ | Code | HTTP | When |
8413
+ |---|---|---|
8414
+ | `NOT_AVAILABLE_IN_COUNTRY` | 400 | No keyword data for that country and language. |
8415
+ | `RATE_LIMIT_EXCEEDED` | 429 | The plan's SEO calls per minute or per month are used up; `details.period`. |
8416
+ | `PROVIDER_UNAVAILABLE` | 503 | Keyword data is unavailable; retry later. |
8417
+
8418
+ **Example**
8419
+
8420
+ ```ts
8421
+ const { keywords } = await totalum.seo.keywords.related({ keyword: 'emergency fund', country: 'us', language: 'en', limit: 20 });
8422
+ ```
8423
+
8424
+ Result:
8425
+
8426
+ ```ts
8427
+ { "keywords": [{ "keyword": "how much emergency fund", "searchVolume": 2900, "difficulty": 22, "intent": "informational", … }], "usage": { "credits": 0.9343 } }
8428
+ ```
8429
+
8430
+ ### `seo.keywords.overview`
8431
+
8432
+ ```ts
8433
+ seo.keywords.overview(input: SeoKeywordOverviewInput): Promise<{ keywords, usage }>
8434
+ ```
8435
+
8436
+ The search data of keywords you already have (up to 700): volume, cost per click, competition, difficulty,
8437
+ intent and the last 12 months.
8438
+
8439
+ **Parameters**
8440
+
8441
+ | Name | Type | Required | Description |
8442
+ |---|---|---|---|
8443
+ | `input` | [`SeoKeywordOverviewInput`](#seokeywordoverviewinput) | yes | The keywords and the place. |
8444
+ | `input.country` | `string` | yes | The country searched from, as an ISO 3166-1 alpha-2 code (`es`, `us`, any case). |
8445
+ | `input.language` | `string` | yes | The language of the search, as an ISO 639-1 code (`es`, `ca`, `en`) or a regional tag (`pt-BR`). `seo.locations()` lists them. |
8446
+ | `input.keywords` | `string[]` | yes | Up to 700 keywords. Allowed: at least 1 item, at most 700 items. |
8447
+
8448
+ **Returns** `Promise<{ keywords, usage }>` — One row per keyword found and the credits it cost.
8449
+
8450
+ | Field | Type | Always present | Description |
8451
+ |---|---|---|---|
8452
+ | `keywords` | [`SeoKeyword[]`](#seokeyword) | yes | The keywords, most relevant first. |
8453
+ | `usage` | `{ credits }` | yes | What the call cost. |
8454
+ | `usage.credits` | `number` | yes | Credits charged for this call. |
8455
+
8456
+ **Errors** — besides the [errors every call can throw](#errors):
8457
+
8458
+ | Code | HTTP | When |
8459
+ |---|---|---|
8460
+ | `NOT_AVAILABLE_IN_COUNTRY` | 400 | No keyword data for that country and language. |
8461
+ | `RATE_LIMIT_EXCEEDED` | 429 | The plan's SEO calls per minute or per month are used up; `details.period`. |
8462
+ | `PROVIDER_UNAVAILABLE` | 503 | Keyword data is unavailable; retry later. |
8463
+
8464
+ **Example**
8465
+
8466
+ ```ts
8467
+ const { keywords } = await totalum.seo.keywords.overview({ keywords: ['implantes dentales barcelona', 'ortodoncia invisible barcelona'], country: 'es', language: 'es' });
8468
+ ```
8469
+
8470
+ Result:
8471
+
8472
+ ```ts
8473
+ { "keywords": [{ "keyword": "implantes dentales barcelona", "searchVolume": 1900, "difficulty": 28, … }], "usage": { "credits": 0.8743 } }
8474
+ ```
8475
+
8476
+ ### `seo.keywords.trends`
8477
+
8478
+ ```ts
8479
+ seo.keywords.trends(input: { country?, language?, keywords, timeRange? }): Promise<{ keywords, timeline, usage }>
8480
+ ```
8481
+
8482
+ Google Trends interest over time (0–100) for up to 5 keywords, worldwide or in a country — seasonality and
8483
+ which wording is rising.
8484
+
8485
+ **Parameters**
8486
+
8487
+ | Name | Type | Required | Description |
8488
+ |---|---|---|---|
8489
+ | `input` | `{ country?, language?, keywords, timeRange? }` | yes | The keywords, the place (optional) and the period. |
8490
+ | `input.country` | `string` | no | The country (ISO 3166-1 alpha-2); omitted = worldwide. |
8491
+ | `input.language` | `string` | no | The language; omitted = all. |
8492
+ | `input.keywords` | `string[]` | yes | Up to 5 keywords, compared on one scale. Allowed: at least 1 item, at most 5 items. |
8493
+ | `input.timeRange` | `'past_7_days' \| 'past_30_days' \| 'past_90_days' \| 'past_12_months' \| 'past_5_years'` | no | The period: `past_7_days`, `past_30_days`, `past_90_days`, `past_12_months` or `past_5_years`. Allowed: default `"past_12_months"`. |
8494
+
8495
+ **Returns** `Promise<{ keywords, timeline, usage }>` — The timeline and the credits it cost.
8496
+
8497
+ | Field | Type | Always present | Description |
8498
+ |---|---|---|---|
8499
+ | `keywords` | `string[]` | yes | The keywords, in the order of `values`. |
8500
+ | `timeline` | `({ from, to, values })[]` | yes | One row per period, oldest first. |
8501
+ | `timeline.from` | `string` | yes | The first day of the period. |
8502
+ | `timeline.to` | `string` | yes | The last day. |
8503
+ | `timeline.values` | `(number \| null)[]` | yes | Each keyword's interest, 0–100 (100 = the peak of the chart). |
8504
+ | `usage` | `{ credits }` | yes | What the call cost. |
8505
+ | `usage.credits` | `number` | yes | Credits charged for this call. |
8506
+
8507
+ **Errors** — besides the [errors every call can throw](#errors):
8508
+
8509
+ | Code | HTTP | When |
8510
+ |---|---|---|
8511
+ | `RATE_LIMIT_EXCEEDED` | 429 | The plan's SEO calls per minute or per month are used up; `details.period`. |
8512
+ | `PROVIDER_UNAVAILABLE` | 503 | Trends data is unavailable; retry later. |
8513
+
8514
+ **Example**
8515
+
8516
+ ```ts
8517
+ const t = await totalum.seo.keywords.trends({ keywords: ['budget app', 'expense tracker'], country: 'us' });
8518
+ ```
8519
+
8520
+ Result:
8521
+
8522
+ ```json
8523
+ { "keywords": ["budget app", "expense tracker"], "timeline": [{ "from": "2025-11-23", "to": "2025-11-29", "values": [71, 40] }], "usage": { "credits": 0.7858 } }
8524
+ ```
8525
+
8526
+ ### `seo.domain.keywords`
8527
+
8528
+ ```ts
8529
+ seo.domain.keywords(input: { country, language, domain, limit? }): Promise<{ domain, keywords, totalCount, usage }>
8530
+ ```
8531
+
8532
+ The keywords a domain ranks for on Google in a country, with its position, the ranking URL and the estimated
8533
+ traffic — what a competitor gets its visits from.
8534
+
8535
+ **Parameters**
8536
+
8537
+ | Name | Type | Required | Description |
8538
+ |---|---|---|---|
8539
+ | `input` | `{ country, language, domain, limit? }` | yes | The domain, the place and how many keywords. |
8540
+ | `input.country` | `string` | yes | The country searched from, as an ISO 3166-1 alpha-2 code (`es`, `us`, any case). |
8541
+ | `input.language` | `string` | yes | The language of the search, as an ISO 639-1 code (`es`, `ca`, `en`) or a regional tag (`pt-BR`). `seo.locations()` lists them. |
8542
+ | `input.domain` | `string` | yes | A bare domain (`example.com`); a URL is cut to its host. Allowed: at most 253 characters. |
8543
+ | `input.limit` | `number` | no | At most this many keywords. Allowed: ≥ 1, ≤ 100, default `50`. |
8544
+
8545
+ **Returns** `Promise<{ domain, keywords, totalCount, usage }>` — The ranked keywords, best first, and the credits it cost.
8546
+
8547
+ | Field | Type | Always present | Description |
8548
+ |---|---|---|---|
8549
+ | `domain` | `string` | yes | The domain. |
8550
+ | `keywords` | `({ keyword, searchVolume, cpc, difficulty, intent, position, url, traffic })[]` | yes | The keywords, by traffic. |
8551
+ | `keywords.keyword` | `string` | yes | The keyword. |
8552
+ | `keywords.searchVolume` | `number \| null` | yes | Average monthly Google searches in the country and language asked; `null` when unknown. |
8553
+ | `keywords.cpc` | `number \| null` | yes | Average cost per click of the keyword's ads, in USD; `null` when no ads run on it. |
8554
+ | `keywords.difficulty` | `number \| null` | yes | How hard it is to rank in the top 10, 0 (easy) to 100 (hardest). |
8555
+ | `keywords.intent` | `'informational' \| 'navigational' \| 'commercial' \| 'transactional' \| null` | yes | What the searcher wants: `informational` (to learn), `navigational` (a specific site), `commercial` (to compare before buying) or `transactional` (to buy or book now). |
8556
+ | `keywords.position` | `number` | yes | Its Google position for the keyword. |
8557
+ | `keywords.url` | `string \| null` | yes | The page that ranks. |
8558
+ | `keywords.traffic` | `number \| null` | yes | Estimated monthly visits from this keyword. |
8559
+ | `totalCount` | `number` | yes | How many keywords it ranks for in all. |
8560
+ | `usage` | `{ credits }` | yes | What the call cost. |
8561
+ | `usage.credits` | `number` | yes | Credits charged for this call. |
8562
+
8563
+ **Errors** — besides the [errors every call can throw](#errors):
8564
+
8565
+ | Code | HTTP | When |
8566
+ |---|---|---|
8567
+ | `NOT_AVAILABLE_IN_COUNTRY` | 400 | No data for that country and language. |
8568
+ | `RATE_LIMIT_EXCEEDED` | 429 | The plan's SEO calls per minute or per month are used up; `details.period`. |
8569
+ | `PROVIDER_UNAVAILABLE` | 503 | Domain data is unavailable; retry later. |
8570
+
8571
+ **Example**
8572
+
8573
+ ```ts
8574
+ const d = await totalum.seo.domain.keywords({ domain: 'example.es', country: 'es', language: 'es', limit: 20 });
8575
+ ```
8576
+
8577
+ Result:
8578
+
8579
+ ```ts
8580
+ { "domain": "example.es", "totalCount": 1273, "keywords": [{ "keyword": "…", "position": 1, "url": "https://example.es/p", "traffic": 2.97, "searchVolume": 880, … }], "usage": { "credits": 0.9 } }
8581
+ ```
8582
+
8583
+ ### `seo.domain.competitors`
8584
+
8585
+ ```ts
8586
+ seo.domain.competitors(input: { country, language, domain, limit? }): Promise<{ domain, competitors, usage }>
8587
+ ```
8588
+
8589
+ The domains that compete with a domain on Google in a country (most shared keywords first).
8590
+
8591
+ **Parameters**
8592
+
8593
+ | Name | Type | Required | Description |
8594
+ |---|---|---|---|
8595
+ | `input` | `{ country, language, domain, limit? }` | yes | The domain, the place and how many competitors. |
8596
+ | `input.country` | `string` | yes | The country searched from, as an ISO 3166-1 alpha-2 code (`es`, `us`, any case). |
8597
+ | `input.language` | `string` | yes | The language of the search, as an ISO 639-1 code (`es`, `ca`, `en`) or a regional tag (`pt-BR`). `seo.locations()` lists them. |
8598
+ | `input.domain` | `string` | yes | A bare domain (`example.com`). Allowed: at most 253 characters. |
8599
+ | `input.limit` | `number` | no | At most this many competitors. Allowed: ≥ 1, ≤ 100, default `20`. |
8600
+
8601
+ **Returns** `Promise<{ domain, competitors, usage }>` — The competitors and the credits it cost.
8602
+
8603
+ | Field | Type | Always present | Description |
8604
+ |---|---|---|---|
8605
+ | `domain` | `string` | yes | The domain. |
8606
+ | `competitors` | `({ domain, sharedKeywords, avgPosition, organicKeywords, traffic })[]` | yes | The competitors, most shared keywords first. |
8607
+ | `competitors.domain` | `string` | yes | The competitor's domain. |
8608
+ | `competitors.sharedKeywords` | `number` | yes | Keywords both rank for. |
8609
+ | `competitors.avgPosition` | `number \| null` | yes | The competitor's average position on those. |
8610
+ | `competitors.organicKeywords` | `number \| null` | yes | How many keywords the competitor ranks for. |
8611
+ | `competitors.traffic` | `number \| null` | yes | The competitor's estimated monthly organic visits. |
8612
+ | `usage` | `{ credits }` | yes | What the call cost. |
8613
+ | `usage.credits` | `number` | yes | Credits charged for this call. |
8614
+
8615
+ **Errors** — besides the [errors every call can throw](#errors):
8616
+
8617
+ | Code | HTTP | When |
8618
+ |---|---|---|
8619
+ | `NOT_AVAILABLE_IN_COUNTRY` | 400 | No data for that country and language. |
8620
+ | `RATE_LIMIT_EXCEEDED` | 429 | The plan's SEO calls per minute or per month are used up; `details.period`. |
8621
+ | `PROVIDER_UNAVAILABLE` | 503 | Domain data is unavailable; retry later. |
8622
+
8623
+ **Example**
8624
+
8625
+ ```ts
8626
+ const c = await totalum.seo.domain.competitors({ domain: 'example.es', country: 'es', language: 'es', limit: 5 });
8627
+ ```
8628
+
8629
+ Result:
8630
+
8631
+ ```json
8632
+ { "domain": "example.es", "competitors": [{ "domain": "rival.es", "sharedKeywords": 540, "avgPosition": 18.2, "organicKeywords": 9000, "traffic": 12000 }], "usage": { "credits": 0.9086 } }
8633
+ ```
8634
+
8635
+ ### `seo.domain.keywordGap`
8636
+
8637
+ ```ts
8638
+ seo.domain.keywordGap(input: { country, language, domain, competitor, limit?, mode? }): Promise<{ domain, keywords, competitor, usage }>
8639
+ ```
8640
+
8641
+ The keyword gap between a domain and a competitor: the keywords the competitor ranks for and the domain does
8642
+ not (`missing`), or that both rank for (`shared`).
8643
+
8644
+ **Parameters**
8645
+
8646
+ | Name | Type | Required | Description |
8647
+ |---|---|---|---|
8648
+ | `input` | `{ country, language, domain, competitor, limit?, mode? }` | yes | The domain, the competitor, the place, the mode and how many. |
8649
+ | `input.country` | `string` | yes | The country searched from, as an ISO 3166-1 alpha-2 code (`es`, `us`, any case). |
8650
+ | `input.language` | `string` | yes | The language of the search, as an ISO 639-1 code (`es`, `ca`, `en`) or a regional tag (`pt-BR`). `seo.locations()` lists them. |
8651
+ | `input.domain` | `string` | yes | Your domain. Allowed: at most 253 characters. |
8652
+ | `input.competitor` | `string` | yes | The competitor's domain. Allowed: at most 253 characters. |
8653
+ | `input.limit` | `number` | no | At most this many keywords. Allowed: ≥ 1, ≤ 100, default `50`. |
8654
+ | `input.mode` | `'shared' \| 'missing'` | no | `missing`: the competitor ranks and `domain` does not; `shared`: both rank. Allowed: default `"missing"`. |
8655
+
8656
+ **Returns** `Promise<{ domain, keywords, competitor, usage }>` — The keywords with both positions and the credits it cost.
8657
+
8658
+ | Field | Type | Always present | Description |
8659
+ |---|---|---|---|
8660
+ | `domain` | `string` | yes | Your domain. |
8661
+ | `keywords` | `({ keyword, searchVolume, cpc, difficulty, intent, competitorPosition, competitorUrl, domainPosition, domainUrl })[]` | yes | The keywords. |
8662
+ | `keywords.keyword` | `string` | yes | The keyword. |
8663
+ | `keywords.searchVolume` | `number \| null` | yes | Average monthly Google searches in the country and language asked; `null` when unknown. |
8664
+ | `keywords.cpc` | `number \| null` | yes | Average cost per click of the keyword's ads, in USD; `null` when no ads run on it. |
8665
+ | `keywords.difficulty` | `number \| null` | yes | How hard it is to rank in the top 10, 0 (easy) to 100 (hardest). |
8666
+ | `keywords.intent` | `'informational' \| 'navigational' \| 'commercial' \| 'transactional' \| null` | yes | What the searcher wants: `informational` (to learn), `navigational` (a specific site), `commercial` (to compare before buying) or `transactional` (to buy or book now). |
8667
+ | `keywords.competitorPosition` | `number \| null` | yes | The competitor's position. |
8668
+ | `keywords.competitorUrl` | `string \| null` | yes | The competitor's ranking page. |
8669
+ | `keywords.domainPosition` | `number \| null` | yes | Your position; `null` when you do not rank. |
8670
+ | `keywords.domainUrl` | `string \| null` | yes | Your ranking page, if any. |
8671
+ | `competitor` | `string` | yes | The competitor's domain. |
8672
+ | `usage` | `{ credits }` | yes | What the call cost. |
8673
+ | `usage.credits` | `number` | yes | Credits charged for this call. |
8674
+
8675
+ **Errors** — besides the [errors every call can throw](#errors):
8676
+
8677
+ | Code | HTTP | When |
8678
+ |---|---|---|
8679
+ | `NOT_AVAILABLE_IN_COUNTRY` | 400 | No data for that country and language. |
8680
+ | `RATE_LIMIT_EXCEEDED` | 429 | The plan's SEO calls per minute or per month are used up; `details.period`. |
8681
+ | `PROVIDER_UNAVAILABLE` | 503 | Domain data is unavailable; retry later. |
8682
+
8683
+ **Example**
8684
+
8685
+ ```ts
8686
+ const g = await totalum.seo.domain.keywordGap({ domain: 'example.es', competitor: 'rival.es', country: 'es', language: 'es' });
8687
+ ```
8688
+
8689
+ Result:
8690
+
8691
+ ```ts
8692
+ { "domain": "example.es", "competitor": "rival.es", "keywords": [{ "keyword": "…", "competitorPosition": 3, "competitorUrl": "https://rival.es/p", "domainPosition": null, "domainUrl": null, … }], "usage": { "credits": 0.9 } }
8693
+ ```
8694
+
8695
+ ### `seo.domain.backlinks`
8696
+
8697
+ ```ts
8698
+ seo.domain.backlinks(input: SeoBacklinksSummaryInput): Promise<{ domain, rank, backlinks, referringDomains, referringDomainsNofollow, referringMainDomains, referringIps, brokenBacklinks, spamScore, firstSeen, topTlds, topCountries, usage }>
8699
+ ```
8700
+
8701
+ A domain's backlink profile: authority rank, backlinks, referring domains, spam score and where its links come
8702
+ from.
8703
+
8704
+ **Parameters**
8705
+
8706
+ | Name | Type | Required | Description |
8707
+ |---|---|---|---|
8708
+ | `input` | [`SeoBacklinksSummaryInput`](#seobacklinkssummaryinput) | yes | The domain. |
8709
+ | `input.domain` | `string` | yes | A bare domain (`example.com`). Allowed: at most 253 characters. |
8710
+
8711
+ **Returns** `Promise<{ domain, rank, backlinks, referringDomains, referringDomainsNofollow, referringMainDomains, referringIps, brokenBacklinks, spamScore, firstSeen, topTlds, topCountries, usage }>` — The summary and the credits it cost.
8712
+
8713
+ | Field | Type | Always present | Description |
8714
+ |---|---|---|---|
8715
+ | `domain` | `string` | yes | The domain. |
8716
+ | `rank` | `number \| null` | yes | Authority, 0–1000. |
8717
+ | `backlinks` | `number \| null` | yes | Links pointing to it. |
8718
+ | `referringDomains` | `number \| null` | yes | Domains linking to it. |
8719
+ | `referringDomainsNofollow` | `number \| null` | yes | Of those, the ones whose links are all nofollow. |
8720
+ | `referringMainDomains` | `number \| null` | yes | Distinct main domains linking to it. |
8721
+ | `referringIps` | `number \| null` | yes | Distinct IP addresses linking to it. |
8722
+ | `brokenBacklinks` | `number \| null` | yes | Links to pages of it that no longer exist. |
8723
+ | `spamScore` | `number \| null` | yes | How spammy its link profile looks, 0–100. |
8724
+ | `firstSeen` | `string \| null` | yes | When a link to it was first seen. |
8725
+ | `topTlds` | `Record<string, number>` | yes | Linking domains per top-level domain (`com` → count). |
8726
+ | `topCountries` | `Record<string, number>` | yes | Linking domains per country (`US` → count). |
8727
+ | `usage` | `{ credits }` | yes | What the call cost. |
8728
+ | `usage.credits` | `number` | yes | Credits charged for this call. |
8729
+
8730
+ **Errors** — besides the [errors every call can throw](#errors):
8731
+
8732
+ | Code | HTTP | When |
8733
+ |---|---|---|
8734
+ | `RATE_LIMIT_EXCEEDED` | 429 | The plan's SEO calls per minute or per month are used up; `details.period`. |
8735
+ | `PROVIDER_UNAVAILABLE` | 503 | Backlink data is unavailable; retry later. |
8736
+
8737
+ **Example**
8738
+
8739
+ ```ts
8740
+ const b = await totalum.seo.domain.backlinks({ domain: 'example.es' });
8741
+ ```
8742
+
8743
+ Result:
8744
+
8745
+ ```ts
8746
+ { "domain": "example.es", "rank": 212, "backlinks": 667, "referringDomains": 235, "spamScore": 11, …, "usage": { "credits": 1.7169 } }
8747
+ ```
8748
+
8749
+ ### `seo.page.analyze`
8750
+
8751
+ ```ts
8752
+ seo.page.analyze(input: SeoPageAnalyzeInput): Promise<{ url, links, images, statusCode, title, description, score, content, canonical, headings, wordCount, hasStructuredData, issues, social, usage }>
8753
+ ```
8754
+
8755
+ Reads one public page as a search engine does: title, description, canonical, headings, word count, links,
8756
+ images, structured data, social tags, an on-page score with the issues found, and its main text by section —
8757
+ the structure of a page that ranks.
8758
+
8759
+ **Parameters**
8760
+
8761
+ | Name | Type | Required | Description |
8762
+ |---|---|---|---|
8763
+ | `input` | [`SeoPageAnalyzeInput`](#seopageanalyzeinput) | yes | The page's URL. |
8764
+ | `input.url` | `string` | yes | The public `http(s)` URL of the page. Allowed: a URL. |
8765
+
8766
+ **Returns** `Promise<{ url, links, images, statusCode, title, description, score, content, canonical, headings, wordCount, hasStructuredData, issues, social, usage }>` — The page analysis and the credits it cost.
8767
+
8768
+ | Field | Type | Always present | Description |
8769
+ |---|---|---|---|
8770
+ | `url` | `string` | yes | The page read (after redirects). |
8771
+ | `links` | `{ internal, external }` | yes | Its links. |
8772
+ | `links.internal` | `number \| null` | yes | Links to its own site. |
8773
+ | `links.external` | `number \| null` | yes | Links to other sites. |
8774
+ | `images` | `number \| null` | yes | How many images. |
8775
+ | `statusCode` | `number \| null` | yes | Its HTTP status. |
8776
+ | `title` | `string \| null` | yes | Its `<title>`. |
8777
+ | `description` | `string \| null` | yes | Its meta description. |
8778
+ | `score` | `number \| null` | yes | An on-page score, 0–100. |
8779
+ | `content` | `({ heading, level, text })[]` | yes | Its main text by section. |
8780
+ | `content.heading` | `string \| null` | yes | The section's heading. |
8781
+ | `content.level` | `number \| null` | yes | The heading level (1 = H1). |
8782
+ | `content.text` | `string` | yes | The section's text. |
8783
+ | `canonical` | `string \| null` | yes | Its canonical URL. |
8784
+ | `headings` | `{ h1, h2, h3 }` | yes | Its headings. |
8785
+ | `headings.h1` | `string[]` | yes | The H1s. |
8786
+ | `headings.h2` | `string[]` | yes | The H2s. |
8787
+ | `headings.h3` | `string[]` | yes | The H3s. |
8788
+ | `wordCount` | `number \| null` | yes | Words of text. |
8789
+ | `hasStructuredData` | `boolean \| null` | yes | Whether it has schema.org structured data. |
8790
+ | `issues` | `string[]` | yes | Problems found, e.g. `title_too_long`, `no_image_alt`, `no_h1_tag`. |
8791
+ | `social` | `Record<string, string>` | yes | Its Open Graph and Twitter tags (`og:title` → value). |
8792
+ | `usage` | `{ credits }` | yes | What the call cost. |
8793
+ | `usage.credits` | `number` | yes | Credits charged for this call. |
8794
+
8795
+ **Errors** — besides the [errors every call can throw](#errors):
8796
+
8797
+ | Code | HTTP | When |
8798
+ |---|---|---|
8799
+ | `SEO_REQUEST_REJECTED` | 400 | The page could not be read; `details.field`. |
8800
+ | `RATE_LIMIT_EXCEEDED` | 429 | The plan's SEO calls per minute or per month are used up; `details.period`. |
8801
+ | `PROVIDER_TIMEOUT` | 504 | The page took too long; retry. |
8802
+ | `PROVIDER_UNAVAILABLE` | 503 | Page analysis is unavailable; retry later. |
8803
+
8804
+ **Example**
8805
+
8806
+ ```ts
8807
+ const p = await totalum.seo.page.analyze({ url: 'https://www.example.es/' });
8808
+ ```
8809
+
8810
+ Result:
8811
+
8812
+ ```ts
8813
+ { "url": "https://www.example.es/", "statusCode": 200, "title": "Ejemplo", "headings": { "h1": ["Ejemplo"], "h2": ["…"], "h3": [] }, "wordCount": 2418, "hasStructuredData": true, "score": 91.59, "issues": ["title_too_long"], "content": [{ "heading": "Ejemplo", "level": 1, "text": "…" }], …, "usage": { "credits": 0.0215 } }
8814
+ ```
8815
+
8816
+ ### `SeoAiAnswerInput`
8817
+
8818
+ The question of `seo.ai.answer()`.
8819
+
8820
+ | Name | Type | Required | Description |
8821
+ |---|---|---|---|
8822
+ | `prompt` | `string` | yes | The question, as a user asks the assistant. Allowed: at least 1 character, at most 500 characters. |
8823
+ | `platform` | `'claude' \| 'chatgpt' \| 'gemini' \| 'perplexity'` | yes | The assistant: `chatgpt`, `claude`, `gemini` or `perplexity`. Allowed: default `"chatgpt"`. |
8824
+ | `webSearch` | `boolean` | yes | Whether the assistant may search the web (as it does for users); `true` by default. Allowed: default `true`. |
8825
+ | `model` | `string` | no | A model id of that assistant; omitted = a current fast model. |
8826
+ | `country` | `string` | no | The country its web search runs from (ISO 3166-1 alpha-2). |
8827
+
8828
+ ### `SeoAiAnswerOutput`
8829
+
8830
+ The assistant's answer.
8831
+
8832
+ | Field | Type | Always present | Description |
8833
+ |---|---|---|---|
8834
+ | `platform` | `'claude' \| 'chatgpt' \| 'gemini' \| 'perplexity'` | yes | The assistant asked. |
8835
+ | `model` | `string` | yes | The model that answered. |
8836
+ | `answer` | `string` | yes | The answer, as Markdown. |
8837
+ | `sources` | [`SeoSource[]`](#seosource) | yes | The pages it cited. |
8838
+ | `citedDomains` | `string[]` | yes | The domains of those pages. |
8839
+ | `searchQueries` | `string[]` | yes | The web searches the assistant ran. |
8840
+
8841
+ ### `SeoAiKeywordVolumeInput`
8842
+
8843
+ The keywords of `seo.ai.keywordVolume()`.
8844
+
8845
+ | Name | Type | Required | Description |
8846
+ |---|---|---|---|
8847
+ | `country` | `string` | yes | The country searched from, as an ISO 3166-1 alpha-2 code (`es`, `us`, any case). |
8848
+ | `language` | `string` | yes | The language of the search, as an ISO 639-1 code (`es`, `ca`, `en`) or a regional tag (`pt-BR`). `seo.locations()` lists them. |
8849
+ | `keywords` | `string[]` | yes | Up to 1,000 keywords. Allowed: at least 1 item, at most 1000 items. |
8850
+
8851
+ ### `SeoAiKeywordVolumeOutput`
8852
+
8853
+ AI search volume per keyword.
8854
+
8855
+ | Field | Type | Always present | Description |
8856
+ |---|---|---|---|
8857
+ | `keywords` | `({ keyword, aiSearchVolume, monthlySearches })[]` | yes | One row per keyword. |
8858
+ | `keywords.keyword` | `string` | yes | The keyword. |
8859
+ | `keywords.aiSearchVolume` | `number \| null` | yes | How often it is asked to AI assistants per month. |
8860
+ | `keywords.monthlySearches` | `({ year, month, aiSearchVolume })[]` | yes | The last 12 months, newest first. |
8861
+ | `keywords.monthlySearches.year` | `number` | yes | The year. |
8862
+ | `keywords.monthlySearches.month` | `number` | yes | The month, 1–12. |
8863
+ | `keywords.monthlySearches.aiSearchVolume` | `number \| null` | yes | AI searches that month. |
8864
+
8865
+ ### `SeoAiMentionsInput`
8866
+
8867
+ The target of `seo.ai.mentions()`: exactly one of `domain` or `keyword`.
8868
+
8869
+ | Name | Type | Required | Description |
8870
+ |---|---|---|---|
8871
+ | `view` | `'mentions' \| 'top-domains' \| 'top-pages'` | yes | `mentions` (the questions and answers), `top-domains` or `top-pages` (the most cited). Allowed: default `"mentions"`. |
8872
+ | `limit` | `number` | yes | At most this many rows. Allowed: ≥ 1, ≤ 100, default `20`. |
8873
+ | `country` | `string` | yes | The country searched from, as an ISO 3166-1 alpha-2 code (`es`, `us`, any case). |
8874
+ | `language` | `string` | yes | The language of the search, as an ISO 639-1 code (`es`, `ca`, `en`) or a regional tag (`pt-BR`). `seo.locations()` lists them. |
8875
+ | `platform` | `'chatgpt' \| 'google'` | no | `google` (AI Overviews) or `chatgpt` (United States, English only); omitted = both. |
8876
+ | `domain` | `string` | no | Mentions of this domain (cited by AI answers). Allowed: at most 253 characters. |
8877
+ | `keyword` | `string` | no | Or mentions of this keyword or brand name in AI questions and answers. Allowed: at least 1 character, at most 250 characters. |
8878
+
8879
+ ### `SeoAiMentionsOutput`
8880
+
8881
+ Mentions in AI answers; the field present depends on `view`.
8882
+
8883
+ | Field | Type | Always present | Description |
8884
+ |---|---|---|---|
8885
+ | `totalCount` | `number` | yes | How many mentions exist in all. |
8886
+ | `mentions` | `({ platform, question, answer, sources, brands, aiSearchVolume })[]` | no | The questions and answers (`view: mentions`). |
8887
+ | `mentions.platform` | `'chatgpt' \| 'google'` | yes | `google` (AI Overview) or `chatgpt`. |
8888
+ | `mentions.question` | `string` | yes | The question asked. |
8889
+ | `mentions.answer` | `string` | yes | The AI answer. |
8890
+ | `mentions.sources` | [`SeoSource[]`](#seosource) | yes | The pages it cites. |
8891
+ | `mentions.brands` | `({ name, category })[]` | yes | The brands it names. |
8892
+ | `mentions.brands.name` | `string` | yes | The brand or product named. |
8893
+ | `mentions.brands.category` | `string \| null` | yes | What it is, when known. |
8894
+ | `mentions.aiSearchVolume` | `number \| null` | yes | How often the question is asked per month. |
8895
+ | `domains` | `({ mentions, aiSearchVolume, domain })[]` | no | The most cited domains (`view: top-domains`). |
8896
+ | `domains.mentions` | `number` | yes | How many answers cite it. |
8897
+ | `domains.aiSearchVolume` | `number \| null` | yes | The monthly AI search volume of those answers. |
8898
+ | `domains.domain` | `string` | yes | The domain. |
8899
+ | `pages` | `({ mentions, aiSearchVolume, url })[]` | no | The most cited pages (`view: top-pages`). |
8900
+ | `pages.mentions` | `number` | yes | How many answers cite it. |
8901
+ | `pages.aiSearchVolume` | `number \| null` | yes | The monthly AI search volume of those answers. |
8902
+ | `pages.url` | `string` | yes | The page. |
8903
+
8904
+ ### `SeoBacklinksSummaryInput`
8905
+
8906
+ The domain of `seo.domain.backlinks()`.
8907
+
8908
+ | Name | Type | Required | Description |
8909
+ |---|---|---|---|
8910
+ | `domain` | `string` | yes | A bare domain (`example.com`). Allowed: at most 253 characters. |
8911
+
8912
+ ### `SeoBacklinksSummaryOutput`
8913
+
8914
+ A domain's backlink profile.
8915
+
8916
+ | Field | Type | Always present | Description |
8917
+ |---|---|---|---|
8918
+ | `domain` | `string` | yes | The domain. |
8919
+ | `rank` | `number \| null` | yes | Authority, 0–1000. |
8920
+ | `backlinks` | `number \| null` | yes | Links pointing to it. |
8921
+ | `referringDomains` | `number \| null` | yes | Domains linking to it. |
8922
+ | `referringDomainsNofollow` | `number \| null` | yes | Of those, the ones whose links are all nofollow. |
8923
+ | `referringMainDomains` | `number \| null` | yes | Distinct main domains linking to it. |
8924
+ | `referringIps` | `number \| null` | yes | Distinct IP addresses linking to it. |
8925
+ | `brokenBacklinks` | `number \| null` | yes | Links to pages of it that no longer exist. |
8926
+ | `spamScore` | `number \| null` | yes | How spammy its link profile looks, 0–100. |
8927
+ | `firstSeen` | `string \| null` | yes | When a link to it was first seen. |
8928
+ | `topTlds` | `Record<string, number>` | yes | Linking domains per top-level domain (`com` → count). |
8929
+ | `topCountries` | `Record<string, number>` | yes | Linking domains per country (`US` → count). |
8930
+
8931
+ ### `SeoChatGptSearchInput`
8932
+
8933
+ The query of `seo.ai.chatgptSearch()`.
8934
+
8935
+ | Name | Type | Required | Description |
8936
+ |---|---|---|---|
8937
+ | `country` | `string` | yes | The country searched from, as an ISO 3166-1 alpha-2 code (`es`, `us`, any case). |
8938
+ | `language` | `string` | yes | The language of the search, as an ISO 639-1 code (`es`, `ca`, `en`) or a regional tag (`pt-BR`). `seo.locations()` lists them. |
8939
+ | `keyword` | `string` | yes | The query, as a user types it in ChatGPT. Allowed: at least 1 character, at most 2000 characters. |
8940
+
8941
+ ### `SeoChatGptSearchOutput`
8942
+
8943
+ ChatGPT's search answer.
8944
+
8945
+ | Field | Type | Always present | Description |
8946
+ |---|---|---|---|
8947
+ | `keyword` | `string` | yes | The query. |
8948
+ | `answer` | `string` | yes | The answer, as Markdown. |
8949
+ | `sources` | `({ title, url, domain, snippet, publishedAt })[]` | yes | The pages it cites. |
8950
+ | `sources.title` | `string \| null` | yes | The page's title. |
8951
+ | `sources.url` | `string` | yes | The page's URL. |
8952
+ | `sources.domain` | `string \| null` | yes | The page's host. |
8953
+ | `sources.snippet` | `string \| null` | yes | The text it quotes, when given. |
8954
+ | `sources.publishedAt` | `string \| null` | yes | The page's date, when known. |
8955
+ | `searchResults` | [`SeoSource[]`](#seosource) | yes | The search results it showed. |
8956
+ | `brands` | `({ name, category })[]` | yes | The brands and products it named. |
8957
+ | `brands.name` | `string` | yes | The brand or product named. |
8958
+ | `brands.category` | `string \| null` | yes | What it is, when known. |
8959
+ | `searchQueries` | `string[]` | yes | The searches it ran. |
8960
+
8961
+ ### `SeoDomainCompetitorsInput`
8962
+
8963
+ The domain of `seo.domain.competitors()`.
8964
+
8965
+ | Name | Type | Required | Description |
8966
+ |---|---|---|---|
8967
+ | `limit` | `number` | yes | At most this many competitors. Allowed: ≥ 1, ≤ 100, default `20`. |
8968
+ | `country` | `string` | yes | The country searched from, as an ISO 3166-1 alpha-2 code (`es`, `us`, any case). |
8969
+ | `language` | `string` | yes | The language of the search, as an ISO 639-1 code (`es`, `ca`, `en`) or a regional tag (`pt-BR`). `seo.locations()` lists them. |
8970
+ | `domain` | `string` | yes | A bare domain (`example.com`). Allowed: at most 253 characters. |
8971
+
8972
+ ### `SeoDomainCompetitorsOutput`
8973
+
8974
+ A domain's search competitors.
8975
+
8976
+ | Field | Type | Always present | Description |
8977
+ |---|---|---|---|
8978
+ | `domain` | `string` | yes | The domain. |
8979
+ | `competitors` | `({ domain, sharedKeywords, avgPosition, organicKeywords, traffic })[]` | yes | The competitors, most shared keywords first. |
8980
+ | `competitors.domain` | `string` | yes | The competitor's domain. |
8981
+ | `competitors.sharedKeywords` | `number` | yes | Keywords both rank for. |
8982
+ | `competitors.avgPosition` | `number \| null` | yes | The competitor's average position on those. |
8983
+ | `competitors.organicKeywords` | `number \| null` | yes | How many keywords the competitor ranks for. |
8984
+ | `competitors.traffic` | `number \| null` | yes | The competitor's estimated monthly organic visits. |
8985
+
8986
+ ### `SeoDomainKeywordsInput`
8987
+
8988
+ The domain of `seo.domain.keywords()`.
8989
+
8990
+ | Name | Type | Required | Description |
8991
+ |---|---|---|---|
8992
+ | `limit` | `number` | yes | At most this many keywords. Allowed: ≥ 1, ≤ 100, default `50`. |
8993
+ | `country` | `string` | yes | The country searched from, as an ISO 3166-1 alpha-2 code (`es`, `us`, any case). |
8994
+ | `language` | `string` | yes | The language of the search, as an ISO 639-1 code (`es`, `ca`, `en`) or a regional tag (`pt-BR`). `seo.locations()` lists them. |
8995
+ | `domain` | `string` | yes | A bare domain (`example.com`); a URL is cut to its host. Allowed: at most 253 characters. |
8996
+
8997
+ ### `SeoDomainKeywordsOutput`
8998
+
8999
+ The keywords a domain ranks for.
9000
+
9001
+ | Field | Type | Always present | Description |
9002
+ |---|---|---|---|
9003
+ | `domain` | `string` | yes | The domain. |
9004
+ | `totalCount` | `number` | yes | How many keywords it ranks for in all. |
9005
+ | `keywords` | `({ keyword, searchVolume, cpc, difficulty, intent, position, url, traffic })[]` | yes | The keywords, by traffic. |
9006
+ | `keywords.keyword` | `string` | yes | The keyword. |
9007
+ | `keywords.searchVolume` | `number \| null` | yes | Average monthly Google searches in the country and language asked; `null` when unknown. |
9008
+ | `keywords.cpc` | `number \| null` | yes | Average cost per click of the keyword's ads, in USD; `null` when no ads run on it. |
9009
+ | `keywords.difficulty` | `number \| null` | yes | How hard it is to rank in the top 10, 0 (easy) to 100 (hardest). |
9010
+ | `keywords.intent` | `'informational' \| 'navigational' \| 'commercial' \| 'transactional' \| null` | yes | What the searcher wants: `informational` (to learn), `navigational` (a specific site), `commercial` (to compare before buying) or `transactional` (to buy or book now). |
9011
+ | `keywords.position` | `number` | yes | Its Google position for the keyword. |
9012
+ | `keywords.url` | `string \| null` | yes | The page that ranks. |
9013
+ | `keywords.traffic` | `number \| null` | yes | Estimated monthly visits from this keyword. |
9014
+
7800
9015
  ### `SeoIndexNowKey` type
7801
9016
 
7802
9017
  The project's IndexNow key.
@@ -7806,6 +9021,138 @@ The project's IndexNow key.
7806
9021
  | `key` | `string` | yes | The key. |
7807
9022
  | `keyLocation` | `string` | yes | The URL where the site serves it (`https://<host>/<key>.txt`). |
7808
9023
 
9024
+ ### `SeoKeyword`
9025
+
9026
+ One keyword's Google search data in the country and language asked.
9027
+
9028
+ | Field | Type | Always present | Description |
9029
+ |---|---|---|---|
9030
+ | `keyword` | `string` | yes | The keyword. |
9031
+ | `searchVolume` | `number \| null` | yes | Average monthly Google searches in the country and language asked; `null` when unknown. |
9032
+ | `cpc` | `number \| null` | yes | Average cost per click of the keyword's ads, in USD; `null` when no ads run on it. |
9033
+ | `competition` | `number \| null` | yes | How many advertisers bid on it, 0 (none) to 1 (most). |
9034
+ | `competitionLevel` | `'low' \| 'medium' \| 'high' \| null` | yes | The same as a level: `low`, `medium` or `high`. |
9035
+ | `difficulty` | `number \| null` | yes | How hard it is to rank in the top 10, 0 (easy) to 100 (hardest). |
9036
+ | `intent` | `'informational' \| 'navigational' \| 'commercial' \| 'transactional' \| null` | yes | What the searcher wants: `informational` (to learn), `navigational` (a specific site), `commercial` (to compare before buying) or `transactional` (to buy or book now). |
9037
+ | `trend` | `{ monthly, quarterly, yearly } \| null` | yes | The change of its search volume, in percent. |
9038
+ | `trend.monthly` | `number \| null` | yes | Against the previous month. |
9039
+ | `trend.quarterly` | `number \| null` | yes | Against three months ago. |
9040
+ | `trend.yearly` | `number \| null` | yes | Against a year ago. |
9041
+ | `monthlySearches` | `({ year, month, searchVolume })[]` | yes | The last 12 months, newest first. |
9042
+ | `monthlySearches.year` | `number` | yes | The year. |
9043
+ | `monthlySearches.month` | `number` | yes | The month, 1–12. |
9044
+ | `monthlySearches.searchVolume` | `number \| null` | yes | Google searches that month. |
9045
+
9046
+ ### `SeoKeywordGapInput`
9047
+
9048
+ The two domains of `seo.domain.keywordGap()`.
9049
+
9050
+ | Name | Type | Required | Description |
9051
+ |---|---|---|---|
9052
+ | `mode` | `'shared' \| 'missing'` | yes | `missing`: the competitor ranks and `domain` does not; `shared`: both rank. Allowed: default `"missing"`. |
9053
+ | `limit` | `number` | yes | At most this many keywords. Allowed: ≥ 1, ≤ 100, default `50`. |
9054
+ | `country` | `string` | yes | The country searched from, as an ISO 3166-1 alpha-2 code (`es`, `us`, any case). |
9055
+ | `language` | `string` | yes | The language of the search, as an ISO 639-1 code (`es`, `ca`, `en`) or a regional tag (`pt-BR`). `seo.locations()` lists them. |
9056
+ | `domain` | `string` | yes | Your domain. Allowed: at most 253 characters. |
9057
+ | `competitor` | `string` | yes | The competitor's domain. Allowed: at most 253 characters. |
9058
+
9059
+ ### `SeoKeywordGapOutput`
9060
+
9061
+ The keyword gap between two domains.
9062
+
9063
+ | Field | Type | Always present | Description |
9064
+ |---|---|---|---|
9065
+ | `domain` | `string` | yes | Your domain. |
9066
+ | `competitor` | `string` | yes | The competitor's domain. |
9067
+ | `keywords` | `({ keyword, searchVolume, cpc, difficulty, intent, competitorPosition, competitorUrl, domainPosition, domainUrl })[]` | yes | The keywords. |
9068
+ | `keywords.keyword` | `string` | yes | The keyword. |
9069
+ | `keywords.searchVolume` | `number \| null` | yes | Average monthly Google searches in the country and language asked; `null` when unknown. |
9070
+ | `keywords.cpc` | `number \| null` | yes | Average cost per click of the keyword's ads, in USD; `null` when no ads run on it. |
9071
+ | `keywords.difficulty` | `number \| null` | yes | How hard it is to rank in the top 10, 0 (easy) to 100 (hardest). |
9072
+ | `keywords.intent` | `'informational' \| 'navigational' \| 'commercial' \| 'transactional' \| null` | yes | What the searcher wants: `informational` (to learn), `navigational` (a specific site), `commercial` (to compare before buying) or `transactional` (to buy or book now). |
9073
+ | `keywords.competitorPosition` | `number \| null` | yes | The competitor's position. |
9074
+ | `keywords.competitorUrl` | `string \| null` | yes | The competitor's ranking page. |
9075
+ | `keywords.domainPosition` | `number \| null` | yes | Your position; `null` when you do not rank. |
9076
+ | `keywords.domainUrl` | `string \| null` | yes | Your ranking page, if any. |
9077
+
9078
+ ### `SeoKeywordIdeasInput`
9079
+
9080
+ The seeds of `seo.keywords.ideas()`.
9081
+
9082
+ | Name | Type | Required | Description |
9083
+ |---|---|---|---|
9084
+ | `limit` | `number` | yes | At most this many ideas. Allowed: ≥ 1, ≤ 100, default `50`. |
9085
+ | `country` | `string` | yes | The country searched from, as an ISO 3166-1 alpha-2 code (`es`, `us`, any case). |
9086
+ | `language` | `string` | yes | The language of the search, as an ISO 639-1 code (`es`, `ca`, `en`) or a regional tag (`pt-BR`). `seo.locations()` lists them. |
9087
+ | `keywords` | `string[]` | yes | Up to 20 seed keywords; ideas containing the first one come first. Allowed: at least 1 item, at most 20 items. |
9088
+
9089
+ ### `SeoKeywordOverviewInput`
9090
+
9091
+ The keywords of `seo.keywords.overview()`.
9092
+
9093
+ | Name | Type | Required | Description |
9094
+ |---|---|---|---|
9095
+ | `country` | `string` | yes | The country searched from, as an ISO 3166-1 alpha-2 code (`es`, `us`, any case). |
9096
+ | `language` | `string` | yes | The language of the search, as an ISO 639-1 code (`es`, `ca`, `en`) or a regional tag (`pt-BR`). `seo.locations()` lists them. |
9097
+ | `keywords` | `string[]` | yes | Up to 700 keywords. Allowed: at least 1 item, at most 700 items. |
9098
+
9099
+ ### `SeoKeywordRelatedInput`
9100
+
9101
+ The keyword of `seo.keywords.related()`.
9102
+
9103
+ | Name | Type | Required | Description |
9104
+ |---|---|---|---|
9105
+ | `depth` | `number` | yes | How many hops of related searches to follow, 1 to 3. Allowed: ≥ 1, ≤ 3, default `1`. |
9106
+ | `limit` | `number` | yes | At most this many keywords. Allowed: ≥ 1, ≤ 100, default `50`. |
9107
+ | `country` | `string` | yes | The country searched from, as an ISO 3166-1 alpha-2 code (`es`, `us`, any case). |
9108
+ | `language` | `string` | yes | The language of the search, as an ISO 639-1 code (`es`, `ca`, `en`) or a regional tag (`pt-BR`). `seo.locations()` lists them. |
9109
+ | `keyword` | `string` | yes | The keyword. Allowed: at least 1 character, at most 80 characters. |
9110
+
9111
+ ### `SeoKeywordsOutput`
9112
+
9113
+ Keywords with their search data.
9114
+
9115
+ | Field | Type | Always present | Description |
9116
+ |---|---|---|---|
9117
+ | `keywords` | [`SeoKeyword[]`](#seokeyword) | yes | The keywords, most relevant first. |
9118
+
9119
+ ### `SeoKeywordTrendsInput`
9120
+
9121
+ The keywords of `seo.keywords.trends()`.
9122
+
9123
+ | Name | Type | Required | Description |
9124
+ |---|---|---|---|
9125
+ | `keywords` | `string[]` | yes | Up to 5 keywords, compared on one scale. Allowed: at least 1 item, at most 5 items. |
9126
+ | `timeRange` | `'past_7_days' \| 'past_30_days' \| 'past_90_days' \| 'past_12_months' \| 'past_5_years'` | yes | The period: `past_7_days`, `past_30_days`, `past_90_days`, `past_12_months` or `past_5_years`. Allowed: default `"past_12_months"`. |
9127
+ | `country` | `string` | no | The country (ISO 3166-1 alpha-2); omitted = worldwide. |
9128
+ | `language` | `string` | no | The language; omitted = all. |
9129
+
9130
+ ### `SeoKeywordTrendsOutput`
9131
+
9132
+ Google Trends interest over time.
9133
+
9134
+ | Field | Type | Always present | Description |
9135
+ |---|---|---|---|
9136
+ | `keywords` | `string[]` | yes | The keywords, in the order of `values`. |
9137
+ | `timeline` | `({ from, to, values })[]` | yes | One row per period, oldest first. |
9138
+ | `timeline.from` | `string` | yes | The first day of the period. |
9139
+ | `timeline.to` | `string` | yes | The last day. |
9140
+ | `timeline.values` | `(number \| null)[]` | yes | Each keyword's interest, 0–100 (100 = the peak of the chart). |
9141
+
9142
+ ### `SeoLocationsOutput`
9143
+
9144
+ The places the research methods accept.
9145
+
9146
+ | Field | Type | Always present | Description |
9147
+ |---|---|---|---|
9148
+ | `countries` | `({ country, name, dataLanguages })[]` | yes | Every country. |
9149
+ | `countries.country` | `string` | yes | Its ISO 3166-1 alpha-2 code. |
9150
+ | `countries.name` | `string` | yes | Its English name. |
9151
+ | `countries.dataLanguages` | `string[]` | yes | The languages keyword, domain and AI data exist in there; search results take any language. |
9152
+ | `languages` | `({ language, name })[]` | yes | Every language. |
9153
+ | `languages.language` | `string` | yes | Its code. |
9154
+ | `languages.name` | `string` | yes | Its English name. |
9155
+
7809
9156
  ### `SeoNotifyOutput`
7810
9157
 
7811
9158
  The answer of `seo.notifyChanged()`.
@@ -7816,6 +9163,154 @@ The answer of `seo.notifyChanged()`.
7816
9163
  | `indexNow` | `'error' \| 'sent' \| 'skipped_no_custom_domain'` | yes | `sent`; `skipped_no_custom_domain` when the project has no verified custom domain (Totalum's own hosts are never sent); `error` when IndexNow refused them. |
7817
9164
  | `sitemapsPinged` | `boolean` | yes | Whether each domain's `/sitemap.xml` answered. |
7818
9165
 
9166
+ ### `SeoPageAnalyzeInput`
9167
+
9168
+ The page of `seo.page.analyze()`.
9169
+
9170
+ | Name | Type | Required | Description |
9171
+ |---|---|---|---|
9172
+ | `url` | `string` | yes | The public `http(s)` URL of the page. Allowed: a URL. |
9173
+
9174
+ ### `SeoPageAnalyzeOutput`
9175
+
9176
+ One page as a search engine reads it.
9177
+
9178
+ | Field | Type | Always present | Description |
9179
+ |---|---|---|---|
9180
+ | `url` | `string` | yes | The page read (after redirects). |
9181
+ | `statusCode` | `number \| null` | yes | Its HTTP status. |
9182
+ | `title` | `string \| null` | yes | Its `<title>`. |
9183
+ | `description` | `string \| null` | yes | Its meta description. |
9184
+ | `canonical` | `string \| null` | yes | Its canonical URL. |
9185
+ | `headings` | `{ h1, h2, h3 }` | yes | Its headings. |
9186
+ | `headings.h1` | `string[]` | yes | The H1s. |
9187
+ | `headings.h2` | `string[]` | yes | The H2s. |
9188
+ | `headings.h3` | `string[]` | yes | The H3s. |
9189
+ | `wordCount` | `number \| null` | yes | Words of text. |
9190
+ | `links` | `{ internal, external }` | yes | Its links. |
9191
+ | `links.internal` | `number \| null` | yes | Links to its own site. |
9192
+ | `links.external` | `number \| null` | yes | Links to other sites. |
9193
+ | `images` | `number \| null` | yes | How many images. |
9194
+ | `hasStructuredData` | `boolean \| null` | yes | Whether it has schema.org structured data. |
9195
+ | `score` | `number \| null` | yes | An on-page score, 0–100. |
9196
+ | `issues` | `string[]` | yes | Problems found, e.g. `title_too_long`, `no_image_alt`, `no_h1_tag`. |
9197
+ | `social` | `Record<string, string>` | yes | Its Open Graph and Twitter tags (`og:title` → value). |
9198
+ | `content` | `({ heading, level, text })[]` | yes | Its main text by section. |
9199
+ | `content.heading` | `string \| null` | yes | The section's heading. |
9200
+ | `content.level` | `number \| null` | yes | The heading level (1 = H1). |
9201
+ | `content.text` | `string` | yes | The section's text. |
9202
+
9203
+ ### `SeoSerpAiModeInput`
9204
+
9205
+ The question of `seo.serp.aiMode()`.
9206
+
9207
+ | Name | Type | Required | Description |
9208
+ |---|---|---|---|
9209
+ | `device` | `'mobile' \| 'desktop'` | yes | `desktop` or `mobile`. Allowed: default `"desktop"`. |
9210
+ | `country` | `string` | yes | The country searched from, as an ISO 3166-1 alpha-2 code (`es`, `us`, any case). |
9211
+ | `language` | `string` | yes | The language of the search, as an ISO 639-1 code (`es`, `ca`, `en`) or a regional tag (`pt-BR`). `seo.locations()` lists them. |
9212
+ | `keyword` | `string` | yes | The question, as a user asks it. Allowed: at least 1 character, at most 700 characters. |
9213
+
9214
+ ### `SeoSerpAiModeOutput`
9215
+
9216
+ Google AI Mode's answer.
9217
+
9218
+ | Field | Type | Always present | Description |
9219
+ |---|---|---|---|
9220
+ | `keyword` | `string` | yes | The question asked. |
9221
+ | `answer` | `string` | yes | The answer, as Markdown. |
9222
+ | `sources` | [`SeoSource[]`](#seosource) | yes | The pages it cites. |
9223
+
9224
+ ### `SeoSerpGoogleInput`
9225
+
9226
+ The search of `seo.serp.google()`.
9227
+
9228
+ | Name | Type | Required | Description |
9229
+ |---|---|---|---|
9230
+ | `depth` | `number` | yes | How many results to read, 10 to 100. Allowed: ≥ 10, ≤ 100, default `10`. |
9231
+ | `device` | `'mobile' \| 'desktop'` | yes | `desktop` or `mobile` results. Allowed: default `"desktop"`. |
9232
+ | `country` | `string` | yes | The country searched from, as an ISO 3166-1 alpha-2 code (`es`, `us`, any case). |
9233
+ | `language` | `string` | yes | The language of the search, as an ISO 639-1 code (`es`, `ca`, `en`) or a regional tag (`pt-BR`). `seo.locations()` lists them. |
9234
+ | `keyword` | `string` | yes | What is searched, as a user types it. Allowed: at least 1 character, at most 700 characters. |
9235
+ | `city` | `string` | no | A city of `country` (`Barcelona`): the results as seen there. Allowed: at least 2 characters, at most 80 characters. |
9236
+
9237
+ ### `SeoSerpGoogleOutput`
9238
+
9239
+ Google's results page for the keyword.
9240
+
9241
+ | Field | Type | Always present | Description |
9242
+ |---|---|---|---|
9243
+ | `keyword` | `string` | yes | The keyword searched. |
9244
+ | `totalResults` | `number \| null` | yes | How many results Google reports. |
9245
+ | `organic` | `({ position, title, url, domain, snippet, breadcrumb })[]` | yes | The organic results, in rank order. |
9246
+ | `organic.position` | `number` | yes | The rank among organic results, from 1. |
9247
+ | `organic.title` | `string \| null` | yes | The result's title. |
9248
+ | `organic.url` | `string` | yes | The ranking page's URL. |
9249
+ | `organic.domain` | `string \| null` | yes | The ranking page's host. |
9250
+ | `organic.snippet` | `string \| null` | yes | The text Google shows under the title. |
9251
+ | `organic.breadcrumb` | `string \| null` | yes | The path Google shows above the title. |
9252
+ | `featuredSnippet` | `{ title, snippet, url, domain } \| null` | yes | The answer box at the top, when Google shows one. |
9253
+ | `featuredSnippet.title` | `string \| null` | yes | Its title. |
9254
+ | `featuredSnippet.snippet` | `string \| null` | yes | Its text. |
9255
+ | `featuredSnippet.url` | `string` | yes | The page it quotes. |
9256
+ | `featuredSnippet.domain` | `string \| null` | yes | That page's host. |
9257
+ | `peopleAlsoAsk` | `({ question, answer })[]` | yes | The "People also ask" questions. |
9258
+ | `peopleAlsoAsk.question` | `string` | yes | The question. |
9259
+ | `peopleAlsoAsk.answer` | `{ title, url, domain, snippet } \| null` | yes | The page Google answers it from, when shown. |
9260
+ | `peopleAlsoAsk.answer.title` | `string \| null` | yes | The page's title. |
9261
+ | `peopleAlsoAsk.answer.url` | `string` | yes | The page's URL. |
9262
+ | `peopleAlsoAsk.answer.domain` | `string \| null` | yes | The page's host. |
9263
+ | `peopleAlsoAsk.answer.snippet` | `string \| null` | yes | The answer text. |
9264
+ | `relatedSearches` | `string[]` | yes | The related searches at the bottom of the page. |
9265
+ | `aiOverview` | `{ text, sources } \| null` | yes | Google's AI Overview, when it shows one. |
9266
+ | `aiOverview.text` | `string` | yes | The overview, as Markdown. |
9267
+ | `aiOverview.sources` | [`SeoSource[]`](#seosource) | yes | The pages it cites. |
9268
+
9269
+ ### `SeoSerpMapsInput`
9270
+
9271
+ The search of `seo.serp.maps()`.
9272
+
9273
+ | Name | Type | Required | Description |
9274
+ |---|---|---|---|
9275
+ | `depth` | `number` | yes | How many places to read, 1 to 100. Allowed: ≥ 1, ≤ 100, default `20`. |
9276
+ | `country` | `string` | yes | The country searched from, as an ISO 3166-1 alpha-2 code (`es`, `us`, any case). |
9277
+ | `language` | `string` | yes | The language of the search, as an ISO 639-1 code (`es`, `ca`, `en`) or a regional tag (`pt-BR`). `seo.locations()` lists them. |
9278
+ | `keyword` | `string` | yes | What is searched on Maps (`dentista`, `pizzeria`). Allowed: at least 1 character, at most 700 characters. |
9279
+ | `city` | `string` | no | A city of `country`: the places as seen there. Allowed: at least 2 characters, at most 80 characters. |
9280
+
9281
+ ### `SeoSerpMapsOutput`
9282
+
9283
+ Google Maps places for the search.
9284
+
9285
+ | Field | Type | Always present | Description |
9286
+ |---|---|---|---|
9287
+ | `keyword` | `string` | yes | The search. |
9288
+ | `results` | `({ position, title, category, address, city, phone, website, rating, reviews, priceLevel, latitude, longitude, placeId, claimed })[]` | yes | The places, in rank order. |
9289
+ | `results.position` | `number` | yes | The rank, from 1. |
9290
+ | `results.title` | `string` | yes | The place's name. |
9291
+ | `results.category` | `string \| null` | yes | Its main category. |
9292
+ | `results.address` | `string \| null` | yes | Its address. |
9293
+ | `results.city` | `string \| null` | yes | Its city. |
9294
+ | `results.phone` | `string \| null` | yes | Its phone number. |
9295
+ | `results.website` | `string \| null` | yes | Its website. |
9296
+ | `results.rating` | `number \| null` | yes | Its average rating, 1–5. |
9297
+ | `results.reviews` | `number \| null` | yes | How many reviews it has. |
9298
+ | `results.priceLevel` | `string \| null` | yes | Its price level, when shown. |
9299
+ | `results.latitude` | `number \| null` | yes | Latitude. |
9300
+ | `results.longitude` | `number \| null` | yes | Longitude. |
9301
+ | `results.placeId` | `string \| null` | yes | Google's place id. |
9302
+ | `results.claimed` | `boolean \| null` | yes | Whether the owner claimed the listing. |
9303
+
9304
+ ### `SeoSource`
9305
+
9306
+ A page an answer cites or a result links to.
9307
+
9308
+ | Field | Type | Always present | Description |
9309
+ |---|---|---|---|
9310
+ | `title` | `string \| null` | yes | The page's title. |
9311
+ | `url` | `string` | yes | The page's URL. |
9312
+ | `domain` | `string \| null` | yes | The page's host. |
9313
+
7819
9314
  ## `totalum-sdk/browser`
7820
9315
 
7821
9316
  A real Chrome in the cloud, driven over HTTPS from your server, so it works inside the published app: open pages,
@@ -7931,7 +9426,7 @@ provider tier, else `STEALTH_TIER_UNAVAILABLE`, and ignores `viewport`) and `reg
7931
9426
  | `opts.proxy.city` | `string` | no | Exit city. |
7932
9427
  | `opts.proxy.routes` | `({ domainPattern, mode, country?, state?, city?, server?, username?, password? })[]` | no | Per-domain rules instead of one proxy for everything. |
7933
9428
  | `opts.proxy.routes.domainPattern` | `string` | yes | The domains the rule applies to (`*.example.com`). |
7934
- | `opts.proxy.routes.mode` | `'none' \| 'totalum' \| 'external'` | yes | `totalum` (Totalum's proxy), `none` (direct) or `external` (your own proxy). |
9429
+ | `opts.proxy.routes.mode` | `'none' \| 'external' \| 'totalum'` | yes | `totalum` (Totalum's proxy), `none` (direct) or `external` (your own proxy). |
7935
9430
  | `opts.proxy.routes.country` | `string` | no | Exit country for `totalum`. Allowed: exactly 2 characters. |
7936
9431
  | `opts.proxy.routes.state` | `string` | no | Exit state for `totalum`. Allowed: exactly 2 characters. |
7937
9432
  | `opts.proxy.routes.city` | `string` | no | Exit city for `totalum`. |
@@ -8590,7 +10085,7 @@ The options of `browser.session()`; all optional.
8590
10085
  | `proxy.city` | `string` | no | Exit city. |
8591
10086
  | `proxy.routes` | `({ domainPattern, mode, country?, state?, city?, server?, username?, password? })[]` | no | Per-domain rules instead of one proxy for everything. |
8592
10087
  | `proxy.routes.domainPattern` | `string` | yes | The domains the rule applies to (`*.example.com`). |
8593
- | `proxy.routes.mode` | `'none' \| 'totalum' \| 'external'` | yes | `totalum` (Totalum's proxy), `none` (direct) or `external` (your own proxy). |
10088
+ | `proxy.routes.mode` | `'none' \| 'external' \| 'totalum'` | yes | `totalum` (Totalum's proxy), `none` (direct) or `external` (your own proxy). |
8594
10089
  | `proxy.routes.country` | `string` | no | Exit country for `totalum`. Allowed: exactly 2 characters. |
8595
10090
  | `proxy.routes.state` | `string` | no | Exit state for `totalum`. Allowed: exactly 2 characters. |
8596
10091
  | `proxy.routes.city` | `string` | no | Exit city for `totalum`. |
@@ -9489,7 +10984,7 @@ extend it, so one `isTotalumError(e)` check covers the whole package.
9489
10984
  Every code a `TotalumError` can carry: the Totalum API's frozen codes plus the client-side ones (see Errors).
9490
10985
 
9491
10986
  ```ts
9492
- type TotalumErrorCode = 'SERVICE_UNAUTHORIZED' | 'SERVICE_REPLAY' | 'ACTOR_MISMATCH' | 'PAYLOAD_TOO_LARGE' | 'VALIDATION_ERROR' | 'PROJECT_NOT_FOUND' | 'PROJECT_NOT_READY' | 'OPERATION_IN_PROGRESS' | … // 421 values
10987
+ type TotalumErrorCode = 'SERVICE_UNAUTHORIZED' | 'SERVICE_REPLAY' | 'ACTOR_MISMATCH' | 'PAYLOAD_TOO_LARGE' | 'VALIDATION_ERROR' | 'PROJECT_NOT_FOUND' | 'PROJECT_NOT_READY' | 'OPERATION_IN_PROGRESS' | … // 427 values
9493
10988
  ```
9494
10989
 
9495
10990
  ### `isTotalumError` type