India Hospitals & Pharmacies by PIN avatar

India Hospitals & Pharmacies by PIN

Pricing

from $1.20 / 1,000 healthcare record extracteds

Go to Apify Store
India Hospitals & Pharmacies by PIN

India Hospitals & Pharmacies by PIN

Resolve Indian PIN codes and export public OpenStreetMap hospital and pharmacy names, categories, coordinates, addresses, and available contacts.

Pricing

from $1.20 / 1,000 healthcare record extracteds

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Categories

Share

Build a PIN-indexed healthcare directory from public OpenStreetMap data. Enter one or more Indian postal PIN codes and receive named hospitals and pharmacies with coordinates, mapped address parts, and available public contact fields.

If you are researching Hyderabad India hospitals, this Actor turns PIN 500001 or another local PIN into a structured dataset instead of a manually copied map list. The same workflow works for supported PIN codes across India.

What this Actor does

The Actor performs four steps:

  1. validates each six-digit Indian PIN code;
  2. resolves the PIN to a geographic center using OpenStreetMap Nominatim;
  3. reads a bounded area from the public OpenStreetMap map API;
  4. filters, normalizes, and deduplicates named hospitals and pharmacies.

Each result keeps the requested PIN code and, separately, the addr:postcode value mapped on the OSM feature. This distinction helps you audit records near a PIN centroid whose mapped postal code differs from the requested PIN.

Who is it for

  • healthcare data teams building location indexes;
  • pharmacy and hospital market researchers;
  • operations teams preparing territory spreadsheets;
  • developers enriching an internal location database;
  • analysts comparing mapped healthcare access across PIN codes;
  • data pipeline owners who need stable OSM IDs and source links.

Choose this Actor when your input is a list of Indian PIN codes and your target entities are hospitals or pharmacies. For broad, worldwide POI categories or a custom Overpass query, use the related OpenStreetMap POI Extractor instead.

Why use a PIN-specific healthcare workflow

A generic POI search leaves postal indexing and category normalization to the user. This Actor adds:

  • strict Indian PIN validation;
  • multi-PIN batching;
  • hospital/pharmacy-only filtering;
  • one normalized healthcare category field;
  • requestedPinCode and mapped pinCode fields;
  • node and way deduplication by stable OSM identity;
  • way centroid calculation;
  • a spreadsheet-friendly default dataset view;
  • bounded radius and output controls.

The Actor does not enrich records from private databases. Contact values are included only when public OSM contributors mapped them.

Extracted data

FieldMeaning
requestedPinCodePIN supplied in the input
pinCodeOSM addr:postcode, or null
categoryhospital or pharmacy
namePublic mapped place name
latitude, longitudeNode coordinates or calculated way centroid
addressCombined available address parts
houseNumber, streetDetailed mapped address values
locality, city, district, stateAvailable administrative values
phone, email, websitePublic contact values when mapped
openingHoursOSM opening-hours expression when mapped
operatorPublic operator value when mapped
emergencyEmergency-service indicator when mapped
osmType, osmIdStable source element identity
osmUrlPublic OSM element page
sourceUrlBounded OSM API request used for retrieval
retrievedAtUTC retrieval timestamp

Fields absent from the source are returned as null. A null contact value is not an extraction error.

Getting started

  1. Open the Actor input page.
  2. Add one Indian PIN code, such as 500001.
  3. Keep both healthcare categories selected for the first run.
  4. Use the default 1 km radius.
  5. Set maxItems to 20 for a small trial.
  6. Start the run.
  7. Open the Healthcare directory dataset view.
  8. Export the results as CSV, Excel, JSON, XML, or RSS through Apify.

Start with a small run because dense city centers can return many records and a larger OSM map response.

Input parameters

pinCodes

Required array of 1–25 Indian PIN codes. Every value must contain six digits and cannot begin with zero. Duplicate values are removed before requests start.

categories

Choose one or both values:

  • hospital
  • pharmacy

The default includes both.

radiusKm

Radius around the PIN centroid, from 0.25 km through 1.5 km. The default is 1 km. This is a centroid search, not a claim that every postal boundary is a perfect circle.

maxItems

Maximum unique records saved across all PIN codes. The accepted range is 1 to 5,000 and the default is 100. Processing stops when this limit is reached.

