Get started

                API Endpoint

                https://yell.midear.tech/v1
            

This REST API provides programmatical access to the yellowPages data. All requests are prefixed with the highlighted endpoint. All requests must be secure, i.e. https, not http.

Data Structure

All requests sent to each data endpoint in the appropriate HTTP method produces a JSON response. The response is formated to give quick information on the status of the request, the data requested, custom message, access token (sent back with each request) and the appropriate HTTP code.

RESPONSE FIELDS

Field Type Description
code Integer -2: API Rate limit exceeded
-1: Invalid/Disabled API Key
0: Particular request/action not successful
1: Particular request/action successful
data Array Response payload
msg String Human-readable response
httpCode Integer HTTP status code

Authentication

Your API access token authorizes you to use the Nigeria Yellow Pages REST API. To call a REST API in your integration, you must include your API key in the GET parameter of the call route. The access token will validate your access to our resources.

API key can be created from your web account. You can make the REST API call in any programming language.

                https://yell.midear.tech/v1/categories?privatekey=my_private_key&publickey=my_public_key
            

QUERY PARAMETERS

Field Type Description
privatekey String Your API private key
publickey String Your API public key.

Categories

                

Response Sample:

{ "code": 1, "data": [ { "name": "Administration, business and management", "id": 5000, "subcategories": [ { "name": "Administrator", "id": 5001 }, { "name": "Business analyst", "id": 5002 }, { "name": "Business continuity specialist", "id": 5003 }, ... ] }, ... ], "msg": "Data fetched", "httpCode": 200 }

Access all the directory categories and subcategories under each category

QUERY PARAMETERS

Authorization bearer: Access Token

GET /categories/all

Location

Available states and cities

                

Response sample:

{ "code": 1, "data": { "states": [ { "id": "2982", "name": "Abia", "country_id": "156", "code": "AB", "latitude": "5.45273540", "longitude": "7.52484140", "fake_state_id": "1" }, { "id": "2983", "name": "Abuja Federal Capital Territory", "country_id": "156", "code": "FC", "latitude": "8.89406910", "longitude": "7.18604020", "fake_state_id": "15" }, ... ], "cities": [ { "id": "142331", "name": "Aba", "country_id": "156", "state_id": "2982", "latitude": "", "longitude": "" }, { "id": "142332", "name": "Umuahia", "country_id": "156", "state_id": "2982", "latitude": "", "longitude": "" }, { "id": "142333", "name": "Osisioma", "country_id": "156", "state_id": "2982", "latitude": "", "longitude": "" }, ... ], }, "msg": "Fetched", "httpCode": 200 }

QUERY PARAMETERS

GET /location/all

Business Lists


                

Response Sample:

Example
https://yell.midear.tech/v1/business?page=2&title=food+joint&privatekey=my_private_key&publickey=my_public_key
{ "code": 1, "data": { "data": [ { "market": { "txnId": "7wkO9oiL0krFOB5E0otZNmacYlY9SnAY_1710783126_0eb81e0e20", "ad": "0", "title": "Darest Quality Foods", "url_title": "darest-quality-foods", "tradeMethod": null, "description": "Foodstuff Dealers", "website": "", "updatedTimestamp": null, "top_listing_timestamp": "", "top_listing": "", "popular_listing": "", "popular_listing_timestamp": "", "category": "0", "subCategory": null, "licenseNumber": null, "licenseName": null, "status": "2", "id": "61985", "currencyId": null, "countrySelected": "156", "citySelected": "143371", "stateSelected": "2991", "addressInTheCity": "189 Shopping Complex, Eburutu Baracks", "latitude": "5.02922", "longitude": "8.34399", "phone1": "080123456789", "phone2": "080123456789", "email": null, "cityName": "calabar municipality ", "stateName": "Cross River", "countryName": "NIGERIA", "adStartingDate": null, "adDays": null, "views": null, "image": [], "owner": 0, "totalLikes": 0, "iLike": 0, "showingMarketType": 0, "showAdLabel": 0 }, "user": { "country": "156", "personalOrBusiness": "1", "countryName": "Nigeria", "countryFlag": "https://yell.midear.tech/v1/assets/res/flags/ng.png", "countryPhonePrefix": "+234", "firstname": "Midear Company Limited", "middlename": "lMKNIhugyfyg", "surname": "RC1538759", "image": "https://yell.midear.tech/v1/assets/uploads/avatar/11425b7bf3f19753fab78b7d38d47cb51834323586050012vxA0OiTz4eXc6S516867343322186975.jpeg", "cover": "https://yell.midear.tech/v1/assets/uploads/cover/2c9b2b4577750c903e81741f9244008213704858779950813figPHQKsMVIoByr16720787166517240.jpg", "accountId": "7wkO9oiL0krFOB5E0otZNmacYlY9SnAY", "username": "spaceman", "facebook": "", "twitter": "", "tiktok": "", "linkedin": "", "instagram": "" } }, ... ], "totalResult": 361, "totalPages": 19, "currentPage": 2, }, "msg": "Fetched", "httpCode": 200, }

GET /business

REQUIRED QUERY PARAMETERS

query parameter Data type Note
title string Used to search data returnable.
Can singly return data alone
description string Used to search data returnable.
Can singly return data alone
longitude float Used to get the geographical band of data returnable.
Cannot singly return data alone
latitude float Used to get the geographical band of data returnable.
Works with longitude.
Cannot singly return data alone
km integer Used to get the business in km radius.
Works with longitude and latitude.
Cannot singly return data alone
state integer Gets businesses in a state
ID of states available from location endpoint.
Cannot singly return data
city integer Gets businesses in a city
ID of cities available from location endpoint.
Cannot singly return data
id integer Gets a business by ID
Can singly return data
category integer Gets a business by category ID
ID of categories available from categories endpoint.
Can singly return data
page integer used to paginate result.
Works only when totalPages > 1