Get started

        API Endpoint

        https://farmdata.com.ng/
                

The FarmData API provides programmatic access to Nigeria farms data. Encourage collaboration to leaping frog more Agric-Food innovation, provide an oauth farmers database, agriculture data, filter them, etc.

To use this API, you need an API key. Request Access Here to get your own API key.

Rate Limiting
The API has rate limiting in place. Each API key is limited to a certain number of requests per day.

Note: Ensure that you provide your valid API key in the request call to access the API successfully.

get characters


            # Here is a curl example

            curl -X GET 'https://api.farmdata.com.ng/endpoint?api_key=your_api_key'


                

To get characters you need to make a POST call to the following url :
http://api.farmdata.com.ng/get



Result example :

{
    "query": {
        "offset": 0,
        "limit": 50,
        "state": "Lagos",
        "product": "Cassava"
        ]
    },
    "result": [
        {
            "id": 1,
            "FirstName": "Ayomide",
            "LastName": "Okonkwo",
            "Email": "ayomideokonkwo@example.com",
            "PhoneNumber": "08012345678",
            "Address": "No 5, Sarkin Yaki Road, Nassarawa, Kano",
            "Product": "Maize"
        },
        {
            "id": 2,
            "FirstName": "Chidinma",
            "LastName": "Abubakar",
            "Email": "chidinmaabubakar@example.com",
            "PhoneNumber": "08123456789",
            "Address": "12, Odo-Oba Road, Ibadan North, Oyo",
            "Product": "Yam"
        },
        {
            "id": 3,
            "FirstName": "Yusuf",
            "LastName": "Adeleke",
            "Email": "yusufadeleke@example.com",
            "PhoneNumber": "08098765432",
            "Address": "No 10, Bompai Road, Kano",
            "Product": "Broilers"
        },
        {
            "id": 4,
            "FirstName": "Chinwe",
            "LastName": "Adegoke",
            "Email": "chinweadegoke@example.com",
            "PhoneNumber": "09087654321",
            "Address": "15, Ogbomosho, Ibadan South-West, Oyo",
            "Product": "Cashew"
        },
        {
            "id": 5,
            "FirstName": "Nuhu",
            "LastName": "Ogunlade",
            "Email": "nuhuogunlade@example.com",
            "PhoneNumber": "08109876543",
            "Address": "No 20, Zaria Road, Kano",
            "Product": "Beans"
        }
    ]
}
                

QUERY PARAMETERS

Field Type Description
secret_key String Your API key.
search String (optional) A search word to find character by name.
house String (optional) a string array of houses:
alive Boolean (optional) a boolean to filter alived characters
gender String (optional) a string to filter character by gender:
m: male
f: female
offset Integer (optional - default: 0) A cursor for use in pagination. Pagination starts offset the specified offset.
limit Integer (optional - default: 10) A limit on the number of objects to be returned, between 1 and 100.

Errors

The FarmData API uses the following error codes:

Error Code Meaning
F000 Some parameters are missing. This error appears when you don't pass every mandatory parameter.
F001 Unknown or invalid api_key. This error appears if you use an unknown API key or if your API key expired.
F002 Invalid api_key for this domain. This error appears if you use an API key not specified for your domain. Developer or Universal API keys don't have a domain checker.
F003 Unknown or invalid user token. This error appears if you use an unknown user token or if the user token expired.
F004 Unauthorized request. This error occurs when the API key is missing from the request.
F005 Forbidden request. This error occurs when an invalid API key is provided.
F006 Connection failed. This error appears when there's an issue connecting to the database.
F007 SQL query execution error. This error occurs when there's an issue executing the SQL query.
F008 Invalid request method. This error occurs when the request method is not supported.
F009 Page not found. This error occurs when the requested page is not found.