Example input

{
"pinCodes": ["500001"],
"categories": ["hospital", "pharmacy"],
"radiusKm": 1,
"maxItems": 20
}

This input returned 20 typed records in a local verification run on 26 August 2026. Public map data changes, so later counts can differ.

Example output

The following shape is based on current Actor output. Values are abbreviated to keep the example readable.

{
"requestedPinCode": "500001",
"pinCode": "500029",
"category": "hospital",
"name": "Hope Children's Hospital",
"latitude": 17.4064283,
"longitude": 78.4738814,
"address": "Hyderabad, Telangana, 500029",
"houseNumber": null,
"street": null,
"locality": null,
"city": null,
"district": "Hyderabad",
"state": "Telangana",
"phone": "040 23223782;040 23223792;040 66069000",
"email": "info@hopechildrenshospital.com",
"website": "https://hopechildrenshospital.com/",
"openingHours": null,
"operator": null,
"emergency": null,
"osmType": "node",
"osmId": 2192962541,
"osmUrl": "https://www.openstreetmap.org/node/2192962541",
"sourceUrl": "https://api.openstreetmap.org/api/0.6/map?bbox=...",
"retrievedAt": "2026-08-26T14:35:45.762Z"
}

Always use osmUrl to inspect the current source record when a field is important to a business decision.

How much does it cost to extract India healthcare records?

The Actor uses pay-per-event pricing:

  • a one-time $0.005 run start event;
  • $0.002 per healthcare record at the BRONZE tier;
  • lower per-record prices on higher subscription tiers.

At the BRONZE tier, the Actor price is approximately:

Saved recordsBRONZE calculationApproximate Actor price
100.005 + (10 × 0.002)0.025 USD
500.005 + (50 × 0.002)0.105 USD
1000.005 + (100 × 0.002)0.205 USD
5000.005 + (500 × 0.002)1.005 USD

The per-record event is charged only for a named hospital or pharmacy saved to the default dataset. Empty source features, unnamed places, duplicates, and rejected records are not charged as healthcare records. Apify platform usage may be billed separately according to your plan.

Hyderabad India hospitals workflow

For a focused Hyderabad export:

  1. use PIN 500001;
  2. select hospital;
  3. keep a 1 km radius;
  4. review requestedPinCode and pinCode together;
  5. export the dataset to CSV or Excel;
  6. retain osmId and retrievedAt for future comparisons.

You can schedule the same Actor input as an Apify Task when you need recurring snapshots. The Actor returns the current public OSM view; it does not itself calculate changes between separate runs.

Build a multi-PIN directory

Supply up to 25 PIN codes in one run. Records are deduplicated by OSM element identity, so an entity found in overlapping PIN radii appears once. The retained requestedPinCode is the first processed PIN that found that element.

For more than 25 PIN codes, split your workload into several Tasks. Sequential, bounded batches are kinder to public OSM services and make failures easier to retry.

Export to CSV, Excel, and data pipelines

The default Apify dataset supports:

  • CSV for spreadsheet import;
  • Excel for business review;
  • JSON for APIs and warehouses;
  • XML and RSS for compatible tools;
  • Google Sheets and Make through Apify integrations;
  • webhooks for downstream processing after a run finishes.

Use osmType plus osmId as the durable compound key in your destination. Use retrievedAt as snapshot provenance, not as the feature's edit timestamp.

Run through the Apify API

Replace <APIFY_TOKEN> with your token.

cURL

curl -X POST \
"https://api.apify.com/v2/acts/automation-lab~india-healthcare-directory-by-pin/runs?token=<APIFY_TOKEN>&waitForFinish=600" \
-H "Content-Type: application/json" \
-d '{"pinCodes":["500001"],"categories":["hospital","pharmacy"],"radiusKm":1,"maxItems":20}'

JavaScript

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/india-healthcare-directory-by-pin').call({
pinCodes: ['500001'],
categories: ['hospital', 'pharmacy'],
radiusKm: 1,
maxItems: 20,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

from apify_client import ApifyClient
client = ApifyClient(token='<APIFY_TOKEN>')
run = client.actor('automation-lab/india-healthcare-directory-by-pin').call(
run_input={
'pinCodes': ['500001'],
'categories': ['hospital', 'pharmacy'],
'radiusKm': 1,
'maxItems': 20,
}
)
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)

