# GSTIN Scraper (`codingfrontend/gstin-scraper`) Actor

A robust, high-performance utility designed for developer automation, data integration, and AI training. Features built-in captcha bypass, headful/headless browser execution, and proxy support to scrape GSTIN data seamlessly, reliably, and at scale.

- **URL**: https://apify.com/codingfrontend/gstin-scraper.md
- **Developed by:** [Coding Frontned](https://apify.com/codingfrontend) (community)
- **Categories:** Automation, Developer tools, Integrations
- **Stats:** 100 total users, 7 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: 2.37 out of 5 stars

## Pricing

from $4.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## GSTIN Scraper

### Features

- **Comprehensive GST Data Extraction**: Scrapes all available GSTIN information from GST portal
- **Taxpayer Details**: Extracts complete taxpayer information including legal name, trade name, registration details, business activities, and address
- **State Jurisdiction Parsing**: Automatically splits state jurisdiction into separate fields (state, division, zone, circle) for easier filtering and analysis
- **HSN Codes & Services**: Captures goods and services information with HSN codes for goods and SAC codes for services
- **Filing Status & History**: Extracts complete return filing status for all financial years with detailed monthly/quarterly filing information
- **Financial Years Data**: Retrieves available financial years and filing frequency preferences
- **Flexible Data Extraction**: Choose which data to extract (HSN codes, filing details, or both) using input parameters
- **Usage-based Billing**: Pay only for the data you actually extract with transparent per-item charging

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `gstins` | Array | Yes | `["06AAICK7471J1Z4"]` | Array of GSTIN (Goods and Services Tax Identification Number) strings to scrape |
| `extractHsnCodes` | Boolean | No | `true` | Extract goods and services information including HSN/SAC codes |
| `extractFilingDetails` | Boolean | No | `true` | Extract filing status and financial year details |

#### Input Schema Example

```json
{
  "gstins": ["06AAICK7471J1Z4", "07AABCT1234F1Z5"],
  "extractHsnCodes": true,
  "extractFilingDetails": true
}
````

#### Advanced Usage Examples

**Extract only taxpayer details (no HSN codes or filing details):**

```json
{
  "gstins": ["06AAICK7471J1Z4"],
  "extractHsnCodes": false,
  "extractFilingDetails": false
}
```

**Extract taxpayer details and HSN codes only:**

```json
{
  "gstins": ["06AAICK7471J1Z4"],
  "extractHsnCodes": true,
  "extractFilingDetails": false
}
```

**Extract taxpayer details and filing details only:**

```json
{
  "gstins": ["06AAICK7471J1Z4"],
  "extractHsnCodes": false,
  "extractFilingDetails": true
}
```

### Billing and Charges

This actor uses a usage-based billing system. You are charged based on the data you actually extract:

#### Billing Events

| Event | Description | Count Basis |
|-------|-------------|-------------|
| `taxpayer` | Basic taxpayer information | 1 per GSTIN processed |
| `hsn` | HSN codes and goods/services data | Number of HSN items extracted |
| `filing` | Filing status and financial year data | Number of filing entries extracted |

### Output Schema

The scraper outputs structured JSON data for each GSTIN. Below is the complete output schema:

| Field | Type | Description |
|-------|------|-------------|
| `gstinNumber` | String | The GSTIN that was scraped |
| `success` | Boolean | Whether the scraping was successful |
| `goodservice` | Object | Goods and services information with SAC codes |
| `finanacialYears` | Array | Financial year mappings |
| `filingStatus` | Array | Detailed return filing status for each year |
| `filingFrequency` | Array | Quarterly filing preferences by year |
| `legalName` | String | Legal name of the taxpayer |
| `tradeName` | String | Trade name of the taxpayer |
| `registrationDate` | String | GST registration date |
| `taxpayerType` | String | Type of taxpayer (Regular/Composition) |
| `businessActivities` | Array | Business activities of the taxpayer |
| `principalAddress` | Object | Principal place of business address |
| `stateJurisdiction` | String | State tax jurisdiction (full string) |
| `state` | String | State extracted from stateJurisdiction |
| `division` | String | Division extracted from stateJurisdiction |
| `zone` | String | Zone extracted from stateJurisdiction |
| `circle` | String | Circle extracted from stateJurisdiction |
| `taxJurisdiction` | String | Central tax jurisdiction |
| `status` | String | GST registration status |
| `natureOfTaxpayer` | String | Nature of taxpayer |
| `companyType` | String | Type of company |
| `isAadhaarVerified` | String | Aadhaar verification status |
| `isEKYCVerified` | String | eKYC verification status |
| `compositionScheme` | String | Composition scheme status |
| `eInvoiceEnabled` | String | e-Invoice enablement status |
| `fieldVisitConducted` | String | Field visit conduction status |
| `cancellationDate` | String | GST cancellation date (if applicable) |

#### Detailed Output Structure

##### Good Service Object

```json
{
  "services": [
    {
      "sacCode": "998361",
      "description": "Advertising Services"
    },
    {
      "sacCode": "998599",
      "description": "Other support services nowhere else classified"
    }
  ]
}
```

##### Financial Years Array

```json
[
  {
    "year": "2021-2022",
    "value": "2021"
  },
  {
    "year": "2022-2023",
    "value": "2022"
  }
]
```

##### Filing Status Array (Each year contains)

```json
[
  {
    "year": "2021",
    "returns": [
      {
        "financialYear": "2021-2022",
        "taxPeriod": "March",
        "modeOfFiling": "ONLINE",
        "dateOfFiling": "11/04/2022",
        "returnType": "GSTR1",
        "arn": "NA",
        "status": "Filed"
      }
    ]
  }
]
```

##### Filing Frequency Array

```json
[
  {
    "quarter": "Q1",
    "preference": "M",
    "year": "2021"
  }
]
```

##### Principal Address Object

```json
{
  "adr": "4th Floor, Unit No. 401 and Unit No. 402, Worldmark 2, Sector 65, Village Maidawas, Gurugram, Haryana, 122001"
}
```

### Sample Output

here's a sample of the GSTIN data structure:

```json
{
	"goodservice": {
		"services": [
			{
				"sacCode": "998361",
				"description": "Advertising Services"
			},
			{
				"sacCode": "998599",
				"description": "Other support services nowhere else classified"
			}
		]
	},
	"finanacialYears": [
		{
			"year": "2021-2022",
			"value": "2021"
		},
		{
			"year": "2022-2023",
			"value": "2022"
		},
		{
			"year": "2023-2024",
			"value": "2023"
		},
		{
			"year": "2024-2025",
			"value": "2024"
		},
		{
			"year": "2025-2026",
			"value": "2025"
		}
	],
	"filingStatus": [
		{
			"year": "2025",
			"returns": [
				
				{
					"financialYear": "2025-2026",
					"taxPeriod": "April",
					"modeOfFiling": "ONLINE",
					"dateOfFiling": "20/05/2025",
					"returnType": "GSTR3B",
					"arn": "NA",
					"status": "Filed"
				}
			]
		}
	],
	"filingFrequency": [
		{
			"quarter": "Q4",
			"preference": "M",
			"year": "2025"
		}
	],
	"natureOfTaxpayer": "SPO",
	"isAadhaarVerified": "No",
	"legalName": "KFC INDIA MARKETING PRIVATE LIMITED",
	"stateJurisdiction": "State - Haryana,Range - Gurgaon,District - Gurgaon (South),Ward - Gurgaon (South) Ward 1",
	"state": "Haryana",
	"division": null,
	"zone": null,
	"circle": null,
	"taxpayerType": "Regular",
	"cancellationDate": "",
	"gstinNumber": "06AAICK7471J1Z4",
	"businessActivities": [
		"Export",
		"Supplier of Services",
		"Recipient of Goods or Services",
		"Others"
	],
	"isEKYCVerified": "No",
	"compositionScheme": "NA",
	"registrationDate": "07/07/2021",
	"companyType": "Private Limited Company",
	"principalAddress": {
		"adr": "4th Floor, Unit No. 401 and Unit No. 402, Worldmark 2, Sector 65, Village Maidawas, Gurugram, Haryana, 122001"
	},
	"status": "Active",
	"tradeName": "KFC INDIA MARKETING PRIVATE LIMITED",
	"fieldVisitConducted": "No",
	"taxJurisdiction": "State - CBIC,Zone - PANCHKULA,Commissionerate - GURUGRAM,Division - DIVISION-SOUTH-1,Range - R-20 (Jurisdictional Office)",
	"eInvoiceEnabled": "Yes"
}
```

### Changelog

For a detailed list of changes and version history, see [CHANGELOG.md](CHANGELOG.md).

### Support

For issues and questions:

- Ensure GSTIN numbers are valid 15-digit format
- Verify GST portal accessibility
- Email : lakshmanan.w3dev@gmail.com

# Actor input Schema

## `gstins` (type: `array`):

GSTIN numbers to scrape from GST portal

## `extractHsnCodes` (type: `boolean`):

Extract goods and services information including HSN/SAC codes

## `extractFilingDetails` (type: `boolean`):

Extract filing status and financial year details

## `headless` (type: `boolean`):

Run browser in headless mode (no visible UI). Set to false for debugging.

## `proxyConfiguration` (type: `object`):

Use Apify Proxy to avoid IP address-based blocking. Required for successful scraping.

## Actor input object example

```json
{
  "gstins": [
    "06AAICK7471J1Z4"
  ],
  "extractHsnCodes": true,
  "extractFilingDetails": true,
  "headless": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "IN"
  }
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "gstins": [
        "06AAICK7471J1Z4"
    ],
    "headless": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("codingfrontend/gstin-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "gstins": ["06AAICK7471J1Z4"],
    "headless": True,
}

# Run the Actor and wait for it to finish
run = client.actor("codingfrontend/gstin-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "gstins": [
    "06AAICK7471J1Z4"
  ],
  "headless": true
}' |
apify call codingfrontend/gstin-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=codingfrontend/gstin-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "GSTIN Scraper",
        "description": "A robust, high-performance utility designed for developer automation, data integration, and AI training. Features built-in captcha bypass, headful/headless browser execution, and proxy support to scrape GSTIN data seamlessly, reliably, and at scale.",
        "version": "2.0",
        "x-build-id": "TucZMN1E9mF9UTUG8"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/codingfrontend~gstin-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-codingfrontend-gstin-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/codingfrontend~gstin-scraper/runs": {
            "post": {
                "operationId": "runs-sync-codingfrontend-gstin-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/codingfrontend~gstin-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-codingfrontend-gstin-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "gstins"
                ],
                "properties": {
                    "gstins": {
                        "title": "GSTIN Numbers",
                        "type": "array",
                        "description": "GSTIN numbers to scrape from GST portal",
                        "items": {
                            "type": "string"
                        }
                    },
                    "extractHsnCodes": {
                        "title": "Extract HSN Codes",
                        "type": "boolean",
                        "description": "Extract goods and services information including HSN/SAC codes",
                        "default": true
                    },
                    "extractFilingDetails": {
                        "title": "Extract Filing Details",
                        "type": "boolean",
                        "description": "Extract filing status and financial year details",
                        "default": true
                    },
                    "headless": {
                        "title": "Headless Mode",
                        "type": "boolean",
                        "description": "Run browser in headless mode (no visible UI). Set to false for debugging.",
                        "default": true
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Use Apify Proxy to avoid IP address-based blocking. Required for successful scraping.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ],
                            "apifyProxyCountry": "IN"
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
