roruenLogin
Ad
ITA
FusionWorks
Last
Comment

aceasta scoala este buna dar salile de clasa nu sunt in starea in care ar trebui sa fie in scoala ia...

Albina CotorobaiGimnaziul Cristeşti
Ministry of Education(+373 22) 23-46-09Official site

API

Register to get the last api updates!
Name
Email

API Overview

Out team provides free REST services for you to get the up-to-date schools' data. No authorization required. Also, you can register your email and get the latest updates and changes in the API.

API Services

Common (base) URL for the API: http://afla.md/ws/

Institutions' list

URL: /institutionslist/[parameters]

Parameters (all of them are optional)

  • search - keyword to search through the school names
  • locality - id of the locality to search the schools through
  • region - id of the region to search the schools through
  • page_number - number of institutions per page (see below) to return
  • page - page to start with, e.g.page=1&page_number=10 will return records from 0 to 10, page=1&page_number=10 return records 10...20
  • sort_by - field to sort the records through (field names can be found in the result set returned by the web service)
  • sort_method - ASC for ascending sort order and DESC for descending

Returns:

JSON array with two elements:
  • institutions - array with all the institutions found
  • num_rows - total number of the rows found with the given conditions

Each record in the institutions array contains:
  • id - unique id of the institution
  • name_ro - name of the institution in Romanian
  • name_ru - name of the institution in Russian
  • name_en - name of the institution in English
  • keywords
  • institution_type_id
  • institution_type_name_ro
  • locality_id
  • locality_name_ro
  • description_ro - institution description in Romanian
  • description_ru - institution description in Russian
  • description_en - institution description in English
  • location
  • language_id
  • language_name
  • latitude
  • longitude
  • height

Examples:

