FSSAI FoSCoS Scraper avatar
FSSAI FoSCoS Scraper

Pricing

$5.00 / 1,000 results

Go to Apify Store
FSSAI FoSCoS Scraper

FSSAI FoSCoS Scraper

Developed by

codingfrontend

codingfrontend

Maintained by Community

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

ParameterTypeRequiredDefaultDescription
fssaiNosArrayYes["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:

FieldTypeRequiredDescription
fssai_noStringYes14-digit FSSAI license number that was verified
successBooleanYesWhether the FSSAI license verification was successful
premiseaddressStringNoRegistered business address for the FSSAI license
licensenoStringNoFSSAI license number (same as fssai_no)
fboidNumberNoFood Business Operator ID
displayrefidStringNoDisplay reference ID for the license
licensecategorynameStringNoLicense category (State License, Central License, etc.)
statenameStringNoState where the license is registered
statusdescStringNoCurrent status of the license (License Issued, etc.)
licensecategoryidNumberNoNumeric ID for the license category
taluknameString/NullNoTaluk or block name where the premises is located
districtnameString/NullNoDistrict where the license is registered
companynameString/NullNoRegistered company or business name
licenseactiveflagBooleanNoWhether the license is currently active
refidNumberNoInternal reference ID
apptypedescStringNoType of application (Renewal, New, etc.)
villagenameString/NullNoVillage name (if applicable)
premisepincodeNumberNoPIN 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