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

Automation Lab

Automation Lab

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

18 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 (unchanged)
fullAddressExact mapped addr:full, independently of address
healthcareSpecialityExact mapped healthcare:speciality, including any semicolon-separated values
operatorTypeExact mapped operator:type
distanceKmGreat-circle distance from the requested PIN center to the feature center
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. A supported amenity=hospital/pharmacy takes precedence over healthcare; otherwise a supported healthcare tag is used. Category selection filters that classification and does not relabel a feature.

radiusKm

Finite number from 0.25 km through 1.5 km, default 1 km. By default this is the approximate north/south and east/west half-extent of a square bounding box, preserving legacy results; corner records can be farther than this value. It is not an official postal boundary.

strictRadius

Optional boolean, default false. Set true to additionally retain only feature centers within radiusKm of the geocoded PIN center, using great-circle distance (Earth radius 6371.0088 km; numerical tolerance 1e-9 km). Filtering happens before deduplication, the global output limit and charging. A way's center is the average of its available node coordinates, not its boundary or entrance. The bounding-box source scope stays unchanged; this is not a complete circular-area coverage claim.

maxItems

Maximum unique records saved across all PIN codes. The accepted range is 1 to 5,000 integer records and the default is 100. Processing stops when this limit or the accepted charge budget is reached; exclusions do not consume the limit.

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 illustrative shape uses anonymized values; it is not a current facility listing or a claim about any particular specialty.

{
"requestedPinCode": "500001",
"pinCode": "500029",
"category": "hospital",
"name": "Sample Community Hospital",
"latitude": 17.4064283,
"longitude": 78.4738814,
"address": "Hyderabad, Telangana, 500029",
"fullAddress": "12 Central Road, Central Ward",
"healthcareSpeciality": "paediatrics",
"operatorType": "private",
"distanceKm": 0.851,
"houseNumber": null,
"street": null,
"locality": null,
"city": null,
"district": "Hyderabad",
"state": "Telangana",
"phone": "+91 40 0000 0000",
"email": "contact@samplehospital.invalid",
"website": "https://samplehospital.invalid/",
"openingHours": null,
"operator": null,
"emergency": null,
"osmType": "node",
"osmId": 123456789,
"osmUrl": "https://www.openstreetmap.org/node/123456789",
"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.

The Actor stops before writing beyond its remaining combined record/dataset-event budget. It uses Apify SDK persistence followed by record charging: these are not atomic operations. A persistence error prevents the subsequent record charge. A platform charge failure fails the run rather than reporting successful uncharged output, but already persisted rows may remain in that failed run's dataset. Inspect failed runs before consuming their partial output; the Actor does not automatically retry an ambiguous persistence/charging operation.

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 default search area is a square bounding box around a geocoded PIN center;
  • optional strict-radius mode filters feature centers, not facility boundaries;
  • 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 up to three attempts with exponential backoff and jitter (about 2 then 4 seconds). Invalid input and deterministic non-429 client errors are attempted zero and one times respectively. PIN/category arrays and string values, finite radius, integer limits and the strict-radius boolean are validated before charging or source calls.

Requests run sequentially. The specific OSM 50,000-node density-limit response activates bounded subdivision of the same box (two levels, at most 16 successful leaf tiles), with 1.1 seconds between tile requests. Other 400 responses fail immediately. Tile overlap is deduplicated by OSM identity; no extra geography is requested. If even the bounded tiles fail, the run fails honestly.

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.

Data handling and support

This Actor does not use AI models or send output to an AI provider. It queries public OSM/Nominatim endpoints without a paid data supplier or proxy. It is not affiliated with or endorsed by OpenStreetMap. Data is attributed under ODbL.

PIN inputs and public mapped facility details are processed for the directory; no patient records or private accounts are accessed. Output and INPUT are stored in the run's Apify storage under your account's retention settings; the Actor does not delete those stores automatically or create cross-run caches. You can delete run storage through Apify. Report product issues through the Actor's Apify Store Issues tab; verify public contacts before lawful use.

Failure diagnostics

Failed operations send sanitized diagnostic input, exceptions and Actor/build/run IDs to our private GlitchTip service for repair. Secret fields and URL query strings are removed, and reports are retained for 30 days. No diagnostic credentials are requested through the public input.

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.