Shows 2 records which contain in name word "cantemir", starting from page 2 (e.g. record #2 and #3)
Request: afla.md/ws/institutionslist/?search=cantemir&page=2&page_number=2
Response:
{"institutions":[{"id":"1834","name_ro":"L.T. D. Cantemir","name_ru":"","name_en":"L.T. D. Cantemir","keywords":"L.T. D. Cantemir","institution_type_id":"2","institution_type_name_ro":"Liceu","locality_id":"1157","locality_name_ro":"MUN.BALTI","description_ro":"","description_ru":"","description_en":"","location":"POINT(47.76033 27.919006)","language_id":"4","language_name":"unknown","":"0","latitude":"47.76033","longitude":"27.919006","height":150},{"id":"1972","name_ro":"Liceul Teoretic \"Antioh Cantemir\"","name_ru":"","name_en":"Liceul Teoretic \"Antioh Cantemir\"","keywords":"Moldova A.Cantemir Lyceum ","institution_type_id":"2","institution_type_name_ro":"Liceu","locality_id":"1161","locality_name_ro":"sec.Buiucani","description_ro":"","description_ru":"","description_en":"","location":"","language_id":"4","language_name":"unknown","":"0","latitude":null,"longitude":"","height":150}],"num_rows":"1529"}

Institution details

URL: /institutiondetails/id/[action]/[category]

Parameters:

  • id - id of the institution
  • action - what kind of details return. Available options:
    • general - common school details, as in the /institutionslist/
    • photos - array of photos (urls)
    • amenities - returns the associative array with school amenities, grouped by amenity category.

      List of all amenity categories:

      • GENERAL
      • FIGURES
      • INFRASTRUCTURE
      • COMMUNICATIONS
      • LANG_OF_STUDY
      • STUDENT_NATION
      • FINANCE_111
      • FINANCE_112
      • FINANCE_113
      • FINANCE_114
      • FINANCE_116
      • FINANCE_131
      • FINANCE_132
      • FINANCE_134
      • FINANCE_135
      • FINANCE_241
      • FINANCE_242
      • FINANCE_243
      • FINANCE_271
      • FINANCE_291
    • opinions - list of opinions
    If no action specified, then service will return array with all this data

  • category - specifies what category (item) to return. Depends on the action:
action category role
general no effect
photos id of photo
amenity name of amenities' group
opinions id of opinion

Returns:

JSON array, corresponding to the action/category provided:

Examples:

General school information
Request: http://afla.md/ws/institutiondetails/1834/general
Response:
{","","id",":1834","name_ro":"L.T. D. Cantemir","name_ru":"","name_en":"L.T. D. Cantemir","keywords":"L.T. D. Cantemir","institution_type_id":"2","institution_type_name_ro":"Liceu","locality_id":"1157","locality_name_ro":"MUN.BALTI","locality_name_ru":"","locality_name_en":"Mayoralty of the municipality of Balti","address":"","phones":"","url":"","region_id":"41","region_name_ro":"mun. B\u0103l\u0163i","region_name_ru":"","region_name_en":"Council of the municipality of Balti","description_ro":"","description_ru":"","description_en":"","location":"POINT(47.76033 27.919006)","language_id":"4","language_name":"unknown","":"0","latitude":"47.76033","longitude":"27.919006","height":150,"students_count":"632"}
Get the GENERAL amenity group
Request: http://afla.md/ws/institutiondetails/1834/amenities/GENERAL
Response:
[{"id":"76414","amenity_id":"3","amenity_name_ro":"Num\u0103rul de etaje ale blocului de studii","amenity_name_ru":"","amenity_name_en":"FLOOR_COUNT","class":"GENERAL","code":"FLOOR_COUNT","unit":"","value":"0","year":"2010"},{"id":"76424","amenity_id":"2","amenity_name_ro":"Anul construc\u0163iei","amenity_name_ru":"","amenity_name_en":"CONSTRUCTION_YEAR","class":"GENERAL","code":"CONSTRUCTION_YEAR","unit":"","value":"1962","year":"2010"},{"id":"110356","amenity_id":"54","amenity_name_ro":"Numar de elevi","amenity_name_ru":"","amenity_name_en":"STUDENTS_COUNT","class":"GENERAL","code":"STUDENTS_COUNT","unit":"","value":"632","year":"2010"}]

Region's list

URL: /regionslist/

Returns:

JSON array with two elements:
  • regions - array with all the regions found
  • num_rows - total number of the rows found with the given conditions
Each record in the institutions array contains:
  • id - unique id of the regions
  • name_ro - name of the regions in Romanian
  • name_ru - name of the regions in Russian
  • name_en - name of the regions in English
  • keywords

Examples:


Request: afla.md/ws/regionslist/
Response:
{"regions":[{"id":"41","name_ro":"mun. B\u0103l\u0163i","name_ru":"","name_en":"Council of the municipality of Balti","keywords":"Council of the municipality of Balti","":"0"},{"id":"42","name_ro":"mun. Chi\u015fin\u0103u","name_ru":"","name_en":" Council of the municipality of Chisinau","keywords":" Council of the municipality of Chisinau","":"0"},{"id":"43","name_ro":"r-l Anenii Noi","name_ru":"","name_en":"District Council Anenii Noi","keywords":"District Council Anenii Noi","":"0"},{"id":"44","name_ro":"r-l Basarabeasca","name_ru":"","name_en":"District Council Basarabeasca","keywords":"District Council Basarabeasca","":"0"},{"id":"45","name_ro":"r-l Briceni","name_ru":"","name_en":"District Council Briceni","keywords":"District Council Briceni","":"0"},{"id":"46","name_ro":"r-l Cahul","name_ru":"","name_en":" District Council Cahul","keywords":" District Council Cahul","":"0"},{"id":"47","name_ro":"r-l C\u0103l\u0103ra\u015fi","name_ru":"","name_en":"District Council Calarasi","keywords":"District Council Calarasi","":"0"},{"id":"48","name_ro":"r-l Cantemir","name_ru":"","name_en":"District Council Cantemir","keywords":"District Council Cantemir","":"0"},{"id":"49","name_ro":"r-l C\u0103u\u015feni","name_ru":"","name_en":"District Council Causeni","keywords":"District Council Causeni","":"0"},{"id":"50","name_ro":"r-l Cimi\u015flia","name_ru":"","name_en":"District Council Cimislia","keywords":"District Council Cimislia","":"0"},{"id":"51","name_ro":"r-l Criuleni","name_ru":"","name_en":"District Council Criuleni","keywords":"District Council Criuleni","":"0"},{"id":"52","name_ro":"r-l Dondu\u015feni","name_ru":"","name_en":"District Council Donduseni","keywords":"District Council Donduseni","":"0"},{"id":"53","name_ro":"r-l Drochia","name_ru":"","name_en":"District Council Drochia","keywords":"District Council Drochia","":"0"},{"id":"54","name_ro":"r-l Dub\u0103sari","name_ru":"","name_en":"District Council Dubasari","keywords":"District Council Dubasari","":"0"},{"id":"55","name_ro":"r-l Edine\u0163","name_ru":"","name_en":"District Council Edinet","keywords":"District Council Edinet","":"0"},{"id":"56","name_ro":"r-l F\u0103le\u015fti","name_ru":"","name_en":" District Council Falesti","keywords":" District Council Falesti","":"0"},{"id":"57","name_ro":"r-l Flore\u015fti","name_ru":"","name_en":"r-l Flore\u015fti","keywords":"r-l Flore\u015fti","":"0"},{"id":"58","name_ro":"r-l Glodeni","name_ru":"","name_en":"District Council Glodeni","keywords":"District Council Glodeni","":"0"},{"id":"59","name_ro":"r-l H\u0103nce\u015fti","name_ru":"","name_en":"District Council Hincesti","keywords":"District Council Hincesti","":"0"},{"id":"60","name_ro":"r-l Ialoveni","name_ru":"","name_en":"District Council Ialoveni","keywords":"District Council Ialoveni","":"0"},{"id":"61","name_ro":"r-l Leova","name_ru":"","name_en":" District Council Leova","keywords":" District Council Leova","":"0"},{"id":"62","name_ro":"r-l Nisporeni","name_ru":"","name_en":"District Council Nisporeni","keywords":"District Council Nisporeni","":"0"},{"id":"63","name_ro":"r-l Ocni\u0163a","name_ru":"","name_en":"District Council Ocnita","keywords":"District Council Ocnita","":"0"},{"id":"64","name_ro":"r-l Orhei","name_ru":"","name_en":"District Council Orhei","keywords":"District Council Orhei","":"0"},{"id":"65","name_ro":"r-l Rezina","name_ru":"","name_en":"District Council Rezina","keywords":"District Council Rezina","":"0"},{"id":"66","name_ro":"r-l R\u00ee\u015fcani","name_ru":"","name_en":"District Council Riscani","keywords":"District Council Riscani","":"0"},{"id":"67","name_ro":"r-l S\u00eengerei","name_ru":"","name_en":"District Council Singerei","keywords":"District Council Singerei","":"0"},{"id":"68","name_ro":"r-l \u015eold\u0103ne\u015fti","name_ru":"","name_en":"District Council Soldanesti","keywords":"District Council Soldanesti","":"0"},{"id":"69","name_ro":"r-l Soroca","name_ru":"","name_en":"District Council Soroca","keywords":"District Council Soroca","":"0"},{"id":"70","name_ro":"r-l \u015etefan Vod\u0103","name_ru":"","name_en":"District Council Stefan-Voda","keywords":"District Council Stefan-Voda","":"0"},{"id":"71","name_ro":"r-l Str\u0103\u015feni","name_ru":"","name_en":"District Council Straseni","keywords":"District Council Straseni","":"0"},{"id":"72","name_ro":"r-l Taraclia","name_ru":"","name_en":"District Council Taraclia","keywords":"District Council Taraclia","":"0"},{"id":"73","name_ro":"r-l Telene\u015fti","name_ru":"","name_en":"District Council Telenesti","keywords":"District Council Telenesti","":"0"},{"id":"74","name_ro":"r-l Ungheni","name_ru":"","name_en":"District Council Ungheni","keywords":"District Council Ungheni","":"0"},{"id":"75","name_ro":"UTA G\u0103g\u0103uzia","name_ru":"","name_en":"District Council ATU Gagauzia","keywords":"District Council ATU Gagauzia","":"0"}],"num_rows":"35"}

Localities list

URL: /localitieslist/

Parameters:

  • id - id of the region
If no action specified, then service will return array with all this data

Returns:

JSON array, corresponding to the id provided: Each record in the institutions array contains:
  • id - unique id of the localities
  • name_ro - name of the regions in Romanian
  • name_ru - name of the regions in Russian
  • name_en - name of the regions in English
  • regon_id - unique id of the regions
  • keywords - key words

Examples:

General school information
Request: http://afla.md/ws/localitieslist?region_id=41
Response:
{"region_localities":[{"id":"1157","name_ro":"MUN.BALTI","name_ru":"","name_en":"Mayoralty of the municipality of Balti","region_id":"41","keywords":"Mayoralty of the municipality of Balti","":"0"},{"id":"1158","name_ro":"S.ELIZAVETA","name_ru":"","name_en":"Mayoralty of Elizaveta","region_id":"41","keywords":"Mayoralty of Elizaveta","":"0"},{"id":"1159","name_ro":"S.SADOVOE","name_ru":"","name_en":"Mayoralty of Sadovoe","region_id":"41","keywords":"Mayoralty of Sadovoe","":"0"}],"num_rows":null}
Get the ALL localities information
Request: http://afla.md/ws/localitieslist
Response:
All localities information

Scores list

URL: /scores/institutionid/[action]

Parameters:

  • id - id of the institution
  • action - what kind of details return. Available options:
    • all - return all scores for the school
    • summary - avg data from summary table
If no action specified, then service will return all scores for the school

Info:

variable value
sex_id: 1 Feamle
sex_id: 2 Male
profile_id: 1 Humanitariane
profile_id: 2 Real
profile_id: 3 Art
profile_id: 4 Sport

Returns:

JSON array, corresponding to the id provided:

Examples:

Get the ALL institution scores
Request: http://afla.md/ws/scores/1977/?action=all
Response:
{"scores":{"2010":[{"bachelor_result_med_extras":"6.88","bachelor_result_med_bachelor":"5.75","year":"2010","profile_id":"1","sex_id":"1"},{"bachelor_result_med_extras":"8.11","bachelor_result_med_bachelor":"6.25","year":"2010","profile_id":"1","sex_id":"1"},{"bachelor_result_med_extras":"7.74","bachelor_result_med_bachelor":"8.00","year":"2010","profile_id":"1","sex_id":"1"},{"bachelor_result_med_extras":"8.96","bachelor_result_med_bachelor":"8.25","year":"2010","profile_id":"1","sex_id":"1"},{"bachelor_result_med_extras":"6.73","bachelor_result_med_bachelor":"6.25","year":"2010","profile_id":"1","sex_id":"2"},
Get avg data from summary table
Request: http://afla.md/ws/scores/1977/?action=summary
Response:
{"scoressummary":{"2005":[{"id":"21457","institution_id":"2016","institution_name_ro":"Liceul teoretic \"Hyperion\" Anenii Noi","profile_id":"1","profile_name_ro":"Umanist","sex_id":"1","sex_name_ro":"Feminin","year":"2005","score_summary_result_med_extras":"","score_summary_result_med_bachelor":""},{"id":"21458","institution_id":"2016","institution_name_ro":"Liceul teoretic \"Hyperion\" Anenii Noi","profile_id":"1","profile_name_ro":"Umanist","sex_id":"2","sex_name_ro":"Masculin","year":"2005","score_summary_result_med_extras":"","score_summary_result_med_bachelor":""},{"id":"21459","institution_id":"2016","institution_name_ro":"Liceul teoretic \"Hyperion\" Anenii Noi","profile_id":"2","profile_name_ro":"Real","sex_id":"1","sex_name_ro":"Feminin","year":"2005","score_summary_result_med_extras":"","score_summary_result_med_bachelor":""},{"id":"21460","institution_id":"2016","institution_name_ro":"Liceul teoretic \"Hyperion\" Anenii Noi","profile_id":"2","profile_name_ro":"Real","sex_id":"2","sex_name_ro":"Masculin","year":"2005","score_summary_result_med_extras":"","score_summary_result_med_bachelor":""}]