Use with MCP and AI agents

Claude Code setup

Add the Apify MCP server to Claude Code:

claude mcp add --transport http apify \
"https://mcp.apify.com?tools=automation-lab/india-healthcare-directory-by-pin"

Claude Desktop setup

Claude Desktop can use this MCP configuration:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com?tools=automation-lab/india-healthcare-directory-by-pin"
}
}
}

Cursor setup

Add the same JSON MCP server URL in Cursor Settings → MCP.

VS Code setup

Add the same server URL to your VS Code MCP configuration or use the Apify MCP extension's server settings.

Example prompts

  • “Run the India healthcare directory for PIN 500001 and return hospitals.”
  • “Find pharmacies around Mumbai PIN 400001 and save at most 15 records.”
  • “Build a hospital dataset for PINs 110001 and 700001.”

Review source links before using agent-produced conclusions.

Data quality and limitations

OpenStreetMap is community-maintained. Coverage, names, addresses, categories, and contacts vary by place and date.

Important limits:

  • the search area is a radius around a geocoded PIN centroid;
  • it is not an official postal-boundary dataset;
  • a nearby record may have a different mapped postal code;
  • some valid healthcare facilities are absent from OSM;
  • unnamed features are excluded because they are not useful directory rows;
  • ways receive a calculated center from their available nodes;
  • relations are not emitted in the current version;
  • public OSM services may rate-limit or have temporary outages;
  • a successful empty dataset can mean no named supported records were mapped in that radius.

Do not describe the output as every hospital or pharmacy in a PIN area without independent coverage validation.

Reliability and retries

The Actor retries transient network errors and HTTP 429/5xx responses with bounded backoff. It does not blindly retry invalid input or deterministic client errors.

Requests run sequentially. If an upstream public service remains unavailable, the run fails rather than returning a misleading partial success for that PIN. Retry later or split a large PIN batch into smaller Tasks.

Legality and responsible use

The output derives from OpenStreetMap data, available under the Open Database License (ODbL). Follow OpenStreetMap attribution and share-alike requirements that apply to your use and produced databases.

Only use public contact fields for lawful purposes. Comply with applicable privacy, marketing, healthcare, and anti-spam rules. A mapped phone or email is not consent for unsolicited outreach. Verify important records with the linked source and, when necessary, the facility's official website.

Troubleshooting

A PIN is rejected

Use exactly six digits. Indian PIN codes cannot begin with zero. Send strings, not shortened numeric values.

A valid PIN cannot be resolved

Confirm the PIN and retry later. Nominatim data or availability can change. The Actor fails clearly when no Indian location is returned.

The dataset is empty

Increase the radius gradually up to 1.5 km, select both categories, and inspect OpenStreetMap near the PIN. Empty results can be accurate when no named feature with a hospital/pharmacy tag exists in the bounded area.

The mapped PIN differs from my input

requestedPinCode identifies the search center. pinCode comes from the feature's OSM addr:postcode. A feature can lie near the centroid but carry a neighbouring PIN, or have no mapped PIN.

A contact field is null

The source feature does not currently provide that public tag. The Actor does not guess, scrape unrelated websites, or purchase contact enrichment.

A run times out

Reduce the number of PIN codes, radius, or maxItems. Run several smaller Tasks instead of one dense batch.

FAQ

Does this use Google Maps?

No. It uses public OpenStreetMap Nominatim and map data.

Does it require an OSM API key?

No API key is required for the bounded public endpoints used by this Actor.

Can it search doctors or clinics?

The product contract is hospitals and pharmacies. It does not expose a doctor or general-clinic category.

Are the results verified businesses?

They are source-attributed public OSM features, not independently verified business records. Use osmUrl and official sources for critical validation.

Can I monitor changes?

Schedule recurring Apify Tasks and compare datasets using osmType and osmId. This Actor creates current snapshots; it does not emit a change report.

Why is the radius limited?

A bounded area protects public source services, controls response size, and keeps local processing reliable. Use multiple nearby PINs for broader coverage.

Use the PIN-specific Actor for Indian healthcare directory jobs; use the generic POI extractor when your category or geographic input is outside this contract.