Lal PathLabs APIlalpathlabs.com ↗
Access Dr. Lal PathLabs test data via API: search pathology tests, get full test details, find collection centers, list cities, and retrieve active offers.
What is the Lal PathLabs API?
The Dr. Lal PathLabs API exposes 7 endpoints covering India's largest diagnostic lab chain — from keyword-based test search and full analyte breakdowns to nearest collection center lookup and live promotional offers. The get_test_details endpoint alone returns specimen requirements, pretest preparation, report delivery details, and city-specific pricing by passing one or more item IDs. Coverage spans hundreds of tests and health packages across all cities served by the lab network.
curl -X GET 'https://api.parse.bot/scraper/dfd386be-adc1-4d74-8194-747fd9d834f6/search_tests?query=diabetes&city_id=1' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace lalpathlabs-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Dr. Lal PathLabs API — search tests, get details, browse cities and offers."""
from parse_apis.dr._lal_pathlabs_api import LalPathLabs, ItemId, CityName, TestNotFound
client = LalPathLabs()
# Search for diabetes-related tests
for test in client.tests.search(query="diabetes", limit=3):
print(test.item_name, test.price, test.category_name)
# Get full details for a specific test by item ID
test = client.tests.get(item_id=ItemId.Z021, city_name=CityName.DELHI, limit=1).first()
if test:
print(test.item_name, test.price, test.report_delivery)
for analyte in test.parameters_analyte[:3]:
print(" ", analyte.analyte_name)
# Handle a non-existent test gracefully
try:
client.tests.get(item_id="INVALID999", city_name=CityName.MUMBAI, limit=1).first()
except TestNotFound as exc:
print(f"Test not found: {exc.item_id}")
# List available cities
for city in client.cities.list(limit=5):
print(city.city_name, city.state_name, city.city_id)
# Browse current promotional offers
for offer in client.offers.list(limit=3):
print(offer.Name, offer.CouponCategory.Name)
print("exercised: tests.search / tests.get / cities.list / offers.list / TestNotFound")
Search for pathology tests and health packages by keyword using elastic search. Returns matching tests with prices, analyte parameters, supplementary tests, and collection options. Requires a non-empty search query.
| Param | Type | Description |
|---|---|---|
| queryrequired | string | Search keyword (e.g., 'diabetes', 'thyroid', 'CBC') |
| city_id | integer | City ID for city-specific pricing (default: 2 for Delhi). Obtain city IDs from list_cities endpoint. |
{
"type": "object",
"fields": {
"count": "integer number of matching tests",
"tests": "array of test objects with item_id, item_name, price, parameters_analyte, supplementary_tests, and more"
},
"sample": {
"data": {
"count": 1,
"tests": [
{
"price": "440.00",
"item_id": "Z312",
"item_name": "DIABETES PANEL BASIC",
"nsp_price": "440.00",
"slug_name": "diabetes-panel-basic",
"price_type": "NSP",
"category_name": "Diabetes",
"components_count": 5
}
]
},
"status": "success"
}
}About the Lal PathLabs API
Test Search and Detail
The search_tests endpoint accepts a query string (e.g. 'thyroid', 'CBC', 'diabetes') and an optional city_id integer to return city-adjusted prices alongside matching tests and packages. For deeper inspection, get_test_details takes a item_id string — single or comma-separated — and an optional city_name parameter. Its response includes a result array with analyte parameters, supplementary tests, specimen type, pretest instructions, and report turnaround data. Common item IDs include Z021 for CBC and S153 for thyroid panels.
Test Catalog and Categories
list_all_tests returns a paginated list of every test on the Dr. Lal PathLabs menu, structured as a data object with a result array. list_categories returns all available diagnostic categories — conditions and specialities — that map to test groupings, useful for building filter UIs or browsing by health concern.
Locations and Offers
list_cities returns every city Dr. Lal PathLabs serves, including city_id, city_name, state_name, city_code, and service configuration flags, along with a TotalRecord count. The find_nearest_center endpoint takes a city string and optional state to return nearby collection center details. get_special_offers returns active coupon objects with Name, Description, Banner URL, CouponCategory, and terms — no parameters required.
The Lal PathLabs API is a managed, monitored endpoint for lalpathlabs.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when lalpathlabs.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official lalpathlabs.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a diagnostic test comparison tool that pulls city-specific pricing from
get_test_detailsfor multiple cities simultaneously. - Populate a health app's test catalog using
list_all_testsand enrich each entry with analyte parameters fromget_test_details. - Create a location finder widget that uses
list_citiesto populate a dropdown andfind_nearest_centerto show nearby labs. - Aggregate active discount offers from
get_special_offersand surface coupon banners to users before checkout. - Index pathology tests by category using
list_categoriesto build a browsable condition-based directory. - Automate price monitoring across cities by querying
search_testswith a fixed keyword and rotatingcity_idvalues. - Build a pre-test preparation guide by extracting pretest and specimen fields from
get_test_detailsfor a curated list of tests.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Dr. Lal PathLabs have an official public developer API?+
What does `get_test_details` return beyond price?+
city_name parameter), the endpoint returns analyte parameters, supplementary test associations, specimen requirements, pretest preparation instructions, and report delivery details — all within the result array of the Data object.Does `find_nearest_center` return GPS coordinates or only text-based location data?+
result array of collection center objects for the requested city. The response schema listed does not explicitly expose latitude/longitude fields. You can fork this API on Parse and revise it to add coordinate extraction if the underlying center data includes it.Can I retrieve home sample collection availability or booking slots through this API?+
How does `list_all_tests` handle large catalogs — is there pagination control?+
data object with a result array but does not currently expose user-controlled pagination parameters such as page number or page size. All available tests are returned in the default response.