-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathborme_corporate_acts.py
More file actions
48 lines (37 loc) · 1.63 KB
/
Copy pathborme_corporate_acts.py
File metadata and controls
48 lines (37 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
"""
BORME Corporate Acts Scraper - Spain's official corporate registry gazette
Actor: https://apify.com/regdata/borme-corporate-acts-scraper
BORME (Boletin Oficial del Registro Mercantil) publishes 500+ corporate acts
daily: incorporations, officer appointments/dismissals, capital changes,
dissolutions. Required for Spanish corporate monitoring and due diligence.
Note: No proxy or API key needed. The actor is plain HTTP against boe.es plus
PDF parsing - it downloads the official BORME PDFs directly, no browser and no
WAF to clear.
Cost: $0.005 per act + $0.005 actor start fee
"""
from apify_client import ApifyClient
from datetime import datetime, timedelta
APIFY_TOKEN = "YOUR_APIFY_TOKEN"
client = ApifyClient(APIFY_TOKEN)
# Fetch all corporate acts for the past week
end_date = datetime.today()
start_date = end_date - timedelta(days=7)
run = client.actor("regdata/borme-corporate-acts-scraper").call(
run_input={
"startDate": start_date.strftime("%Y-%m-%d"),
"endDate": end_date.strftime("%Y-%m-%d"),
"documentType": "Todos", # All act types
"companyName": "", # Leave empty for all companies
}
)
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(f"Retrieved {len(items)} corporate acts\n")
# Group by act type
from collections import Counter
act_types = Counter(item.get("documentType", "Unknown") for item in items)
print("Acts by type:")
for act_type, count in act_types.most_common():
print(f" {act_type}: {count}")
print("\nSample acts:")
for item in items[:5]:
print(f" {item.get('companyName')} - {item.get('documentType')} ({item.get('publicationDate')})")