FSSAI FoSCoS Scraper
Pricing
$5.00 / 1,000 results
FSSAI FoSCoS Scraper
Verify FSSAI license numbers using FoSCoS portal
5.0 (1)
Pricing
$5.00 / 1,000 results
1
3
0
Last modified
a month ago
An Apify Actor for verifying FSSAI (Food Safety and Standards Authority of India) license numbers using the FoSCoS (Food Safety Compliance System) portal. This scraper uses advanced encryption/decryption techniques to securely communicate with the FSSAI API and extract comprehensive license information.
Features
- Advanced Encryption: Implements AES-ECB encryption with custom key generation for secure API communication
- Comprehensive License Data: Extracts complete FSSAI license information including company details, addresses, and license status
- Robust Error Handling: Detailed error logging and graceful failure handling
- Structured JSON Output: Well-formatted data with proper data types and validation
- Apify Integration: Full Apify platform support with dataset storage and logging
- Detailed Logging: Saves encrypted requests, API responses, and decrypted data for debugging
Input Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
fssaiNos | Array | Yes | ["12421012003663"] | Array of 14-digit FSSAI license numbers to verify |
Input Schema Example
{"fssaiNos": ["12421012003663", "12418012002769"]}
Output Schema
The scraper outputs structured JSON data for each FSSAI license verification. Below is the complete output schema:
| Field | Type | Required | Description |
|---|---|---|---|
fssai_no | String | Yes | 14-digit FSSAI license number that was verified |
success | Boolean | Yes | Whether the FSSAI license verification was successful |
premiseaddress | String | No | Registered business address for the FSSAI license |
licenseno | String | No | FSSAI license number (same as fssai_no) |
fboid | Number | No | Food Business Operator ID |
displayrefid | String | No | Display reference ID for the license |
licensecategoryname | String | No | License category (State License, Central License, etc.) |
statename | String | No | State where the license is registered |
statusdesc | String | No | Current status of the license (License Issued, etc.) |
licensecategoryid | Number | No | Numeric ID for the license category |
talukname | String/Null | No | Taluk or block name where the premises is located |
districtname | String/Null | No | District where the license is registered |
companyname | String/Null | No | Registered company or business name |
licenseactiveflag | Boolean | No | Whether the license is currently active |
refid | Number | No | Internal reference ID |
apptypedesc | String | No | Type of application (Renewal, New, etc.) |
villagename | String/Null | No | Village name (if applicable) |
premisepincode | Number | No | PIN code of the premises |
Technical Details
Encryption Implementation
- Algorithm: AES-128-ECB with PKCS7 padding
- Key Generation: Custom XOR-based key derivation using predefined arrays
- Request Encryption: Plain JSON payloads are encrypted before sending
- Response Decryption: Encrypted API responses are decrypted using matching keys
- Security: Implements the exact encryption scheme used by FoSCoS portal
Data Processing
- Validation: 14-digit FSSAI number format validation
- Error Handling: Comprehensive error catching with detailed logging
- Data Extraction: Automatic parsing of decrypted license information
- Logging: Saves all request/response data for debugging
Sample Output
Successful Verification:
{"fssai_no": "12421012003663","success": true,"premiseaddress": "2-C, Vinayaga Nagar","licenseno": "12421012003663","fboid": 29501920051690868,"displayrefid": "20241121106688114","licensecategoryname": "State License","statename": "Tamil Nadu","statusdesc": "License Issued","licensecategoryid": 2,"talukname": "Madurai Corporation Ward-44","districtname": "Madurai","companyname": " Sapphire Foods India Limited (KFC) ","licenseactiveflag": true,"refid": 106688114,"apptypedesc": "Renewal","villagename": null,"premisepincode": 625020}
Failed Verification:
{"fssai_no": "12421012003663","success": false}
Usage Examples
Single License Verification
{"fssaiNos": ["12421012003663"]}
Multiple License Verification
{"fssaiNos": ["12421012003663","12418012002769","10011011000123"]}
Error Handling
The scraper handles various error scenarios with intelligent retry logic:
- Invalid FSSAI Format: Returns error for non-14-digit numbers
- API Errors: Automatic retry with exponential backoff (up to 3 attempts)
- Network Timeouts: 45-second timeout with retry mechanism
- Decryption Failures: Saves encrypted responses for manual analysis
- Rate Limiting: Built-in delays between requests
Retry Logic
The scraper implements robust retry logic for each FSSAI number:
- Max Attempts: 3 attempts per FSSAI number
- Backoff Strategy: Exponential backoff (1s → 2s → 4s, capped at 5s)
- Smart Retries: Only retries on network/API errors, not validation errors
- Per-Attempt Logging: Detailed logs for each retry attempt
Security Notes
- Encryption Keys: Uses the same encryption scheme as the official FoSCoS portal
- Data Privacy: All sensitive data is properly encrypted in transit
- API Compliance: Follows the official FSSAI API specifications
- No Data Storage: Only processes and returns license verification results
Support
For issues and questions:
- Check the detailed logs in
storage/logs/{fssaiNo}/directories - Review the Apify Actor logs in the platform
- Ensure FSSAI numbers are valid 14-digit format
- Verify API connectivity to FoSCoS portal
- Email : lakshmanan.w3dev@gmail.com
On this page
Share Actor:
