{"id":28181826,"url":"https://github.com/dataforseo/typescriptclient","last_synced_at":"2026-03-16T07:31:23.898Z","repository":{"id":225715576,"uuid":"766643029","full_name":"dataforseo/TypeScriptClient","owner":"dataforseo","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-17T13:11:28.000Z","size":35298,"stargazers_count":18,"open_issues_count":5,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-02T15:02:24.394Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dataforseo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-03-03T20:18:14.000Z","updated_at":"2025-06-19T12:27:54.000Z","dependencies_parsed_at":"2024-08-28T19:00:28.782Z","dependency_job_id":"6685fe59-b759-44ed-9bb5-0ff1a6a75ee7","html_url":"https://github.com/dataforseo/TypeScriptClient","commit_stats":null,"previous_names":["dataforseo/typescriptclient"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dataforseo/TypeScriptClient","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dataforseo%2FTypeScriptClient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dataforseo%2FTypeScriptClient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dataforseo%2FTypeScriptClient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dataforseo%2FTypeScriptClient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dataforseo","download_url":"https://codeload.github.com/dataforseo/TypeScriptClient/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dataforseo%2FTypeScriptClient/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265108514,"owners_count":23712466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-16T03:13:52.361Z","updated_at":"2026-03-16T07:31:23.871Z","avatar_url":"https://github.com/dataforseo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## OVERVIEW\n\nThis is a TypeScript client providing you, as a developer, with a tool for obtaining the necessary data from DataForSEO APIs. You don't have to figure out how to make a request and process a response - all that is readily available in this client.\n\n[![GitHub issues](https://img.shields.io/github/issues/dataforseo/TypeScriptClient.svg)](https://github.com/dataforseo/TypeScriptClient/issues)\n[![GitHub license](https://img.shields.io/github/license/dataforseo/TypeScriptClient.svg)](https://github.com/dataforseo/TypeScriptClient)\n\nDataForSEO API uses REST technology for interchanging data between your application and our service. The data exchange is made through the widely used HTTP protocol, which allows using our API with almost any programming language.\n\nClient contains 12 sections (aka APIs):\n\n- SERP ([source docs](./docs/classes/SerpApi.md) | [api docs](https://docs.dataforseo.com/v3/serp/overview/?bash))\n- Keywords Data ([source docs](./docs/classes/KeywordsDataApi.md) | [api docs](https://docs.dataforseo.com/v3/keywords_data/overview/?bash))\n- Domain Analytics ([source docs](./docs/classes/DomainAnalyticsApi.md) | [api docs](https://docs.dataforseo.com/v3/domain_analytics/overview/?bash))\n- DataForSEO Labs ([source docs](./docs/classes/DataforseoLabsApi.md) | [api docs](https://docs.dataforseo.com/v3/dataforseo_labs/overview/?bash))\n- Backlinks ([source docs](./docs/classes/BacklinksApi.md) | [api docs](https://docs.dataforseo.com/v3/backlinks/overview/?bash))\n- OnPage ([source docs](./docs/classes/OnPageApi.md) | [api docs](https://docs.dataforseo.com/v3/on_page/overview/?bash))\n- Content Analysis ([source docs](./docs/classes/ContentAnalysisApi.md) | [api docs](https://docs.dataforseo.com/v3/content_analysis/overview/?bash))\n- Content Generation ([source docs](./docs/classes/ContentGenerationApi.md) | [api docs](https://docs.dataforseo.com/v3/content_generation/overview/?bash))\n- Merchant ([source docs](./docs/classes/MerchantApi.md) | [api docs](https://docs.dataforseo.com/v3/merchant/overview/?bash))\n- App Data ([source docs](./docs/classes/AppDataApi.md) | [api docs](https://docs.dataforseo.com/v3/app_data/overview/?bash))\n- Business Data ([source docs](./docs/classes/BusinessDataApi.md) | [api docs](https://docs.dataforseo.com/v3/business_data/overview/?bash))\n- Appendix ([source docs](./docs/classes/AppendixApi.md) | [api docs](https://docs.dataforseo.com/v3/appendix/user_data/?bash))\n\nAPI Contains 2 types of requests:\n\n1) Live (Simple HTTP request/response message)\n2) Task-based (Requires sending a 'Task' entity to execute, waiting until the 'Task' status is ready, and getting the 'Task' result in a special endpoint. Usually, it is represented by 3 types of endpoints: 'TaskPost', 'TaskReady', and 'TaskGet')\n\nFor more details, please follow [here](https://docs.dataforseo.com/v3/?bash)\n\n## YAML Spec\n\nOur API description is based on the OpenAPI [syntax](https://spec.openapis.org/oas/v3.1.0) in YAML format. The YAML file is attached to the project [here](./openapi_specification.yaml)\n\n## Documentation\n\nThe documentation for code objects, formatted in Markdown (.md) is available [here](./docs/). Official documentation for DataForSEO API is available [here](https://docs.dataforseo.com/v3/?bash).\n\n## Code generation\n\nCode generated using the [NSwag lib](https://github.com/RicoSuter/NSwag)\n\n## Install package from npm\n\n```bash\nnpm install dataforseo-client \n```\n\n## Examples of usage\n\nExample of live request\n```typescript\nimport * as client from 'dataforseo-client'\n\nasync function main() {\n    \n    const username = 'username';\n    const password = 'password';\n\n    const authFetch = createAuthenticatedFetch(username, password);\n    let serpApi = new client.SerpApi(\"https://api.dataforseo.com\", { fetch: authFetch });\n\n    let task = new client.SerpGoogleOrganicLiveAdvancedRequestInfo();\n    task.location_code = 2840;\n    task.language_code = \"en\";\n    task.keyword = \"albert einstein\"\n\n    let resp = await serpApi.googleOrganicLiveAdvanced([task]);\n}\n\nfunction createAuthenticatedFetch(username: string, password: string) {\n    return (url: RequestInfo, init?: RequestInit): Promise\u003cResponse\u003e =\u003e {\n      const token = btoa(`${username}:${password}`);\n      const authHeader = { 'Authorization': `Basic ${token}` };\n\n      const newInit: RequestInit = {\n        ...init,\n        headers: {\n          ...init?.headers,\n          ...authHeader\n        }\n      };\n\n      return fetch(url, newInit);\n    };\n  }\n\nmain();\n```\n\nExample of Task based endpoint\n```typescript\nimport * as client from 'dataforseo-client'\n\nasync function main() {\n\n  const username = 'username';\n  const password = 'password';\n\n  const authFetch = createAuthenticatedFetch(username, password);\n  let serpApi = new client.SerpApi(\"https://api.dataforseo.com\", { fetch: authFetch });\n\n  let task = new client.SerpGoogleOrganicTaskPostRequestInfo();\n  task.location_code = 2840;\n  task.language_code = \"en\";\n  task.keyword = \"albert einstein\"\n\n  let taskResponse = await serpApi.googleOrganicTaskPost([task]) \n\n  let taskID = taskResponse.tasks[0].id;\n  const startTime = Date.now();\n\n  while (!await isReady(serpApi, taskID) \u0026\u0026 Date.now() - startTime \u003c 60000) {\n    await new Promise(resolve =\u003e setTimeout(resolve, 1000));\n  }\n\n  let resp = await serpApi.googleOrganicTaskGetAdvanced(taskID);\n}\n\nasync function isReady(serpApi: client.SerpApi, id: string): Promise\u003cboolean\u003e {\nlet resp = await serpApi.googleOrganicTasksReady();\n\nlet isReadyId = false;\n\nresp.tasks.forEach(x =\u003e {\n   if (x.id == id) {\n    isReadyId = true;\n   }\n});\n\nreturn isReadyId;\n}\n\nfunction createAuthenticatedFetch(username: string, password: string) {\n    return (url: RequestInfo, init?: RequestInit): Promise\u003cResponse\u003e =\u003e {\n      const token = btoa(`${username}:${password}`);\n      const authHeader = { 'Authorization': `Basic ${token}` };\n\n      const newInit: RequestInit = {\n        ...init,\n        headers: {\n          ...init?.headers,\n          ...authHeader\n        }\n      };\n\n      return fetch(url, newInit);\n    };\n  }\n\nmain();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdataforseo%2Ftypescriptclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdataforseo%2Ftypescriptclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdataforseo%2Ftypescriptclient/lists"}